Heap Buffer Overflow in Hexadecimal Conversion
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- None
- Attack complexity
- Low
- Impact type
- Code execution
- Confidentiality · integrity · availability
- High · High · High
- Fix status
- Partial Red Hat: 1 fixed, 8 without a fix
Attack profile from CVSS 3.1 · NVD. Fix status from CNA and Red Hat. Impact type from CWE-787 and the CVSS impact.
Summary
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.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- None
- Automatable
- No
- Technical impact
- Total
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| OpenSSL | OpenSSL | 3.6.0 to before 3.6.2; 3.5.0 to before 3.5.6; 3.4.0 to before 3.4.5; 3.3.0 to before 3.3.7; 3.0.0 to before 3.0.20 | 3.6.2, 3.5.6, 3.4.5, 3.3.7, 3.0.20 | Patch available | CNA |
- OpenSSL VendorOpenSSL Affected 3.6.0 to before 3.6.2; 3.5.0 to before 3.5.6; 3.4.0 to before 3.4.5; 3.3.0 to before 3.3.7; 3.0.0 to before 3.0.20 Fixed in 3.6.2, 3.5.6, 3.4.5, 3.3.7, 3.0.20 Patch available CNA
CPE configurations NVD · 1
| CPE | Versions | Role | Vendor |
|---|---|---|---|
| cpe:2.3:a:openssl:openssl:*:*:*:*:*:*:*:* | 3.0.0 to before 3.0.20; 3.3.0 to before 3.3.7; 3.4.0 to before 3.4.5; 3.5.0 to before 3.5.6; 3.6.0 to before 3.6.2 | Vulnerable | OpenSSL |
- cpe:2.3:a:openssl:openssl:*:*:*:*:*:*:*:* Versions 3.0.0 to before 3.0.20; 3.3.0 to before 3.3.7; 3.4.0 to before 3.4.5; 3.5.0 to before 3.5.6; 3.6.0 to before 3.6.2 Vulnerable ·OpenSSL
Remediation
- Fix · CNA OpenSSL (OpenSSL) Fixed in 3.6.2, 3.5.6, 3.4.5, 3.3.7, 3.0.20
Red Hat 1 advisory
- RHSA-2026:7261 Released 2026-04-09 · Red Hat rating ImportantRed Hat Hardened Images RPMs bug fix and enhancement update
- Red Hat Hardened Images openssl-3.5.6-0.1.hum1@aarch64, openssl-3.5.6-0.1.hum1@src, openssl-3.5.6-0.1.hum1@x86_64 +10
Fixed in the same release
Records fixed by the same vendor advisory or release, as the CNA lists them.
- Advisory ·
OpenSSL — openssl-library.org/news/secadv/20260407.txt
7 records Highest priority Priority MEDIUM 6 MEDIUM, 1 LOW
Other records, highest priority first
- TI-2026-22661 Out-of-bounds Read in AES-CFB-128 on X86-64 with AVX-512 SupportPriority MEDIUM 46
- TI-2026-24346 Incorrect Failure Handling in RSA KEM RSASVE EncapsulationPriority MEDIUM 41
- TI-2026-22663 NULL Pointer Dereference When Processing a Delta CRLPriority MEDIUM 41
Vendor assessments
Red Hat
Red Hat rating: Low. Red Hat's page for this CVE →
| Product | Status | Plan or fix |
|---|---|---|
| Red Hat Enterprise Linux 10 | Affected | No fix yet: Fix deferred |
| Red Hat Enterprise Linux 6 | Affected | No fix yet: Fix deferred |
| Red Hat Enterprise Linux 7 | Affected | No fix yet: Fix deferred |
| Red Hat Enterprise Linux 8 | Affected | No fix yet: Fix deferred |
| Red Hat Enterprise Linux 9 | Affected | No fix yet: Fix deferred |
| Red Hat JBoss Core Services | Affected | No fix yet: Fix deferred |
| Red Hat OpenShift AI (RHOAI) | Affected | — |
| Red Hat OpenShift Container Platform 4 | Affected | No fix yet: Fix deferred |
| Red Hat Hardened Images | Fixed | RHSA-2026:7261 |
Not affected: 1 product
- Red Hat OpenShift AI (RHOAI)
Timeline
- 2026-10-02 Threatist record created from CVE-2026-31789
- 2026-10-03 Alias added: GHSA-j79m-9jxq-788r
- 2026-11-06 Affected versions changed · Red Hat
References
More Openssl vulnerabilities
- TI-2022-01915 The c_rehash script allows command injection CVSS 3.1CRITICAL 9.8
- TI-2021-02645 SM2 Decryption Buffer Overflow CVSS 3.1CRITICAL 9.8
- TI-2009-03392 The TLS protocol, and the SSL protocol 3.0 and possibly earlier, as used in Microsoft… CVSS 3.1CRITICAL 9.8
- TI-2022-01176 The c_rehash script allows command injection CVSS 3.1CRITICAL 9.8
- TI-2014-00154 The (1) TLS and (2) DTLS implementations in OpenSSL 1.0.1 before 1.0.1g do not properly… KEVCVSS 3.1HIGH 7.5
- TI-2025-14107 Stack buffer overflow in CMS (Auth)EnvelopedData parsing CVSS 3.1HIGH 8.8
Sources
- CVE-2026-31789 · CVE Program
- CVE-2026-31789 · NVD
- FIRST EPSS
- GHSA-j79m-9jxq-788r · GitHub Advisory Database · CC BY 4.0
- CVE-2026-31789 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences