1. Home
  2. Vulnerabilities
  3. CVE-2026-22698

CVE-2026-22698

RustCrypto: Elliptic Curves is general purpose Elliptic Curve Cryptography (ECC) support, including types and…

Published 10 Jan 2026 · modified 17 Jun 2026 · Sources: NVD, CNA (vendor or assigner), EPSS (FIRST)

Medium 43/100

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.

Affected products and versions

Rustcrypto (1 line(s))
Rustcrypto
ProductVersionsFixed inSource
Sm2 elliptic curve 0.14.0 — NVD

Fix

Not provided by the vendor.

Workaround

No workaround provided.

Check whether you are affected

Exploit reported by sources

These links are tagged “exploit” by the NVD or CVE.org. We have neither verified nor copied them; open with care.

Timeline

  1. — CVE published (cve)

References

Data provenance

Status
NVD
Publication date
NVD
Description
NVD
CVSS score
NVD
Weakness (CWE)
CNA (vendor or assigner)
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N (CVSS 3.1, NVD)
Weakness
CWE-331 · Autre (CWE-331)

How this data is obtained and calculated