Read the docs
TI-2026-18225 Aliases CVE-2026-22698GHSA-w3g8-fp6j-wvqw

RustCrypto SM2-PKE has 32-bit Biased Nonce Vulnerability

Priority MEDIUM 43CWE-331Published · Updated

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

Exploitation None reported CISA SSVC · not in CISA KEV
EPSS 0.00274 19th percentileScored 2026-11-07
Public exploit Yes 1 exploit referenceTagged by NVD
Fix No fix listed No fixed version in the sources yet

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

VendorProductAffected versionsFixed inStatusSource
RustCryptoelliptic-curves= 0.14.0-pre.0; = 0.14.0-rc.0—No fix listedCNA
—sm2 (crates.io)0.14.0-pre.0 – 0.14.0-rc.4—No fix listedGHSA-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

CPEVersionsRoleVendor
cpe:2.3:a:rustcrypto:sm2_elliptic_curve:0.14.0:pre0:*:*:*:rust:*:*0.14.0 pre0VulnerableRustCrypto
cpe:2.3:a:rustcrypto:sm2_elliptic_curve:0.14.0:rc0:*:*:*:rust:*:*0.14.0 rc0VulnerableRustCrypto
  • 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

  1. 2026-10-02 Threatist record created from CVE-2026-22698
  2. 2026-10-03 Alias added: GHSA-w3g8-fp6j-wvqw

References

  • 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