{"id":"CVE-2026-42327","aliases":["CVE-2026-42327","GHSA-xp3w-r5p5-63rr","RUSTSEC-2026-0474"],"related":[],"kind":"vulnerability","state":"published","title":"rust-openssl: undefined behavior in X509Ref::ocsp_responders for certificates with non-UTF-8 OCSP URLs","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"`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.","format":"markdown","source":"ghsa"},{"lang":"en","text":"`X509Ref::ocsp_responders` returns the OCSP responder URLs from a certificate's Authority Information Access extension as `OpensslString` values, which dereference to `str` without validating the bytes. OpenSSL does not require these IA5String values to be ASCII, so for a certificate with non-UTF-8 bytes in an OCSP access location, safe code ends up holding a `&str` that is not valid UTF-8, which is undefined behavior. Certificates often come from untrusted peers.\n\n`ocsp_responders` was added in 0.9.7. 0.10.79 checks each URL and returns an error if it is not valid UTF-8.","format":"markdown","source":"rustsec"}],"published":"2026-05-04T12:00:00.000Z","modified":"2026-11-10T14:10:43.787Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N","score":8.7,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N","score":8.7,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N","rating":"HIGH"}],"cwes":["CWE-20"],"affected":[{"ranges":[{"version":">= 0.9.7, < 0.10.79","status":"affected"}],"vendor":"rust-openssl","product":"rust-openssl","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0.9.7","status":"affected","fixed":"0.10.79"}],"ecosystem":"crates.io","package":"openssl","purl":"pkg:cargo/openssl","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0.9.7","status":"affected","fixed":"0.10.79"}],"ecosystem":"crates.io","package":"openssl","purl":"pkg:cargo/openssl","source":"rustsec"}],"references":[{"url":"https://github.com/rust-openssl/rust-openssl/security/advisories/GHSA-xp3w-r5p5-63rr","tags":["web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-42327","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/rust-openssl/rust-openssl","tags":["package"],"sources":["ghsa"]},{"url":"https://crates.io/crates/openssl","tags":["package"],"sources":["rustsec"]},{"url":"https://rustsec.org/advisories/RUSTSEC-2026-0474.html","tags":["advisory"],"sources":["rustsec"]},{"url":"https://github.com/rust-openssl/rust-openssl/pull/2631","tags":["web"],"sources":["rustsec"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"yes","technicalImpact":"partial","date":"2026-05-15T16:28:41.920Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-42327","url":"https://www.cve.org/CVERecord?id=CVE-2026-42327","licence":"CVE Terms of Use","modified":"2026-05-15T18:05:15.921Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-xp3w-r5p5-63rr","url":"https://github.com/advisories/GHSA-xp3w-r5p5-63rr","licence":"CC-BY-4.0","modified":"2026-11-10T14:10:43.787Z"},{"source":"rustsec","name":"RustSec Advisory Database","id":"RUSTSEC-2026-0474","url":"https://rustsec.org/advisories/RUSTSEC-2026-0474.html","licence":"CC0-1.0","modified":"2026-11-10T14:00:02.466Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-42327","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-42327","licence":"Public domain","modified":"2026-06-17T10:47:41.687Z"}],"updatedAt":"2026-11-25T22:59:21.784Z","epss":{"score":0.00211,"percentile":0.11943,"date":"2026-12-01T12:00:22.000Z"}}