5.8medium
Heap Buffer Overflow in Hexadecimal Conversion
- Severity
- 5.8medium CVSS:3.1 by CISA-ADP
- Exploit likelihood
- 0.34% (higher than 19% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- openssl
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
| Product or package | Versions | Reported by |
|---|---|---|
| OpenSSL OpenSSL | from 3.6.0 before 3.6.2, from 3.5.0 before 3.5.6, from 3.4.0 before 3.4.5, from 3.3.0 before 3.3.7, from 3.0.0 before 3.0.20 | CVE List, NVD |
All scores
| CISA-ADP | 5.8medium CVSS:3.1 | CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:H |
| NVD | 9.8critical CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
Classification
SSVC (CISA-ADP): exploitation none, automatable no, technical impact total.
What each source says
CVE List
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.
NVD (es)
Resumen del problema: La conversión de un valor OCTET STRING excesivamente grande a una cadena hexadecimal conduce a un desbordamiento de búfer de montón en plataformas de 32 bits. Resumen del impacto: Un desbordamiento de búfer de montón puede conducir a un fallo o posiblemente a una ejecución de código controlada por un atacante u otro comportamiento indefinido. Si un atacante puede proporcionar un certificado X.509 manipulado con un valor OCTET STRING excesivamente grande en extensiones como el Identificador de Clave de Sujeto (SKID) o el Identificador de Clave de Autoridad (AKID) que se están convirtiendo a hexadecimal, el tamaño del búfer necesario para el resultado se calcula como la multiplicación de la longitud de entrada por 3. En plataformas de 32 bits, esta multiplicación puede desbordarse, lo que resulta en la asignación de un búfer más pequeño y un desbordamiento de búfer de montón. Las aplicaciones y servicios que imprimen o registran contenidos de certificados X.509 no confiables son vulnerables a este problema. Dado que los certificados tendrían que tener tamaños de más de 1 Gigabyte, imprimir o registrar dichos certificados es una operación bastante improbable y solo las plataformas de 32 bits se ven afectadas, a este problema se le asignó una severidad Baja. Los módulos FIPS en 3.6, 3.5, 3.4, 3.3 y 3.0 no se ven afectados por este problema, ya que el código afectado está fuera del límite del módulo FIPS de OpenSSL.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-31789 changed 2026-05-12 | CVE Terms of Use |
| NVD | CVE-2026-31789 changed 2026-07-24 | Public domain |