Vulnerability · Published Apr 7, 2026 · Assigned by openssl
CVE-2026-31789Heap Buffer Overflow in Hexadecimal Conversion
Medium 5.8
In plain English
A medium-severity out-of-bounds write in OpenSSL from OpenSSL. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.3% (higher than 17% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official 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 packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Alpine:v3.20 | openssl | 3.3.7-r0 | ALPINE-CVE-2026-31789 |
| Alpine:v3.21 | openssl | 3.3.7-r0 | ALPINE-CVE-2026-31789 |
| Alpine:v3.22 | openssl | 3.5.6-r0 | ALPINE-CVE-2026-31789 |
| Alpine:v3.23 | openssl | 3.5.6-r0 | ALPINE-CVE-2026-31789 |
| Alpine:v3.24 | openssl | 3.5.6-r0 | ALPINE-CVE-2026-31789 |
| Debian:12 | openssl | 3.0.19-1~deb12u2 | DEBIAN-CVE-2026-31789 |
| Debian:13 | openssl | 3.5.5-1~deb13u2 | DEBIAN-CVE-2026-31789 |
| Debian:14 | openssl | 3.6.2-1 | DEBIAN-CVE-2026-31789 |
| Ubuntu:24.04:LTS | edk2 | no fix listed | UBUNTU-CVE-2026-31789 |
| Ubuntu:25.10 | edk2 | no fix listed | UBUNTU-CVE-2026-31789 |
| Ubuntu:26.04:LTS | edk2 | no fix listed | UBUNTU-CVE-2026-31789 |
| Ubuntu:26.10 | edk2 | no fix listed | UBUNTU-CVE-2026-31789 |
| Ubuntu:26.04:LTS | edk2-hwe | no fix listed | UBUNTU-CVE-2026-31789 |
| Ubuntu:26.10 | edk2-hwe | no fix listed | UBUNTU-CVE-2026-31789 |
| Ubuntu:22.04:LTS | openssl | 3.0.2-0ubuntu1.23 | UBUNTU-CVE-2026-31789 |
| Ubuntu:24.04:LTS | openssl | 3.0.13-0ubuntu3.9 | UBUNTU-CVE-2026-31789 |
| Ubuntu:25.10 | openssl | 3.5.3-1ubuntu3.3 | UBUNTU-CVE-2026-31789 |
| Ubuntu:26.04:LTS | openssl | 3.5.5-1ubuntu3 | UBUNTU-CVE-2026-31789 |
| Ubuntu:26.10 | openssl | 3.5.5-1ubuntu3 | UBUNTU-CVE-2026-31789 |
Affected products (as reported)
Weakness: CWE-787 · Vector: CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:H
References
- OpenSSL Advisory vendor-advisory
- 3.6.2 git commit patch
- 3.5.6 git commit patch
- 3.4.5 git commit patch
- 3.3.7 git commit patch
- 3.0.20 git commit patch
- https://cert-portal.siemens.com/productcert/html/ssa-032379.html