CVE-2026-31789
Heap Buffer Overflow in Hexadecimal Conversion
Mitigation
- Upgrade OpenSSL to 3.0.20 or later.
Who should check
- Anyone running OpenSSL >= 3.6.0, < 3.6.2; >= 3.5.0, < 3.5.6; >= 3.4.0, < 3.4.5; >= 3.3.0, < 3.3.7; >= 3.0.0, < 3.0.20
Vulnerability facts
- Affected
- OpenSSL >= 3.6.0, < 3.6.2; >= 3.5.0, < 3.5.6; >= 3.4.0, < 3.4.5; >= 3.3.0, < 3.3.7; >= 3.0.0, < 3.0.20
- Fixed in
- OpenSSL 3.6.2, OpenSSL 3.5.6, OpenSSL 3.4.5, OpenSSL 3.3.7, OpenSSL 3.0.20
- Exploited in the wild
- Not in CISA KEV
- Public exploit / PoC
- None known
- Remote exploitation
- Not remotely exploitable (local or adjacent access needed)
- CVSS
- 5.8 (v3.1, CNA)CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:HOpen in CVSS calculator
Show all 8 CVSS metrics
- Attack vector: Local
- Attack complexity: High
- Privileges required: None
- User interaction: Required
- Scope: Unchanged
- Confidentiality impact: Low
- Integrity impact: Low
- Availability impact: High
- EPSS
- 0.34% chance of exploitation in 30 days (percentile 20, 2026-11-26)
- CWE
- CWE-787
- Modified
Description
Issue summary: Converting an excessively large OCTET STRING value to a hexadecimal string leads to a heap buffer overflow on 32 bit platforms. Impact summary: A heap buffer overflow may lead to a crash or possibly an attacker controlled code execution or other undefined behavior. If an attacker can supply a crafted X.509 certificate with an excessively large OCTET STRING value in extensions such as the Subject Key Identifier (SKID) or Authority Key Identifier (AKID) which are being converted to hex, the size of the buffer needed for the result is calculated as multiplication of the input length by 3. On 32 bit platforms, this multiplication may overflow resulting in the allocation of a smaller buffer and a heap buffer overflow. Applications and services that print or log contents of untrusted X.509 certificates are vulnerable to this issue. As the certificates would have to have sizes of over 1 Gigabyte, printing or logging such certificates is a fairly unlikely operation and only 32 bit platforms are affected, this issue was assigned Low severity. The FIPS modules in 3.6, 3.5, 3.4, 3.3 and 3.0 are not affected by this issue, as the affected code is outside the OpenSSL FIPS module boundary.
Affected and fixed versions
| Package / product | Affected | Fixed | Source |
|---|---|---|---|
| OpenSSL | >= 3.6.0, < 3.6.2; >= 3.5.0, < 3.5.6; >= 3.4.0, < 3.4.5; >= 3.3.0, < 3.3.7; >= 3.0.0, < 3.0.20 | — | cvelist |
Check your systems with an agent
Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.
Check whether anything I run is affected by CVE-2026-31789. Work read-only: do not install, upgrade, delete or change anything. Details: https://flawdb.com/CVE-2026-31789.md Affected: OpenSSL >= 3.6.0, < 3.6.2; >= 3.5.0, < 3.5.6; >= 3.4.0, < 3.4.5; >= 3.3.0, < 3.3.7; >= 3.0.0, < 3.0.20 Fixed in: OpenSSL 3.6.2, OpenSSL 3.5.6, OpenSSL 3.4.5, OpenSSL 3.3.7, OpenSSL 3.0.20 Steps: 1. Search this machine and project for OpenSSL: dependency manifests and lockfiles, installed packages, container images and running services. 2. For each match, note the installed version and whether it is inside the affected range. 3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
References
Vendor advisories
Patches
- https://github.com/openssl/openssl/commit/a24216018e1ede8ff01a4ff5afff7dfbd443e2f9
- https://github.com/openssl/openssl/commit/945b935ac66cc7f1a41f1b849c7c25adb5351f49
- https://github.com/openssl/openssl/commit/364f095b80601db632b0def6a33316967f863bde
- https://github.com/openssl/openssl/commit/7a9087efd769f362ad9c0e30c7baaa6bbfa65ecf
- https://github.com/openssl/openssl/commit/a91e537d16d74050dbde50bb0dfb1fe9930f0521
FAQ
Is CVE-2026-31789 being exploited?
There is no confirmed exploitation: CVE-2026-31789 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.34% chance of exploitation in the next 30 days (as of 2026-11-26).
How serious is CVE-2026-31789?
Medium: CVSS 5.8 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed). A user has to take an action, such as opening a link, for the attack to work. The attack needs conditions outside the attacker's control, which makes it harder.
Which versions are affected by CVE-2026-31789?
OpenSSL >= 3.6.0, < 3.6.2; >= 3.5.0, < 3.5.6; >= 3.4.0, < 3.4.5; >= 3.3.0, < 3.3.7; >= 3.0.0, < 3.0.20.
Is there a fix for CVE-2026-31789?
Yes. Fixed in OpenSSL 3.6.2, OpenSSL 3.5.6, OpenSSL 3.4.5, OpenSSL 3.3.7, OpenSSL 3.0.20. Upgrade OpenSSL to 3.0.20 or later.
How do I check if I'm affected by CVE-2026-31789?
Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.