CVEfocus › CVE database › CVE-2026-31789

CVE-2026-31789Heap Buffer Overflow in Hexadecimal Conversion

CVSS 5.8 MediumEPSS 0.3% (higher than 20% of CVEs)Published 2026-04-07Updated 2026-05-12Assigner: openssl

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.

CWE-787

What to do

Fixed builds are available from Alpine, Debian, Ubuntu: see the table below for the fixed version per release.

Red Hat, Ubuntu have not shipped a fix for every release yet.

Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.

curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \
  -H "Content-Type: text/plain" --data-binary @inventory.txt

Vendor status at a glance

13Fixed
62Fix pending
1Under investigation
1Will not fix
4Not affected

Status by vendor and release

From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.

ReleasePackageStatusFixed versionAdvisory
Ubuntu 26.10edk2Fix pendingUBUNTU-CVE-2026-31789
Ubuntu 26.10edk2-hweFix pendingUBUNTU-CVE-2026-31789
Ubuntu 26.10opensslFixed3.5.5-1ubuntu3UBUNTU-CVE-2026-31789
Ubuntu 26.04edk2Fix pendingUBUNTU-CVE-2026-31789
Ubuntu 26.04edk2-hweUnder investigationUBUNTU-CVE-2026-31789
Ubuntu 26.04nodejsNot affected
vulnerable_code_not_present
Ubuntu 26.04opensslFixed3.5.5-1ubuntu3UBUNTU-CVE-2026-31789
Ubuntu 25.10edk2Will not fix
edk2 in jammy embeds OpenSSL 1.1.1j edk2 in noble embeds OpenSSL 3.0.9 edk2 in plucky embeds OpenSSL 3.4.0 edk2 in questing embeds OpenSSL 3.4.0 3.6, 3.5,…
UBUNTU-CVE-2026-31789
Ubuntu 25.10nodejsNot affected
vulnerable_code_not_present
Ubuntu 25.10opensslFixed3.5.3-1ubuntu3.3UBUNTU-CVE-2026-31789
Ubuntu 24.04edk2Fix pendingUBUNTU-CVE-2026-31789
Ubuntu 24.04nodejsNot affected
vulnerable_code_not_present
Ubuntu 24.04opensslFixed3.0.13-0ubuntu3.9UBUNTU-CVE-2026-31789
Ubuntu 22.04edk2Not affected
vulnerable_code_not_present
Ubuntu 22.04opensslFixed3.0.2-0ubuntu1.23UBUNTU-CVE-2026-31789
Debian 14opensslFixed3.6.2-1DEBIAN-CVE-2026-31789
Debian 13opensslFixed3.5.5-1~deb13u2DEBIAN-CVE-2026-31789
Debian 12opensslFixed3.0.19-1~deb12u2DEBIAN-CVE-2026-31789
Red Hat Enterprise Linux 10edk2Fix pending
Fix deferred
Red Hat Enterprise Linux 10edk2-aarch64Fix pending
Fix deferred
Red Hat Enterprise Linux 10edk2-ovmfFix pending
Fix deferred
Red Hat Enterprise Linux 10edk2-toolsFix pending
Fix deferred
Red Hat Enterprise Linux 10edk2-tools-docFix pending
Fix deferred
Red Hat Enterprise Linux 10mokutilFix pending
Fix deferred
Red Hat Enterprise Linux 10opensslFix pending
Fix deferred
Red Hat Enterprise Linux 10openssl-develFix pending
Fix deferred
Red Hat Enterprise Linux 10openssl-libsFix pending
Fix deferred
Red Hat Enterprise Linux 10openssl-perlFix pending
Fix deferred
Red Hat Enterprise Linux 10shim-aa64Fix pending
Fix deferred
Red Hat Enterprise Linux 10shim-unsigned-aarch64Fix pending
Fix deferred
Red Hat Enterprise Linux 10shim-unsigned-x64Fix pending
Fix deferred
Red Hat Enterprise Linux 10shim-x64Fix pending
Fix deferred
Red Hat Enterprise Linux 9compat-openssl11Fix pending
Fix deferred
Red Hat Enterprise Linux 9edk2Fix pending
Fix deferred
Red Hat Enterprise Linux 9edk2-aarch64Fix pending
Fix deferred
Red Hat Enterprise Linux 9edk2-ovmfFix pending
Fix deferred
Red Hat Enterprise Linux 9edk2-toolsFix pending
Fix deferred
Red Hat Enterprise Linux 9edk2-tools-docFix pending
Fix deferred
Red Hat Enterprise Linux 9opensslFix pending
Fix deferred
Red Hat Enterprise Linux 9openssl-develFix pending
Fix deferred
Red Hat Enterprise Linux 9openssl-libsFix pending
Fix deferred
Red Hat Enterprise Linux 9openssl-perlFix pending
Fix deferred
Red Hat Enterprise Linux 9shimFix pending
Fix deferred
Red Hat Enterprise Linux 9shim-aa64Fix pending
Fix deferred
Red Hat Enterprise Linux 9shim-unsigned-aarch64Fix pending
Fix deferred
Red Hat Enterprise Linux 9shim-unsigned-x64Fix pending
Fix deferred
Red Hat Enterprise Linux 9shim-x64Fix pending
Fix deferred
Red Hat Enterprise Linux 8compat-openssl10Fix pending
Fix deferred
Red Hat Enterprise Linux 8edk2Fix pending
Fix deferred
Red Hat Enterprise Linux 8edk2-aarch64Fix pending
Fix deferred
Red Hat Enterprise Linux 8edk2-ovmfFix pending
Fix deferred
Red Hat Enterprise Linux 8mingw-opensslFix pending
Fix deferred
Red Hat Enterprise Linux 8mingw32-opensslFix pending
Fix deferred
Red Hat Enterprise Linux 8mingw64-opensslFix pending
Fix deferred
Red Hat Enterprise Linux 8opensslFix pending
Fix deferred
Red Hat Enterprise Linux 8openssl-develFix pending
Fix deferred
Red Hat Enterprise Linux 8openssl-libsFix pending
Fix deferred
Red Hat Enterprise Linux 8openssl-perlFix pending
Fix deferred
Red Hat Enterprise Linux 8openssl-staticFix pending
Fix deferred
Red Hat Enterprise Linux 8shimFix pending
Fix deferred
Red Hat Enterprise Linux 8shim-aa64Fix pending
Fix deferred
Red Hat Enterprise Linux 8shim-ia32Fix pending
Fix deferred
Red Hat Enterprise Linux 8shim-unsigned-x64Fix pending
Fix deferred
Red Hat Enterprise Linux 8shim-x64Fix pending
Fix deferred
Red Hat Enterprise Linux 7AAVMFFix pending
Fix deferred
Red Hat Enterprise Linux 7OVMFFix pending
Fix deferred
Red Hat Enterprise Linux 7opensslFix pending
Fix deferred
Red Hat Enterprise Linux 7openssl-develFix pending
Fix deferred
Red Hat Enterprise Linux 7openssl-libsFix pending
Fix deferred
Red Hat Enterprise Linux 7openssl-perlFix pending
Fix deferred
Red Hat Enterprise Linux 7openssl-staticFix pending
Fix deferred
Red Hat Enterprise Linux 7ovmfFix pending
Fix deferred
Red Hat Enterprise Linux 6opensslFix pending
Fix deferred
Red Hat Enterprise Linux 6openssl-develFix pending
Fix deferred
Red Hat Enterprise Linux 6openssl-perlFix pending
Fix deferred
Red Hat Enterprise Linux 6openssl-staticFix pending
Fix deferred
Alpine Linux 3.24opensslFixed3.5.6-r0ALPINE-CVE-2026-31789
Alpine Linux 3.23opensslFixed3.5.6-r0ALPINE-CVE-2026-31789
Alpine Linux 3.22opensslFixed3.5.6-r0ALPINE-CVE-2026-31789
Alpine Linux 3.21opensslFixed3.3.7-r0ALPINE-CVE-2026-31789
Alpine Linux 3.20opensslFixed3.3.7-r0ALPINE-CVE-2026-31789

What the vendor says

As published in the CVE record by openssl, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.

Vendor advisories:

References

About this page

Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.