# CVE-2026-73567: sm-crypto: Predictable SM2 key generation in Node.js: default RNG uses Math.random + wall clock

- Severity: Critical 9.1 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.32%, higher than 27% of CVEs (2026-12-01)
- Published: 2026-07-24T21:50:45.000Z
- Modified: 2026-10-24T15:10:00.190Z
- Also known as: GHSA-vh45-f885-3848
- Weaknesses: CWE-338
- SSVC (CISA-ADP): exploitation none, automatable yes, technical impact total
- Assigned by: 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 jsbn@1.1.0, 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.

(As written by CVE List.)

## Affected

- JuneAndGreen sm-crypto: < 0.5.0
- sm-crypto (npm): before 0.5.0

## Every score

- GitHub_M: CVSS:3.1 9.1 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N`
- GitHub: CVSS:3.1 9.1 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N`

## References

- <https://github.com/JuneAndGreen/sm-crypto/security/advisories/GHSA-vh45-f885-3848> (web)
- <https://github.com/JuneAndGreen/sm-crypto/commit/1f9bd7bd160c24efd9c26c8f7fda997c68c823d0> (web)
- <https://github.com/JuneAndGreen/sm-crypto> (package)

## Sources

- CVE List: [CVE-2026-73567](https://www.cve.org/CVERecord?id=CVE-2026-73567), CVE Terms of Use, modified 2026-08-14
- GitHub Advisory Database: [GHSA-vh45-f885-3848](https://github.com/advisories/GHSA-vh45-f885-3848), CC-BY-4.0, modified 2026-08-13
- NVD: [CVE-2026-73567](https://nvd.nist.gov/vuln/detail/CVE-2026-73567), Public domain, modified 2026-10-24

---

Page: https://cve.day/CVE-2026-73567 · Whole record: https://cve.day/CVE-2026-73567.json · Rebuilt by cve.day 2026-11-25T22:59:32.816Z
