Vulnerability · Published Jan 22, 2026 · Assigned by GitHub_M
CVE-2026-23965sm-crypto Affected by Signature Forgery in SM2-DSA
High 7.5
In plain English
A high-severity security flaw in sm-crypto from JuneAndGreen. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.2% (higher than 12% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official description
sm-crypto provides JavaScript implementations of the Chinese cryptographic algorithms SM2, SM3, and SM4. A signature forgery vulnerability exists in the SM2 signature verification logic of sm-crypto prior to version 0.4.0. Under default configurations, an attacker can forge valid signatures for arbitrary public keys. If the message space contains sufficient redundancy, the attacker can fix the prefix of the message associated with the forged signature to satisfy specific formatting requirements. Version 0.4.0 patches the issue.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| npm | sm-crypto | 0.4.0 | GHSA-hpwg-xg7m-3p6m |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| JuneAndGreen | sm-crypto | < 0.4.0 |
Weakness: CWE-347 · Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N