Skip to main content
EPSS 0.4%top 64%

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

The sm-crypto JavaScript library for Chinese cryptographic algorithms SM2, SM3, and SM4 has a critical vulnerability in versions prior to 0.5.0. The default key generation in Node.js uses a cryptographically weak pseudo-random number generator seeded from Math.random() and the current time, allowing attackers who can observe Math.random() outputs and estimate key generation time to recover private keys and forge signatures. This 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

JuneAndGreen

sm-crypto

Affected versions
<0.5.0
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/21/2026, 13:31:42 UTC

Technical Analysis

sm-crypto versions before 0.5.0 use a module-wide SecureRandom instance seeded by an ARC4 stream derived from Math.random() and new Date().getTime() due to the unavailability of window.crypto.getRandomValues in Node.js, despite globalThis.crypto existing. This weak seeding method allows attackers who can observe Math.random() outputs and approximate the key generation time to reconstruct the seed, recover SM2 private keys, and predict ephemeral signing scalars, enabling signature forgery. The vulnerability is identified as CWE-338 (Use of Cryptographically Weak PRNG). It is fixed in version 0.5.0.

Potential Impact

An attacker capable of observing the process's Math.random() outputs and estimating the key generation time can reconstruct the seed used for key generation, recover SM2 private keys, and predict ephemeral signing scalars. This compromises the confidentiality of private keys and the integrity of digital signatures, allowing signature forgery. There is no indication of active exploitation in the wild.

Mitigation Recommendations

Upgrade to sm-crypto version 0.5.0 or later, where this issue is fixed by using a secure random number generator. No other mitigations are indicated.

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

Threat ID: 6a7e058ebf8831d5399500fc

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

Last enriched: 08/21/2026, 13:31:42 UTC

Last updated: 09/26/2026, 13:47:48 UTC

Views: 69

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