{"cve":"CVE-2026-22698","nvd":{"published":"2026-01-10T06:15:52.220","modified":"2026-06-17T10:20:15.333","status":"Analyzed","description":"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.","cvss_v4":{"vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N","score":8.7},"cvss_v3":{"version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","score":7.5},"cwes":["CWE-331"],"references":["https://crates.io/crates/sm2/0.14.0-pre.0","https://crates.io/crates/sm2/0.14.0-rc.0","https://github.com/RustCrypto/elliptic-curves/commit/4781762f23ff22ab34763410f648128055c93731","https://github.com/RustCrypto/elliptic-curves/commit/e4f77788130d065d760e57fb109370827110a525","https://github.com/RustCrypto/elliptic-curves/pull/1600"],"products":["rustcrypto:sm2_elliptic_curve"],"source":"nvd","synced_at":"2026-10-19T22:19:41.481987139+00:00"},"epss":{"cve":"CVE-2026-22698","score":0.00274,"percentile":0.19863,"date":"2026-10-31"},"kev":null,"osv":[{"id":"GHSA-w3g8-fp6j-wvqw","url":"https://osv.dev/vulnerability/GHSA-w3g8-fp6j-wvqw","summary":"SM2-PKE has 32-bit Biased Nonce Vulnerability","modified":"2026-02-03T03:16:01.016772Z","packages":[{"ecosystem":"crates.io","name":"sm2","purl":"pkg:cargo/sm2","ranges":[">=0.14.0-pre.0 <=0.14.0-rc.4"],"fixed":[]}]}],"attribution":["This product uses the NVD API but is not endorsed or certified by the NVD.","EPSS scores: FIRST Exploit Prediction Scoring System, https://www.first.org/epss","Known exploited vulnerabilities: CISA Known Exploited Vulnerabilities Catalog, https://www.cisa.gov/known-exploited-vulnerabilities-catalog","Package advisories: OSV (https://osv.dev), from the GitHub Advisory Database, PyPA, Go, RustSec and other ecosystem databases, under CC-BY 4.0 or CC0","CVE records: the CVE Program's CVE List (https://www.cve.org), under its terms of use (https://www.cve.org/Legal/TermsOfUse). CVE is a registered trademark of The MITRE Corporation; this product is not affiliated with the CVE Program."]}