{"items":[{"id":"NVI-00015331","kind":"vulnerability","title":"sm-crypto: Predictable SM2 key generation in Node.js: default RNG uses Math.random + wall clock","revision":1,"unknowns":["Customer inventory, deployment, reachability and exploitation have not been inspected."],"lifecycle":"active","identifiers":["GHSA-vh45-f885-3848","CVE-2026-73567"],"plain_summary":"GitHub lists this reviewed advisory for sm-crypto. Published version ranges and source prerequisites are shown below; this is not an inspection of a visitor’s application.","review_status":"source_listed","control_topics":[],"public_actions":[{"summary":"Identify the exact component and deployed version, examine the linked publisher’s conditions, and retain evidence of any mitigation.","source_ids":["sr-5bcde21eff3b9c163ca1876287923423"],"action_type":"investigate","limitations":"Confirm current vendor support, compatibility and deployment evidence. This report has not tested a fix in your system.","current_supported_target":null}],"schema_version":"1.1.0","source_metrics":[{"kind":"CVSS","as_of":"2026-08-13T17:41:01.000Z","value":"9.1 critical","meaning":"GitHub source severity; exploitability and local consequence require separate evidence.","source_id":"sr-5bcde21eff3b9c163ca1876287923423"}],"why_it_matters":"Published affected context helps an owner decide what evidence to gather. This report has not examined your application.","related_sources":[{"id":"sr-5bcde21eff3b9c163ca1876287923423","url":"https://github.com/advisories/GHSA-vh45-f885-3848","basis":"vendor_advisory","notes":"GitHub Advisory Database; CC-BY-4.0. Each advisory links its original attribution. Null normalizes fields.","title":"GHSA-vh45-f885-3848","publisher":"GitHub Advisory Database","observed_at":"2026-11-02T20:16:47.162Z"}],"affected_context":[{"certainty":"source_listed","source_ids":["sr-5bcde21eff3b9c163ca1876287923423"],"technology":"sm-crypto","known_exclusions":[],"conditions_summary":"## Summary\n\n`sm-crypto` (npm package **0.4.0**, the latest release, published 2026-01-20)\ngenerates SM2 private keys and signing ephemeral scalars from a single\nmodule-wide RNG instance (`src/sm2/utils.js`: `const rng = new SecureRandom()`).\n`SecureRandom` is jsbn's PRNG, which seeds an **ARC4** stream from\n`window.crypto.getRandomValues` when available. **In Node.js — sm-crypto's\nprimary runtime — `window` is `undefined`, so the CSPRNG branch is skipped**\nand the seed pool is instead filled from `Math.random()` (V8 `xorshift128+`,\nrecoverable from a few outputs) plus `new Date().getTime()` (wall clock,\nattacker-estimable).\n\nNode *does* expose Web Crypto as `globalThis.crypto`, but jsbn checks\n`window.crypto`, not `globalThis.crypto`, so the secure path is never taken.\nConsequently every SM2 private key produced by the default\n`sm2.generateKeyPairHex()` and every signing ephemeral scalar is derived from\nnon-cryptographic sources and is **predictable** by an attacker who can observe\na few `Math.random()` outputs and estimate the generation time.\n\nThis is the library's **default** (no-argument) path; no caller-selected\nparameter or configuration is required to trigger it. It is repro","public_affected_ranges":["< 0.5.0"]}],"null_published_at":"2026-11-03T10:03:26.570Z","source_updated_at":"2026-08-13T17:41:01.000Z","source_disclosed_at":"2026-07-24T21:50:45.000Z","is_synthetic_fixture":false,"null_last_reviewed_at":null,"public_change_summary":"First indexed by Null; source disclosure date is shown separately.","null_first_observed_at":"2026-11-02T20:16:47.162Z"}],"next_cursor":null,"snapshot_revision":"42594"}