{"id":"CVE-2026-31789","aliases":["CVE-2026-31789"],"related":[],"kind":"vulnerability","state":"published","title":"Heap Buffer Overflow in Hexadecimal Conversion","summary":"Issue summary: Converting an excessively large OCTET STRING value to\na hexadecimal string leads to a heap buffer overflow on 32 bit platforms.\n\nImpact summary: A heap buffer overflow may lead to a crash or possibly\nan attacker controlled code execution or other undefined behavior.\n\nIf an attacker can supply a crafted X.509 certificate with an excessively\nlarge OCTET STRING value in extensions such as the Subject Key Identifier\n(SKID) or Authority Key Identifier (AKID) which are being converted to hex,\nthe size of the buffer needed for the result is calculated as multiplication\nof the input length by 3. On 32 bit platforms, this multiplication may overflow\nresulting in the allocation of a smaller buffer and a heap buffer overflow.\n\nApplications and services that print or log contents of untrusted X.509\ncertificates are vulnerable to this issue. As the certificates would have\nto have sizes of over 1 Gigabyte, printing or logging such certificates\nis a fairly unlikely operation and only 32 bit platforms are affected,\nthis issue was assigned Low severity.\n\nThe FIPS modules in 3.6, 3.5, 3.4, 3.3 and 3.0 are not affected by this\nissue, as the affected code is outside the OpenSSL FIPS module boundary.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Issue summary: Converting an excessively large OCTET STRING value to\na hexadecimal string leads to a heap buffer overflow on 32 bit platforms.\n\nImpact summary: A heap buffer overflow may lead to a crash or possibly\nan attacker controlled code execution or other undefined behavior.\n\nIf an attacker can supply a crafted X.509 certificate with an excessively\nlarge OCTET STRING value in extensions such as the Subject Key Identifier\n(SKID) or Authority Key Identifier (AKID) which are being converted to hex,\nthe size of the buffer needed for the result is calculated as multiplication\nof the input length by 3. On 32 bit platforms, this multiplication may overflow\nresulting in the allocation of a smaller buffer and a heap buffer overflow.\n\nApplications and services that print or log contents of untrusted X.509\ncertificates are vulnerable to this issue. As the certificates would have\nto have sizes of over 1 Gigabyte, printing or logging such certificates\nis a fairly unlikely operation and only 32 bit platforms are affected,\nthis issue was assigned Low severity.\n\nThe FIPS modules in 3.6, 3.5, 3.4, 3.3 and 3.0 are not affected by this\nissue, as the affected code is outside the OpenSSL FIPS module boundary.","source":"cvelist"},{"lang":"es","text":"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.\n\nResumen 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.\n\nSi 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.\n\nLas 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.\n\nLos 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.","source":"nvd"}],"published":"2026-04-07T22:00:54.983Z","modified":"2026-07-24T23:10:00.563Z","severity":{"scorer":"CISA-ADP","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:H","score":5.8,"rating":"MEDIUM"},"severities":[{"scorer":"CISA-ADP","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:H","score":5.8,"rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8,"rating":"CRITICAL"}],"cwes":["CWE-787"],"affected":[{"ranges":[{"type":"semver","introduced":"3.6.0","fixed":"3.6.2","status":"affected"},{"type":"semver","introduced":"3.5.0","fixed":"3.5.6","status":"affected"},{"type":"semver","introduced":"3.4.0","fixed":"3.4.5","status":"affected"},{"type":"semver","introduced":"3.3.0","fixed":"3.3.7","status":"affected"},{"type":"semver","introduced":"3.0.0","fixed":"3.0.20","status":"affected"}],"vendor":"OpenSSL","product":"OpenSSL","source":"cvelist"},{"ranges":[{"status":"affected","introduced":"3.0.0","fixed":"3.0.20"},{"status":"affected","introduced":"3.3.0","fixed":"3.3.7"},{"status":"affected","introduced":"3.4.0","fixed":"3.4.5"},{"status":"affected","introduced":"3.5.0","fixed":"3.5.6"},{"status":"affected","introduced":"3.6.0","fixed":"3.6.2"}],"vendor":"openssl","product":"openssl","cpe":"cpe:2.3:a:openssl:openssl:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://openssl-library.org/news/secadv/20260407.txt","tags":["vendor-advisory"],"sources":["cvelist","nvd"]},{"url":"https://github.com/openssl/openssl/commit/a24216018e1ede8ff01a4ff5afff7dfbd443e2f9","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://github.com/openssl/openssl/commit/945b935ac66cc7f1a41f1b849c7c25adb5351f49","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://github.com/openssl/openssl/commit/364f095b80601db632b0def6a33316967f863bde","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://github.com/openssl/openssl/commit/7a9087efd769f362ad9c0e30c7baaa6bbfa65ecf","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://github.com/openssl/openssl/commit/a91e537d16d74050dbde50bb0dfb1fe9930f0521","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://cert-portal.siemens.com/productcert/html/ssa-032379.html","tags":[],"sources":["cvelist","nvd"]}],"credits":["Quoc Tran (Xint.io - US Team)","Igor Ustinov"],"assigner":"openssl","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"total","date":"2026-04-09T03:56:05.246Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-31789","url":"https://www.cve.org/CVERecord?id=CVE-2026-31789","licence":"CVE Terms of Use","modified":"2026-05-12T12:09:05.071Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-31789","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-31789","licence":"Public domain","modified":"2026-07-24T23:10:00.563Z"}],"updatedAt":"2026-11-25T22:59:18.181Z","epss":{"score":0.00253,"percentile":0.17918,"date":"2026-12-01T12:00:22.000Z"}}