RustCrypto SM2-PKE has 32-bit Biased Nonce Vulnerability
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- None
- Attack complexity
- Low
- Attack requirements
- None
- Impact type
- —
- Confidentiality · integrity · availability
- High · None · None
- Fix status
- No fix listed
Attack profile from CVSS 4.0 · CNA. Fix status from CNA and GitHub.
Summary
RustCrypto: Elliptic Curves is general purpose Elliptic Curve Cryptography (ECC) support, including types and traits for representing various elliptic curve forms, scalars, points, and public/secret keys composed thereof. In versions 0.14.0-pre.0 and 0.14.0-rc.0, a critical vulnerability exists in the SM2 Public Key Encryption (PKE) implementation where the ephemeral nonce k is generated with severely reduced entropy. A unit mismatch error causes the nonce generation function to request only 32 bits of randomness instead of the expected 256 bits. This reduces the security of the encryption from a 128-bit level to a trivial 16-bit level, allowing a practical attack to recover the nonce k and decrypt any ciphertext given only the public key and ciphertext. This issue has been patched via commit e4f7778.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- None
- Automatable
- Yes
- Technical impact
- Partial
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| RustCrypto | elliptic-curves | = 0.14.0-pre.0; = 0.14.0-rc.0 | — | No fix listed | CNA |
| — | sm2 (crates.io) | 0.14.0-pre.0 – 0.14.0-rc.4 | — | No fix listed | GHSA-w3g8-fp6j-wvqw |
- elliptic-curves VendorRustCrypto Affected = 0.14.0-pre.0; = 0.14.0-rc.0 Fixed in — No fix listed CNA
- sm2 (crates.io) Vendor— Affected 0.14.0-pre.0 – 0.14.0-rc.4 Fixed in — No fix listed GHSA-w3g8-fp6j-wvqw
CPE configurations NVD · 2
| CPE | Versions | Role | Vendor |
|---|---|---|---|
| cpe:2.3:a:rustcrypto:sm2_elliptic_curve:0.14.0:pre0:*:*:*:rust:*:* | 0.14.0 pre0 | Vulnerable | RustCrypto |
| cpe:2.3:a:rustcrypto:sm2_elliptic_curve:0.14.0:rc0:*:*:*:rust:*:* | 0.14.0 rc0 | Vulnerable | RustCrypto |
- cpe:2.3:a:rustcrypto:sm2_elliptic_curve:0.14.0:pre0:*:*:*:rust:*:* Versions 0.14.0 pre0 Vulnerable ·RustCrypto
- cpe:2.3:a:rustcrypto:sm2_elliptic_curve:0.14.0:rc0:*:*:*:rust:*:* Versions 0.14.0 rc0 Vulnerable ·RustCrypto
Remediation
No fixed version listed by the sources yet.
Timeline
- 2026-10-02 Threatist record created from CVE-2026-22698
- 2026-10-03 Alias added: GHSA-w3g8-fp6j-wvqw
References
Patch 3
More RustCrypto Sm2 Elliptic Curve vulnerabilities
- TI-2026-18227 RustCrypto Has Insufficient Length Validation in decrypt() in SM2-PKE CVSS 3.1HIGH 7.5
- TI-2026-18226 RustCrypto SM2-PKE has Unchecked AffinePoint Decoding (unwrap) in decrypt() CVSS 3.1HIGH 7.5
Sources
- CVE-2026-22698 · CVE Program
- CVE-2026-22698 · NVD
- FIRST EPSS
- GHSA-w3g8-fp6j-wvqw · GitHub Advisory Database · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences