<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Openssl (&gt;= 0.9.7, &lt; 0.10.79) — CraftedSignal Threat Feed</title><link>https://feed.craftedsignal.io/products/openssl--0.9.7--0.10.79/</link><description>Trending threats, MITRE ATT&amp;CK coverage, and detection metadata — refreshed continuously.</description><generator>Hugo</generator><language>en</language><managingEditor>hello@craftedsignal.io</managingEditor><webMaster>hello@craftedsignal.io</webMaster><lastBuildDate>Wed, 03 Jan 2024 12:00:00 +0000</lastBuildDate><atom:link href="https://feed.craftedsignal.io/products/openssl--0.9.7--0.10.79/feed.xml" rel="self" type="application/rss+xml"/><item><title>rust-openssl X509Ref::ocsp_responders Undefined Behavior Vulnerability</title><link>https://feed.craftedsignal.io/briefs/2024-01-rust-openssl-x509ref-ocsp-responders-vulnerability/</link><pubDate>Wed, 03 Jan 2024 12:00:00 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2024-01-rust-openssl-x509ref-ocsp-responders-vulnerability/</guid><description>The `X509Ref::ocsp_responders` function in rust-openssl versions 0.9.7 to 0.10.78 returns OCSP responder URLs from a certificate's AIA extension without proper UTF-8 validation, leading to undefined behavior when processing certificates with non-UTF-8 OCSP URLs.</description><content:encoded><![CDATA[<p>The rust-openssl crate, a popular binding for OpenSSL in Rust applications, is vulnerable to a critical flaw in its <code>X509Ref::ocsp_responders</code> function. This function retrieves OCSP responder URLs from the Authority Information Access (AIA) extension of X.509 certificates. The <code>OpensslString</code> type, used to represent these URLs, employs <code>str::from_utf8_unchecked</code> which doesn&rsquo;t validate UTF-8 encoding. Consequently, when a certificate contains non-UTF-8 characters in its OCSP accessLocation, the function constructs a <code>&amp;str</code> that violates the UTF-8 invariant, leading to undefined behavior, potentially causing crashes or memory corruption. This vulnerability affects rust-openssl versions 0.9.7 up to, but not including, 0.10.79. This poses a risk to applications that rely on rust-openssl for certificate validation and trust establishment.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>An attacker crafts a malicious X.509 certificate with a non-UTF-8 encoded URL within the OCSP responder field of the AIA extension.</li>
<li>A vulnerable application using rust-openssl processes the malicious certificate.</li>
<li>The application calls <code>X509Ref::ocsp_responders</code> to extract the OCSP responder URLs.</li>
<li><code>X509Ref::ocsp_responders</code> returns the malformed URL as an <code>OpensslString</code>.</li>
<li>The application attempts to use the <code>OpensslString</code> as a UTF-8 string via <code>Deref&lt;Target = str&gt;</code>.</li>
<li>The <code>str::from_utf8_unchecked</code> function constructs a <code>&amp;str</code> that violates the UTF-8 invariant.</li>
<li>Subsequent operations on the invalid <code>&amp;str</code> result in undefined behavior, such as memory corruption or program crashes.</li>
<li>The application becomes unstable or crashes, potentially leading to denial of service or other unexpected consequences.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>Successful exploitation of this vulnerability can lead to undefined behavior in applications that rely on rust-openssl for certificate validation, potentially resulting in denial-of-service conditions or other unexpected program behavior. While the scope of impact depends on how the application handles certificate processing, any application using rust-openssl versions 0.9.7 to 0.10.78 is potentially vulnerable when handling untrusted certificates. The lack of UTF-8 validation makes applications susceptible to maliciously crafted certificates.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Upgrade to rust-openssl version 0.10.79 or later to remediate CVE-2026-42327.</li>
<li>Implement certificate validation routines that explicitly check for valid UTF-8 encoding in OCSP responder URLs before further processing.</li>
<li>Deploy the Sigma rule &ldquo;Detect rust-openssl OCSP Responder URL Non-UTF-8&rdquo; to identify potentially vulnerable processes.</li>
<li>Monitor application logs for crashes or unexpected behavior when processing certificates, which might indicate exploitation of this vulnerability.</li>
</ul>
]]></content:encoded><category domain="severity">high</category><category domain="type">advisory</category><category>vulnerability</category><category>rust</category><category>openssl</category><category>certificate</category></item></channel></rss>