Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

CVE-2026-73567: CWE-338: Use of Cryptographically Weak Pseudo-Random Number Generator (PRNG) in JuneAndGreen sm-crypto

0
Critical
VulnerabilityCVE-2026-73567cvecve-2026-73567cwe-338
Published: 08/13/2026 (08/13/2026, 17:40:54 UTC)
Source: CVE Database V5
Vendor/Project: JuneAndGreen
Product: sm-crypto

Description

A cryptographic weakness exists in sm-crypto versions prior to 0.5.0 where the default SM2 key pair generation in Node.js uses a weak pseudo-random number generator seeded from predictable sources. This flaw allows attackers who can observe Math.random() outputs and estimate key generation time to recover private keys and forge signatures. The issue is fixed in version 0.5.0.

CVSS v3.1

Score 9.1critical

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
None
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N

Affected software

sm-crypto
pkg:npm/sm-crypto
Affected versions
<0.5.0

Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 08/13/2026, 18:11:17 UTC

Technical Analysis

The sm-crypto JavaScript library implements Chinese cryptographic algorithms SM2, SM3, and SM4. Before version 0.5.0, the default no-argument call to sm2.generateKeyPairHex() in Node.js uses a module-wide SecureRandom instance from [email protected], which seeds an ARC4 stream cipher using Math.random() and the current time (new Date().getTime()). Because window.crypto.getRandomValues is unavailable in this context despite globalThis.crypto existing, the randomness source is weak. An attacker who can observe the process's Math.random() outputs and approximate the key generation time can reconstruct the seed, recover SM2 private keys, and predict ephemeral signing scalars, enabling signature forgery. This vulnerability is addressed in sm-crypto version 0.5.0.

Potential Impact

Exploitation allows an attacker to recover SM2 private keys generated by the vulnerable sm-crypto library and predict ephemeral signing scalars, enabling the forgery of digital signatures. This compromises the confidentiality and integrity of cryptographic operations relying on SM2 keys generated by affected versions.

Mitigation Recommendations

Upgrade to sm-crypto version 0.5.0 or later, where the weak pseudo-random number generator usage in key generation has been fixed. No other mitigations are specified.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Data Version
5.2
Assigner Short Name
GitHub_M
Date Reserved
2026-08-12T20:53:46.381Z
Cvss Version
3.1
State
PUBLISHED
Remediation Level
null

Threat ID: 6a7e058ebf8831d5399500fc

Added to database: 08/13/2026, 17:57:34 UTC

Last enriched: 08/13/2026, 18:11:17 UTC

Last updated: 08/13/2026, 19:30:01 UTC

Views: 5

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses