GHSA-q349-x427-xg3w
An out-of-bounds heap read vulnerability occurs during SM2/SM3 certificate signature verification when parsing certificates with an SM3wSM2 signature. The Subject Key Identifier computation reads 65 trailing bytes of the public key without verifying the key length, causing a heap read beyond the buffer if the key is shorter than 65 bytes. This can lead to a denial of service via application crash. The issue affects only builds with SM2 support enabled.
AI Analysis
Technical Summary
CVE-2026-12340 is a vulnerability involving an out-of-bounds heap read during the verification of SM2/SM3 certificate signatures. Specifically, when a certificate with an SM3wSM2 signature is parsed, the Subject Key Identifier calculation reads the last 65 bytes of the public key without checking if the key length is sufficient. If the public key is shorter than 65 bytes, this results in an out-of-bounds heap read, potentially causing a crash (denial of service). There is no out-of-bounds write. This vulnerability affects only software builds compiled with SM2 support enabled (via --enable-sm2 or --enable-all).
Potential Impact
The vulnerability can cause a denial of service due to application crash triggered by an out-of-bounds heap read when processing specially crafted certificates with short public keys. There is no indication of memory corruption or code execution. No known exploits are reported in the wild.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until a fix is available, avoid processing certificates with SM3wSM2 signatures that contain public keys shorter than 65 bytes. If possible, disable SM2 support in builds to prevent exposure.
GHSA-q349-x427-xg3w
Description
An out-of-bounds heap read vulnerability occurs during SM2/SM3 certificate signature verification when parsing certificates with an SM3wSM2 signature. The Subject Key Identifier computation reads 65 trailing bytes of the public key without verifying the key length, causing a heap read beyond the buffer if the key is shorter than 65 bytes. This can lead to a denial of service via application crash. The issue affects only builds with SM2 support enabled.
CVSS v4.0
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
CVE-2026-12340 is a vulnerability involving an out-of-bounds heap read during the verification of SM2/SM3 certificate signatures. Specifically, when a certificate with an SM3wSM2 signature is parsed, the Subject Key Identifier calculation reads the last 65 bytes of the public key without checking if the key length is sufficient. If the public key is shorter than 65 bytes, this results in an out-of-bounds heap read, potentially causing a crash (denial of service). There is no out-of-bounds write. This vulnerability affects only software builds compiled with SM2 support enabled (via --enable-sm2 or --enable-all).
Potential Impact
The vulnerability can cause a denial of service due to application crash triggered by an out-of-bounds heap read when processing specially crafted certificates with short public keys. There is no indication of memory corruption or code execution. No known exploits are reported in the wild.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until a fix is available, avoid processing certificates with SM3wSM2 signatures that contain public keys shorter than 65 bytes. If possible, disable SM2 support in builds to prevent exposure.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- GHSA-q349-x427-xg3w
- Osv Schema Version
- 1.4.0
- Aliases
- ["CVE-2026-12340"]
- Ecosystems
- []
- Database Specific Severity
- MODERATE
- Cvss Version
- 4.0
Threat ID: 6a3ef7e827e9c79719032d38
Added to database: 06/26/2026, 22:06:32 UTC
Last enriched: 06/26/2026, 22:46:46 UTC
Last updated: 06/27/2026, 00:11:12 UTC
Views: 2
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.