CVE-2026-73567

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.
Configurations

No configuration.

History

23 Oct 2026, 18:10

Type Values Removed Values Added
Summary
  • (es) sm-crypto proporciona implementaciones de JavaScript de los algoritmos criptográficos chinos SM2, SM3 y SM4. Antes de la versión 0.5.0, la ruta predeterminada sin argumentos de sm2.generateKeyPairHex() en Node.js utiliza la instancia SecureRandom de ámbito de módulo en src/sm2/utils.js, proporcionada por jsbn@1.1.0, que inicializa un flujo ARC4 a partir de Math.random() y new Date().getTime() porque window.crypto.getRandomValues no está disponible aunque globalThis.crypto exista. Un atacante que puede observar las salidas de Math.random() del proceso y estimar el tiempo de generación de claves puede reconstruir la semilla, recuperar las claves privadas SM2 generadas y predecir los escalares efímeros de firma utilizados para falsificar firmas. Este problema está solucionado en la versión 0.5.0.

Information

Published : 2026-08-13 18:18

Updated : 2026-10-24 15:10


NVD link : CVE-2026-73567

Mitre link : CVE-2026-73567

CVE.ORG link : CVE-2026-73567


JSON object : View

Products Affected

No product.

CWE
CWE-338

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