☠️
EXFILTRATING
DATA...
01010111 10110010 00101001 11000110 01101100 10011011 00010001 11100101 01000010 10101111
[ <-- BACK_TO_SEARCH ]
rust-openssl logo [ WEBSITE ] [ VENDOR STATS ]
CVSS: 8.7 🐛 CWE-20
👁️
Common Weakness Enumeration - Identifies the specific category of software weakness or flaw.

CVE-2026-42327

CVE-2026-42327 Memory Corruption in Rust-Openssl
📅 PUBLISHED: 2026-05-14 21:16 UTC 🔄 UPDATED: 2026-10-11 17:42 UTC
[ PATCH UNDER REVIEW ↓ ] Remains UNDER REVIEW until an independent source confirms the fix
[ DEFENSE PATCH ↓ ]
💣 PoC: None
👁️
Proof of Concept - Indicates if functional exploit code is publicly available, drastically increasing the risk of immediate attacks.
🎯 EPSS: 0.21%
👁️
0.21% probability
5.3× above the median CVE
Tier: ELEVATED
30-day exploitation window · FIRST.org · updated daily
🥷 MITRE: T1190
👁️
MITRE ATT&CK Tactic - Describes the strategy hackers use to execute this attack.
VULNERABLE: version not auto-detected — verify your deployed version locally
CVSS SEVERITY SCALE
9.0–10.0 CRITICAL
7.0–8.9 HIGH
4.0–6.9 MEDIUM
0.1–3.9 LOW
0.0 NONE
8.7
THREAT LEVEL
■ tracking this CVE ✓ independent patch confirmation ⧗ same-origin mirror (GHSA) ⚠ active exploitation verification policy →

Executive Summary

CVE-2026-42327 is a critical memory safety vulnerability in the rust-openssl crate (versions 0.9.7 to before 0.10.79). The flaw resides in the X509Ref::ocsp_responders method, which returns OCSP responder URLs from a certificate’s Authority Information Access (AIA) extension. The function uses OpensslString and its Deref<Target = str> implementation, which calls str::from_utf8_unchecked on raw bytes from OpenSSL. Since OpenSSL does not enforce that the underlying IA5String is valid ASCII, a certificate containing non-UTF-8 bytes in the accessLocation field causes safe Rust code to construct a &str that violates the UTF-8 invariant. This leads to undefined behavior (UB) in Rust, potentially enabling memory corruption, denial of service, or arbitrary code execution.

⚡ AUTOMATE YOUR CVE INTELLIGENCE

This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.

›Patch confidence — UNVERIFIED to CONFIRMED, cross-referenced NVD + RHSA + Debian
›Exploit & PoC — poc_status, poc_url, has_exploit. Not in NVD.
›Shodan dorks — ready-made queries to find exposed vulnerable systems
›Detection rules — YARA · Wazuh · Elastic (all plans) · Sigma (Pro)
›pending_fields — know exactly which of 7 fields NVD hasn't processed yet
›Free backfill — data incomplete when you paid? Re-check within 30 days = 0 credits
PAYG €0.08/lookup Standard €19/mo (was €29) · 5k credits Pro €65/mo (was €99) · 20k credits FOUNDING PRICE · LOCKED FOR LIFE · ENDS 31 DEC 2026
[ FROM €19/MO ]
Free sandbox key available
No signup required

Supply Chain & Package Security

This vulnerability affects the rust-openssl crate, a widely used Rust package providing OpenSSL bindings. The crate is distributed via crates.io and is a dependency for thousands of Rust projects. Attackers could exploit this by crafting a malicious X.509 certificate with non-UTF-8 OCSP responder URLs. When a vulnerable application processes such a certificate (e.g., during TLS handshake or certificate validation), the UB can be triggered. The supply chain risk is high because the vulnerability is in a low-level cryptographic binding, and patching requires updating the crate version to 0.10.79 or later.

CVSS Breakdown & Threat Level

  • Attack Vector (AV): Network (N) – The attacker can deliver the malicious certificate over the network.
  • Attack Complexity (AC): Low (L) – No special conditions required beyond receiving a crafted certificate.
  • Privileges Required (PR): None (N) – No authentication needed.
  • User Interaction (UI): None (N) – No user action required.
  • Scope (S): Unchanged (U) – The vulnerability does not cross trust boundaries.
  • Confidentiality (C): None (N) – No direct data exposure.
  • Integrity (I): None (N) – No direct data modification.
  • Availability (A): High (H) – UB can cause crashes or memory corruption, leading to denial of service.

CVSS Score: 7.5 (High) – The potential for memory corruption and undefined behavior makes this a serious threat, though exploitation complexity may vary.

Deep Dive & Mechanics

The vulnerability stems from the interaction between Rust’s strict memory safety guarantees and OpenSSL’s lenient handling of string encodings.

  1. AIA Extension: X.509 certificates can include an Authority Information Access (AIA) extension containing OCSP responder URLs. These URLs are stored as IA5String, which is a subset of ASCII but OpenSSL does not validate that the bytes are valid ASCII or UTF-8.

  2. OpensslString: The rust-openssl crate provides OpensslString as a wrapper around OpenSSL’s ASN1_STRING. Its Deref implementation calls str::from_utf8_unchecked on the raw bytes, assuming they are valid UTF-8.

  3. The Bug: When a certificate contains non-UTF-8 bytes in the accessLocation field, str::from_utf8_unchecked creates a &str that violates Rust’s UTF-8 invariant. This is undefined behavior in Rust, which can lead to:

    • Memory corruption (e.g., buffer overflows)
    • Logic errors (e.g., incorrect string comparisons)
    • Arbitrary code execution (if the UB is leveraged by an attacker)
  4. Trigger: Any code that calls X509Ref::ocsp_responders() on a certificate with a malformed AIA extension will trigger the UB. This includes TLS clients and servers that validate certificates.

Vulnerable vs. Patched Code

Vulnerable Code (rust-openssl < 0.10.79):

// In openssl/src/x509.rs (simplified)
impl Deref for OpensslString {
    type Target = str;
    fn deref(&self) -> &str {
        unsafe { str::from_utf8_unchecked(self.as_bytes()) }
    }
}

Patched Code (rust-openssl >= 0.10.79):

// In openssl/src/x509.rs (simplified)
impl Deref for OpensslString {
    type Target = str;
    fn deref(&self) -> &str {
        // Validate UTF-8 before returning
        str::from_utf8(self.as_bytes()).expect("OpensslString must be valid UTF-8")
    }
}

The patch replaces from_utf8_unchecked with from_utf8, which returns a Result and panics on invalid UTF-8. This prevents UB but may cause panics in applications processing malformed certificates. A more robust fix would handle the error gracefully (e.g., returning an Option or Result).

Exploitation & Lab Setup

Red Team

Prerequisites:

  • A target application using rust-openssl < 0.10.79 that processes X.509 certificates (e.g., a TLS server or client).
  • Ability to deliver a crafted certificate to the target.

Exploitation Steps:

  1. Craft a Malicious Certificate: Use OpenSSL or a custom tool to generate an X.509 certificate with a non-UTF-8 OCSP responder URL. For example, set the accessLocation field to bytes 0xFF 0xFE 0x00 (invalid UTF-8).
  2. Deliver the Certificate: Present the certificate during a TLS handshake or via a file upload that triggers certificate parsing.
  3. Trigger the Vulnerability: The target application calls X509Ref::ocsp_responders() on the certificate, causing UB. Depending on the memory layout, this could crash the application or allow code execution.

Example Certificate Generation (using OpenSSL command line):

# Generate a self-signed certificate with a malformed AIA extension
openssl req -x509 -newkey rsa:2048 -keyout key.pem -out cert.pem -days 365 -nodes \
  -addext "authorityInfoAccess = OCSP;URI:http://\xff\xfe\x00.example.com"

Note: No public exploit code is available for this CVE. The above is a conceptual demonstration.

Blue Team

Detection:

  • Monitor for certificates with non-ASCII or non-UTF-8 characters in the AIA extension.
  • Use network monitoring to detect OCSP responder URLs containing invalid byte sequences.
  • Enable application logging for panics or crashes related to string processing.

Mitigation:

  • Update rust-openssl to version 0.10.79 or later.
  • If patching is not immediately possible, implement input validation for certificate extensions before processing.
  • Use a Web Application Firewall (WAF) to inspect TLS handshakes for malformed certificates.

Indicators of Compromise (IOCs)

  • Network: TLS handshakes containing certificates with non-UTF-8 bytes in the AIA accessLocation field.
  • Logs: Application crashes or panics with messages like "called Result::unwrap()on anErr value: Utf8Error { valid_up_to: ... }" (if patched) or memory corruption errors (if unpatched).
  • File: X.509 certificates with hex bytes FF FE 00 or other non-ASCII sequences in the OCSP responder URL.

Detection Engineering

YARA Rule

rule CVE_2026_42327_Malformed_OCSP_URL {
    meta:
        description = "Detects X.509 certificates with non-UTF-8 bytes in OCSP responder URLs"
        author = "Valters IT"
        date = "2025-04-10"
        cve = "CVE-2026-42327"
    strings:
        $aia_oid = { 2B 06 01 05 05 07 30 01 01 }  // AIA OID (1.3.6.1.5.5.7.48.1)
        $non_utf8 = { [80-FF] [80-FF] [00-7F] }    // Non-UTF-8 byte sequences
    condition:
        $aia_oid and $non_utf8
}

Sigma Rule

title: Detection of Malformed OCSP Responder URLs in X.509 Certificates
id: 8a9b7c6d-5e4f-3a2b-1c0d-9e8f7a6b5c4d
status: experimental
description: Detects network traffic containing X.509 certificates with non-UTF-8 bytes in the AIA extension
author: Valters IT
date: 2025-04-10
logsource:
    category: network
    product: tls
detection:
    selection:
        - certificate.extensions: "*authorityInfoAccess*"
        - certificate.extensions|contains: "OCSP;URI:http://"
        - certificate.extensions|re: "\\x[89A-Fa-f][0-9A-Fa-f]"
    condition: selection
falsepositives:
    - Rare legitimate use of non-ASCII characters in URLs
level: high

Suricata Rule

alert tls any any -> any any (msg:"CVE-2026-42327 - Malformed OCSP Responder URL in Certificate"; flow:to_client; tls.certificate.extensions; content:"|2B 06 01 05 05 07 30 01 01|"; content:"|80|"; within:100; sid:1000001; rev:1;)

Remediation & Mitigation

  1. Immediate Patch: Update rust-openssl to version 0.10.79 or later. Run cargo update -p openssl in your Rust project.
  2. Workaround: If patching is delayed, implement a wrapper that validates UTF-8 before calling ocsp_responders():
    fn safe_ocsp_responders(cert: &X509) -> Result<Vec<String>, Utf8Error> {
        cert.ocsp_responders().iter().map(|s| {
            std::str::from_utf8(s.as_bytes()).map(|u| u.to_string())
        }).collect()
    }
    
  3. Network Defense: Deploy TLS inspection to reject certificates with non-ASCII characters in extensions.
  4. Monitoring: Enable crash dumps and monitor for panics in Rust applications processing certificates.

Report generated by Valters IT DevSecOps AI. For questions, contact security@valters-it.com.

◈ SOURCE Analysis & enrichment: valtersit.com/cve/CVE-2026-42327/ · CVE data: NVD/MITRE (public domain) · © 2026 ValtersIT Hub
>_ SYSTEM_CORE: INTEL_ACTIVE
90% TEAM-CURATED // 10% AUTOMATED INGESTION.
ALL PATCH REFERENCES AND VERSION DATA SOURCED FROM NVD + OSV OFFICIAL REGISTRIES.