Executive brief
wolfSSL is a security library used by many devices and applications to establish secure connections. A flaw in how it processes certain digital certificates (specifically those using SM2/SM3 algorithms) could allow a malicious certificate to crash the application. This results in a denial-of-service, potentially disrupting operations or device availability.
Technical details
An out-of-bounds (OOB) heap read exists in wolfSSL's ParseCertRelative() function during the verification of certificates using SM3wSM2 signatures. The vulnerability occurs in the Subject Key Identifier computation, which attempts to read the trailing 65 bytes of the public key without verifying the key's actual length. If a certificate is provided with a public key shorter than 65 bytes, the pointer arithmetic underflows, causing CalcHashId_ex to read memory preceding the buffer. This can result in an application crash (DoS). The issue specifically affects builds compiled with SM2 support (--enable-sm2 or --enable-all) and was addressed in version 5.9.1.
Affected products
- wolfSSL wolfSSL 5.6.4 to 5.9.0
Timeline
- 2026-06-08: other: Pull request submitted to wolfSSL repository
- 2026-06-10: patched: Fix merged into master branch
- 2026-06-25: advisory: CVE published and NVD entry created