Executive brief
OpenSSL is a widely used security library that helps protect internet communications. A vulnerability exists on 32-bit systems where processing an extremely large, specially crafted security certificate can cause the software to crash or potentially allow an attacker to take control of the system. While the risk is considered low because it requires a certificate larger than 1 Gigabyte, organizations using 32-bit applications that log or print certificate details should apply available updates.
Technical details
A heap buffer overflow exists in OpenSSL's buf2hexstr_sep function within crypto/o_str.c. When converting an OCTET STRING (such as those found in X.509 Subject Key Identifier or Authority Key Identifier extensions) to a hexadecimal string, the buffer size calculation involves multiplying the input length by 3. On 32-bit platforms, this multiplication can integer overflow, leading to an undersized memory allocation and a subsequent out-of-bounds write. An attacker could exploit this by providing a crafted X.509 certificate exceeding 1GB in size to an application that prints or logs certificate contents. While the NVD CVSS score is 9.8, the vendor rates this as Low severity due to the impracticality of processing 1GB+ certificates and the limitation to 32-bit architectures. Patches are available in OpenSSL versions 3.6.2, 3.5.6, 3.4.5, 3.3.7, and 3.0.20.
Affected products
- OpenSSL OpenSSL 3.6.0 to 3.6.1, 3.5.0 to 3.5.5, 3.4.0 to 3.4.4, 3.3.0 to 3.3.6, 3.0.0 to 3.0.19
- Siemens SIMATIC CN 4100 versions prior to V5.0
Timeline
- 2026-04-06: patched: Fixes committed to OpenSSL repository
- 2026-04-07: advisory: OpenSSL Security Advisory published
- 2026-04-07: disclosed: CVE-2026-31789 published to NVD
References
- https://github.com/openssl/openssl/commit/364f095b80601db632b0def6a33316967f863bde
- https://github.com/openssl/openssl/commit/7a9087efd769f362ad9c0e30c7baaa6bbfa65ecf
- https://github.com/openssl/openssl/commit/945b935ac66cc7f1a41f1b849c7c25adb5351f49
- https://github.com/openssl/openssl/commit/a24216018e1ede8ff01a4ff5afff7dfbd443e2f9
- https://github.com/openssl/openssl/commit/a91e537d16d74050dbde50bb0dfb1fe9930f0521
- https://openssl-library.org/news/secadv/20260407.txt
- https://cert-portal.siemens.com/productcert/html/ssa-032379.html