Skip to main content
Live Webinar with SANS (June 25)— Agentic CTI Automation for Fun & ProfitRegister Free
Mallory
Critical

OpenSSL heap buffer overflow in X.509 OCTET STRING hexadecimal conversion

IdentifiersCVE-2026-31789CWE-122

CVE-2026-31789 is a heap buffer overflow in OpenSSL affecting the conversion of excessively large ASN.1 OCTET STRING values to hexadecimal strings on 32-bit platforms. When OpenSSL converts certain X.509 certificate extension values, such as Subject Key Identifier (SKID) or Authority Key Identifier (AKID), into hex for printing or logging, the required output buffer size is computed as input_length * 3. On 32-bit systems, that multiplication can overflow for very large attacker-controlled OCTET STRING inputs, causing allocation of an undersized heap buffer followed by out-of-bounds writes during hex conversion. The issue is reachable in applications or services that process and print or log untrusted X.509 certificates. The OpenSSL advisory notes that certificates would need to exceed roughly 1 GB in size for exploitation, making practical reachability uncommon. OpenSSL 3.6, 3.5, 3.4, 3.3, and 3.0 are affected; 1.1.1 and 1.0.2 are not. The FIPS modules in 3.6, 3.5, 3.4, 3.3, and 3.0 are not affected because the vulnerable code lies outside the FIPS module boundary.

Share:
For your environment

Are you exposed to this one?

Mallory correlates every CVE against your assets, your vendors, and active adversary campaigns. Know which vulnerabilities matter for you, not just which ones are loud.

ANALYST BRIEF

Impact, mitigation & remediation

What it means. What to do now. Patch path, mitigations, and the assume-compromise checklist.

Impact

What an attacker gets, and what they’ve been doing with it.

Successful exploitation can trigger a heap buffer overflow, leading to process crash, denial of service, memory corruption, and potentially attacker-controlled code execution or other undefined behavior. The vendor assessed the issue as Low severity because exploitation is limited to 32-bit platforms and requires unusually large malicious certificate data, but the memory corruption primitive is still potentially serious where the vulnerable code path is reachable.

Mitigation

If you can’t patch tonight, do this now.

Avoid printing or logging fields from untrusted X.509 certificates unless necessary, especially on 32-bit deployments. Reject or pre-screen abnormally large certificates and certificate extensions before any diagnostic formatting or hex conversion occurs. Prefer 64-bit platforms where possible, as the described integer-overflow-to-heap-overflow condition is specific to 32-bit size calculations. Limit exposure of certificate parsing and logging paths to untrusted input sources.

Remediation

Patch, then assume compromise.

Upgrade OpenSSL to a fixed release for the affected branch. The provided content identifies fixes in OpenSSL 3.6.2, 3.5.6, 3.4.5, 3.3.7, and 3.0.20. Downstream distributions should consume the corresponding patched package updates. If running an unsupported branch, migrate to a supported fixed version.
PUBLIC EXPLOITS

Exploits

No public exploits tracked yet. Mallory keeps watching.

VALID 0 / 0 TOTALView more in app

No public exploit code observed for this vulnerability.

EXPOSURE SURFACE

Affected products & vendors

Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.

VendorProductType
OpenSSL Software FoundationOpensslapplication

Vendor-confirmed product mapping. Mallory continuously reconciles this list against your asset inventory.

What this page doesn’t show

The version that knows your environment.

This page is what’s public. Mallory adds the parts that aren’t: which of your assets are affected, which adversaries are exploiting it right now, which detections to deploy, and what to do tonight.
Exposure mapping

Query your assets running an affected version, and investigate the blast radius.

Threat actor evidence

Every observed campaign linking this CVE to a named adversary.

Associated malware

Malware families riding this exploit, with evidence and IOCs.

Detection signatures

YARA, Sigma, Snort, and vendor rules, auto-deployed to your SIEM.

Vendor-by-vendor mapping

Cross-references every affected SKU, including bundled OEM variants.

Social activity10

Community discussion across Reddit, Mastodon, and other social sources.