CVE-2026-42327 rust-openssl: undefined behavior in X509Ref::ocsp_responders for certificates with non-UTF-8 OCSP URLs

High 8.7 Published Updated

Attackers can trigger undefined behavior in rust-openssl by providing certificates with non-UTF-8 OCSP URLs, potentially leading to crashes or code execution.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2026-42327?

CVE-2026-42327 is a high-severity memory corruption vulnerability in rust-openssl, published on 14 May 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

rust-openssl provides OpenSSL bindings for the Rust programming language. From 0.9.7 to before 0.10.79, X509Ref::ocsp_responders returns OCSP responder URLs from a certificate's AIA extension as OpensslString, whose Deref<Target = str> wraps the raw bytes with str::from_utf8_unchecked. OpenSSL does not enforce that the underlying IA5String is ASCII, so a certificate with non-UTF-8 bytes in its OCSP accessLocation causes safe Rust code to construct a &str that violates the UTF-8 invariant — resulting in undefined behavior. This vulnerability is fixed in 0.10.79.

Weakness: CWE-20

Which versions are affected by CVE-2026-42327?

2 open source packages ship an affected version, including openssl.

PackageAffectedFixed in
openssl crates.ioFrom 0.9.70.10.79
openssl crates.ioFrom 0.9.70.10.79

How do I fix CVE-2026-42327?

Upgrade openssl to 0.10.79 or later.

Upgrade to the fixed version. Memory-safe languages, compiler hardening and fuzzing prevent most new cases. More about Memory corruption.

Is CVE-2026-42327 being exploited?

There is no known exploitation of CVE-2026-42327 in the wild and no public exploit code.

Sources

Also known as DEBIAN-CVE-2026-42327, GHSA-xp3w-r5p5-63rr, MINI-3g7w-6vr9-65pc, MINI-4w5m-cfp6-xgrx, MINI-8r87-6f22-3x29, MINI-fj2c-w9hh-m5wq and 6 more.

Is CVE-2026-42327 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free