Crypto Vulnerability in sm-crypto JavaScript Implementations by JuneAndGreen
CVE-2026-73567
9.1CRITICAL
What is CVE-2026-73567?
The sm-crypto library, known for its implementations of Chinese cryptographic algorithms SM2, SM3, and SM4, contains a significant vulnerability in its key generation process. Prior to version 0.5.0, the function sm2.generateKeyPairHex() used a potentially insecure module-wide SecureRandom instance powered by jsbn@1.1.0. Due to reliance on Math.random() and Date.getTime() for random seeding, an attacker could predictably reconstruct the seed values, allowing them to recover private keys and forecast signing ephemeral scalars. This flaw could facilitate the forging of signatures. The issue has been addressed and resolved in the latest version 0.5.0.
Affected Version(s)
sm-crypto < 0.5.0
