CVE-2026-23965

False Positive: The sm-crypto Signature Forgery Exploit

Amit Schendel
Amit Schendel
Senior Security Researcher

Jan 21, 2026·5 min read·13 visits

Executive Summary (TL;DR)

The `sm-crypto` library (used for Chinese National Standard SM2 crypto) defaulted to treating input messages as raw hashes rather than data to be hashed. This allows attackers to perform a mathematical signature forgery. By calculating a specific 'message' based on the target public key, they can bypass authentication entirely. Fixed in version 0.4.0.

A critical flaw in the sm-crypto JavaScript library allows attackers to forge valid SM2 digital signatures for any public key. By exploiting an insecure default configuration that bypasses message hashing, an attacker can craft a specific input 'message' and signature pair that mathematically satisfies the verification equation without possessing the private key.

Official Patches

Fix Analysis (1)

Technical Appendix

CVSS Score
7.5/ 10
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N

Affected Systems

sm-crypto < 0.4.0Node.js applications using SM2 signatures via sm-cryptoFrontend JavaScript applications using sm-crypto for client-side signing

Affected Versions Detail

Product
Affected Versions
Fixed Version
sm-crypto
JuneAndGreen
< 0.4.00.4.0
AttributeDetail
CWE IDCWE-347
Attack VectorNetwork
CVSS Score7.5 (High)
ImpactIntegrity / Authentication Bypass
Exploit StatusPoC Available
Fix ComplexityLow (Config Change)
CWE-347
Improper Verification of Cryptographic Signature

The product does not verify, or incorrectly verifies, the cryptographic signature of data, allowing the data to be modified or spoofed.

Vulnerability Timeline

Fix committed to GitHub
2026-01-20
GHSA-hpwg-xg7m-3p6m published
2026-01-21
CVE-2026-23965 assigned
2026-01-21

Subscribe to updates

Get the latest CVE analysis reports delivered to your inbox.