CVE-2026-73567
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.
Scoring
- Severity
- CRITICAL
- CVSS base score
- 9.1
- CVSS vector
- CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N
- EPSS probability
- 0.32%
- CWE
- CWE-338
- Published
- 2026-08-13
- Last modified
- 2026-08-14
Affected products
- JuneAndGreen sm-crypto
Weakness type
Related vulnerabilities
- CVE-2026-74887 — openssl_encrypt before 1.4.0 Insecure Random Import in PQC Module
- CVE-2026-74874 — openssl_encrypt before 1.4.0 Weak PRNG Steganography Pixel Selection
- CVE-2026-18611 — Data-science-pipelines-operator: dspo: cryptographically weak secret generation (math/rand) for db and s3 credentials
- CVE-2026-71851 — crypto-js: Insufficient Entropy in Cryptographic Secret Generation via Vulnerable CryptoJS Dependency Chain
- CVE-2026-9205 — Langflow is affected by weaknesses in secret handling and sensitive configuration access
- CVE-2026-64798 — Joomla Extension - regularlabs.com - Insecure login URL keys in IP login extension
- CVE-2026-16615 — Librest: weak random number generation in pkce implementation
- CVE-2026-8169 — ExtremeXOS Debug-Mode Privilege Escalation via Weak PRNG