CVE-2026-73567
Received Received - Intake

Key Reuse Vulnerability in sm-crypto Library

Vulnerability report for CVE-2026-73567, including description, CVSS score, EPSS score, affected products, exploitability, helpful resources, and attack-flow context.

Publication date: 2026-08-13

Last updated on: 2026-08-13

Assigner: GitHub, Inc.

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.

CVSS Scores

EPSS Scores

Probability:
Percentile:

Meta Information

Published
2026-08-13
Last Modified
2026-08-13
Generated
2026-08-13
AI Q&A
2026-08-13
EPSS Evaluated
N/A
NVD
EUVD

Affected Vendors & Products

Showing 1 associated CPE
Vendor Product Version / Range
sm-crypto sm-crypto 0.5.0

Helpful Resources

Exploitability

CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-338 The product uses a Pseudo-Random Number Generator (PRNG) in a security context, but the PRNG's algorithm is not cryptographically strong.

Attack-Flow Graph

AI Quick Actions

Instant insights powered by AI
Executive Summary

This vulnerability affects the sm-crypto npm package versions before 0.5.0. It involves weak random number generation in SM2 key creation for Node.js. The library uses a predictable RNG seeded by Math.random() and system time instead of a secure source. Attackers can predict private keys and forge signatures by observing Math.random() outputs and estimating generation time.

Detection Guidance

Check if your system uses sm-crypto versions prior to 0.5.0 by running npm list sm-crypto. If installed, verify if SM2 key generation is used in Node.js applications. Look for predictable Math.random() outputs or unusual key generation patterns in logs.

Impact Analysis

If you use sm-crypto <0.5.0 in Node.js, attackers could recover your SM2 private keys and forge digital signatures. This could allow unauthorized access to systems, data tampering, or impersonation. The impact requires no special privileges or user interaction, making it highly dangerous for applications relying on SM2 cryptography.

Compliance Impact

This vulnerability likely violates compliance requirements for cryptographic security in GDPR (data protection) and HIPAA (health data). Predictable keys undermine encryption integrity, potentially exposing sensitive data. Organizations using affected versions may face regulatory penalties for inadequate security controls.

Mitigation Strategies

Upgrade sm-crypto to version 0.5.0 or later using npm update sm-crypto. Replace any custom SM2 key generation logic with Node.js's crypto.randomBytes for secure randomness. Review and regenerate any potentially exposed SM2 keys or signatures.

Chat Assistant

Ask questions about this CVE
Hi! I’m here to help you understand CVE-2026-73567. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70

EPSS Chart