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.

Severity (CVSS 3.1)5.8Medium
Exploit odds (30 days)0.3%top 83.1% of all CVEs
Exploited in the wildNo reportsCISA SSVC: none
Attack toolingNoneno public tooling known

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

EcosystemPackageFixed inAdvisory
Alpine:v3.20openssl3.3.7-r0ALPINE-CVE-2026-31789
Alpine:v3.21openssl3.3.7-r0ALPINE-CVE-2026-31789
Alpine:v3.22openssl3.5.6-r0ALPINE-CVE-2026-31789
Alpine:v3.23openssl3.5.6-r0ALPINE-CVE-2026-31789
Alpine:v3.24openssl3.5.6-r0ALPINE-CVE-2026-31789
Debian:12openssl3.0.19-1~deb12u2DEBIAN-CVE-2026-31789
Debian:13openssl3.5.5-1~deb13u2DEBIAN-CVE-2026-31789
Debian:14openssl3.6.2-1DEBIAN-CVE-2026-31789
Ubuntu:24.04:LTSedk2no fix listedUBUNTU-CVE-2026-31789
Ubuntu:25.10edk2no fix listedUBUNTU-CVE-2026-31789
Ubuntu:26.04:LTSedk2no fix listedUBUNTU-CVE-2026-31789
Ubuntu:26.10edk2no fix listedUBUNTU-CVE-2026-31789
Ubuntu:26.04:LTSedk2-hweno fix listedUBUNTU-CVE-2026-31789
Ubuntu:26.10edk2-hweno fix listedUBUNTU-CVE-2026-31789
Ubuntu:22.04:LTSopenssl3.0.2-0ubuntu1.23UBUNTU-CVE-2026-31789
Ubuntu:24.04:LTSopenssl3.0.13-0ubuntu3.9UBUNTU-CVE-2026-31789
Ubuntu:25.10openssl3.5.3-1ubuntu3.3UBUNTU-CVE-2026-31789
Ubuntu:26.04:LTSopenssl3.5.5-1ubuntu3UBUNTU-CVE-2026-31789
Ubuntu:26.10openssl3.5.5-1ubuntu3UBUNTU-CVE-2026-31789

Affected products (as reported)

VendorProductVersions
OpenSSL OpenSSL 3.6.0 – before 3.6.23.5.0 – before 3.5.63.4.0 – before 3.4.53.3.0 – before 3.3.73.0.0 – before 3.0.20

Weakness: CWE-787 · Vector: CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:H

References