LiveActive security incident?Get immediate response
CVE Record

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

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.

CriticalCVSS 9.1Not KEV-listedUpdated
Glexia's TakeAutomated analysiscritical

Security readout for executives and security teams

Plain-English summary

Affected Node.js applications may create guessable SM2 private keys and signing values because sm-crypto used weak randomness. An attacker meeting the observation and timing prerequisites could recover private keys or forge signatures, threatening confidentiality and trust in signed data. Version 0.5.0 fixes the issue.

Executive priority

Treat as an urgent cryptographic remediation where affected Node.js usage is confirmed. Prioritize systems whose SM2 keys protect sensitive data, authenticate services, or authorize high-impact transactions. Upgrade promptly, then assess historical keys and signatures; updating the package alone does not restore trust in previously exposed private keys.

Technical view

Before sm-crypto 0.5.0, no-argument sm2.generateKeyPairHex() in Node.js used jsbn's ARC4-based generator, seeded from Math.random() and wall-clock time. If an attacker observes relevant Math.random() outputs and estimates generation time, they may reconstruct the seed, recover SM2 private keys, and predict signing ephemeral scalars.

Likely exposure

Exposure is limited to Node.js deployments using sm-crypto versions below 0.5.0 and the default no-argument SM2 key-generation path. Keys and signatures produced through that weak module-wide random generator may require investigation. Browser behavior and callers supplying their own randomness are not established as affected by the bundle.

Exploitation context

The CVSS 3.1 score is 9.1, reflecting remote impact without required privileges or user interaction. Exploitation nevertheless depends on observing process Math.random() outputs and estimating key-generation time. The bundle marks this CVE as absent from KEV and provides no evidence of active exploitation.

Researcher notes

CWE-338 applies because security-sensitive values came from an insufficiently random generator. The documented failure chain is Node.js fallback to jsbn@1.1.0, ARC4 state seeded by Math.random() and current time, followed by use for SM2 keys and signing scalars. The supplied evidence does not quantify exploit prevalence or confirm attacks.

Mitigation direction

  • Upgrade sm-crypto to version 0.5.0 or later.
  • Identify Node.js services using affected sm-crypto versions.
  • Review uses of the no-argument sm2.generateKeyPairHex() path.
  • Assess and rotate SM2 private keys potentially generated under affected conditions.
  • Review trust in signatures created with potentially exposed keys.

Validation and detection

  • Confirm installed and locked sm-crypto versions are 0.5.0 or later.
  • Search application code for no-argument sm2.generateKeyPairHex() calls.
  • Verify whether affected calls executed in Node.js environments.
  • Inventory keys and signatures generated before remediation.
  • Confirm replacement keys no longer depend on the affected generator.
Prepared
Confidence
high
Sources
4

Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.

Potential ATT&CK relevance

Conservative CVE-to-ATT&CK context

These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.

ATT&CK lookup starting points

Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.

cwe · low confidence lookup

CWE-338: Exact CWE lookup

Use the exact CWE identifier as the starting point before reviewing related ATT&CK behavior. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.

Open ATT&CK lookup
cve · low confidence lookup

CVE-2026-73567 mapping review

Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.

Open ATT&CK lookup
Vulnerability profileCVE Program record
Severity
Critical
CVSS
9.1 (3.1)
Known Exploited
No
Published

Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N

Official CVE source material

CNA and ADP enrichment extracted from CVE v5

These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.

1CVSS vectors
3Timeline events
1ADP providers
3Source links

SSVC decision data

CISA-ADPCISA Coordinator
Timestamp
Version
2.0.3
Exploitation: noneAutomatable: yesTechnical Impact: total

CVSS vector scores

1 official score

We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.

ScoreVersionSeverityVectorExploitImpactSource
9.1CVSS 3.1CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N3.95.2GitHub_M

Vulnerability scoring details

Base CVSS 3.1 score

9.1Critical
CVSS 3.1 vector shape for CVE-2026-73567Attack VectorAttack ComplexityPrivileges RequiredUser InteractionScopeConfidentiality ImpactIntegrity ImpactAvailability Impact

Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N

Attack Vector
NetworkAdjacentLocalPhysical
Attack Complexity
LowHigh
Privileges Required
NoneLowHigh
User Interaction
NoneRequired
Scope
ChangedUnchanged
Confidentiality Impact
HighLowNone
Integrity Impact
HighLowNone
Availability Impact
HighLowNone

Vulnerability timeline

Timeline events are normalized from CVE metadata, CNA source timelines, ADP timelines, and KEV metadata when present.

  1. CVE reservedCVE Program

    The CVE ID was reserved by the assigning CNA.

  2. CVE publishedCVE Program

    The CVE record was published.

  3. CVE updatedCVE Program

    The CVE record metadata indicates this as the latest update time.

ADP provider summaries

CISA-ADPCISA ADP Vulnrichment
other:ssvc
Affected products

Products and packages named in the record

VendorProductVersion / packageStatus
JuneAndGreensm-crypto< 0.5.0Listed
Weakness

CWE details

CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.

CWE-338 · source CWE mapping

Use of Cryptographically Weak Pseudo-Random Number Generator (PRNG)

Use of Cryptographically Weak Pseudo-Random Number Generator (PRNG) represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.