Skip to main content
CVE-2026-73567 CRITICAL CVSS 9.1 Node.js Verified Advisory

Predictable SM2 key generation in sm-crypto via weak Node.js RNG (CVE-2026-73567)

The sm-crypto npm package's default `sm2.generateKeyPairHex()` path in Node.js seeds its module-wide SecureRandom instance (from jsbn) using `Math.random()` and `Date.getTime()` instead of a cryptographically secure source, because jsbn checks `window.crypto` rather than `globalThis.crypto`, bypassing the CSPRNG path entirely in Node.js. An attacker who can observe the process's `Math.random()` outputs and estimate key-generation time can reconstruct the seed, recover generated SM2 private keys, and predict signing ephemeral scalars. No caller-selected parameter or configuration is required to trigger this vulnerability; it is exercised by the default no-argument call path. Affected versions: - <0.4.0 We recommend updating to: 0.5.3. CVSS 9.1 · our assessment: act_now Reference: https://github.com/JuneAndGreen/sm-crypto/security/advisories/GHSA-vh45-f885-3848 Details: https://vuln.today/cve/CVE-2026-73567

Verified by vuln.today against published advisories.

Affected versions

  • – <0.4.0

Fixed in: 0.5.3

Full CVE analysis Reference Published Aug 13, 2026

← All verified advisories

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy