# CVE-2026-22698: RustCrypto SM2-PKE has 32-bit Biased Nonce Vulnerability

- Severity: High 8.7 (CVSS:4.0, scored by GitHub_M) `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`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.27%, higher than 21% of CVEs (2026-12-02)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2026-01-09T22:27:50.000Z
- Modified: 2026-06-17T10:20:15.333Z
- Also known as: GHSA-w3g8-fp6j-wvqw
- Weaknesses: CWE-331
- SSVC (CISA-ADP): exploitation none, automatable yes, technical impact partial
- Assigned by: GitHub_M

## 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.

(As written by CVE List.)

## Affected

- RustCrypto elliptic-curves: = 0.14.0-pre.0; = 0.14.0-rc.0
- sm2 (crates.io): from 0.14.0-pre.0 up to 0.14.0-rc.4
- rustcrypto sm2_elliptic_curve: 0.14.0

## Every score

- GitHub_M: CVSS:4.0 8.7 High `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`
- GitHub: CVSS:4.0 High `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`
- NVD: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N`

## References

- <https://github.com/RustCrypto/elliptic-curves/security/advisories/GHSA-w3g8-fp6j-wvqw> (exploit, mitigation, vendor-advisory, web)
- <https://github.com/RustCrypto/elliptic-curves/pull/1600> (issue-tracking, patch, web)
- <https://github.com/RustCrypto/elliptic-curves/commit/4781762f23ff22ab34763410f648128055c93731> (patch, web)
- <https://github.com/RustCrypto/elliptic-curves/commit/e4f77788130d065d760e57fb109370827110a525> (patch, web)
- <https://crates.io/crates/sm2/0.14.0-pre.0> (release-notes, web)
- <https://crates.io/crates/sm2/0.14.0-rc.0> (release-notes, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2026-22698> (advisory)
- <https://github.com/RustCrypto/elliptic-curves> (package)

## Sources

- CVE List: [CVE-2026-22698](https://www.cve.org/CVERecord?id=CVE-2026-22698), CVE Terms of Use, modified 2026-01-12
- GitHub Advisory Database: [GHSA-w3g8-fp6j-wvqw](https://github.com/advisories/GHSA-w3g8-fp6j-wvqw), CC-BY-4.0, modified 2026-02-03
- NVD: [CVE-2026-22698](https://nvd.nist.gov/vuln/detail/CVE-2026-22698), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2026-22698 · Whole record: https://cve.day/CVE-2026-22698.json · Rebuilt by cve.day 2026-11-25T22:59:12.717Z
