CVE-2026-22698 Details
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.
A critical vulnerability exists in the RustCrypto SM2 Public Key Encryption (PKE) implementation, specifically in versions 0.14.0-pre.0 and 0.14.0-rc.0. The issue arises because the ephemeral nonce 'k' is generated with significantly reduced entropy due to a unit mismatch error. This error causes the nonce generation function to request only 32 bits of randomness instead of the required 256 bits, compromising the encryption's security. As a result, an attacker can recover the nonce 'k' and decrypt any ciphertext using just the public key and ciphertext.
Users can update to the latest version of the RustCrypto SM2 library, where this vulnerability has been fixed. Instructions for updating can be found in the RustCrypto SM2 repository.
Metrics
CVSS 4.0 Severity and Vector Strings:
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
CISA-ADP
Assessed Jan 12, 2026References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-331 | Insufficient Entropy | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| rustcrypto sm2 elliptic curve | 0.14.0 pre0 0.14.0 rc0 |
CPE
Remediation
| |
Change History
4 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Jun 17, 2026 | CVE Modified | [email protected] |
| Jun 17, 2026 | CVE Modified | CISA-ADP |
| Mar 12, 2026 | Initial Analysis | [email protected] |
| Jan 10, 2026 | New CVE Received | [email protected] |