CVE-2026-73567
published critical CVSS 3.1 · 9.1sm-crypto: Predictable SM2 key generation in Node.js: default RNG uses Math.random + wall clock
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| JuneAndGreen | — | sm-crypto< 0.5.0 | Affected | Not stated | GitHub_M |
Description
sm-crypto provides JavaScript implementations of the Chinese cryptographic algorithms SM2, SM3, and SM4. Prior to 0.5.0, the default no-argument sm2.generateKeyPairHex() path in Node.js uses the module-wide SecureRandom instance in src/sm2/utils.js, supplied by [email protected], which seeds an ARC4 stream from Math.random() and new Date().getTime() because window.crypto.getRandomValues is unavailable even though globalThis.crypto exists. An attacker who can observe the process's Math.random() outputs and estimate the key-generation time can reconstruct the seed, recover generated SM2 private keys, and predict signing ephemeral scalars used to forge signatures. This issue is fixed in version 0.5.0.
Related advisories
Vendor advisories explicitly linked to this CVE.
No linked advisories were found for this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 3.1
- Base score
- 9.1 / 10
- Severity
- critical
- Provider
- GitHub_M · cna
- Vector string
- CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| JuneAndGreen | sm-crypto | < 0.5.0 (affected) | GitHub_M · cna |
Weaknesses
1- CWE-338 CWE-338: Use of Cryptographically Weak Pseudo-Random Number Generator (PRNG)
References
2Provider assertions
2GitHub_M · cna
sm-crypto: Predictable SM2 key generation in Node.js: default RNG uses Math.random + wall clock
CISA-ADP · adp
CISA ADP Vulnrichment
Provenance
- Schema
- 5.2
- Searchable
- yes
- Content hash
- ec56d83f395ce5c014844634b40acdbe382b8a0a9e603412025ffa8fac502b94
- Ingested
- 23 Sep 2026, 09:30:42 UTC
- Source record
- Official CVE record