Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

CVE-2026-22698: CWE-331: Insufficient Entropy in RustCrypto elliptic-curves

0
High
VulnerabilityCVE-2026-22698cvecve-2026-22698cwe-331
Published: Sat Jan 10 2026 (01/10/2026, 05:17:19 UTC)
Source: CVE Database V5
Vendor/Project: RustCrypto
Product: elliptic-curves

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.

AI-Powered Analysis

AILast updated: 01/10/2026, 05:44:27 UTC

Technical Analysis

RustCrypto's elliptic-curves library provides general-purpose elliptic curve cryptography support, including implementations of various curves and cryptographic operations. In versions 0.14.0-pre.0 and 0.14.0-rc.0, a critical vulnerability (CVE-2026-22698) was discovered in the SM2 Public Key Encryption (PKE) implementation. The root cause is a unit mismatch error in the nonce generation function, which causes it to request only 32 bits of randomness instead of the expected 256 bits. This insufficient entropy (CWE-331) drastically reduces the security of the ephemeral nonce k from a cryptographically strong 128-bit level to a trivial 16-bit level. Since the ephemeral nonce is critical for the security of SM2 encryption, this weakness allows an attacker to feasibly recover the nonce k by brute force or other cryptanalysis methods. Once the nonce is recovered, the attacker can decrypt any ciphertext encrypted under that nonce using only the public key and ciphertext, without requiring authentication or user interaction. This compromises the confidentiality of encrypted data. The vulnerability has been assigned a CVSS 4.0 score of 8.7 (high severity) due to its network attack vector, no required privileges or user interaction, and high impact on confidentiality. The issue was patched in a subsequent commit (e4f7778). No known exploits have been reported in the wild yet, but the weakness is straightforward to exploit given the drastically reduced entropy. Organizations using the affected RustCrypto versions for SM2 encryption should urgently upgrade and audit their cryptographic implementations to prevent data exposure.

Potential Impact

The primary impact of CVE-2026-22698 is the compromise of confidentiality for data encrypted using the vulnerable SM2 PKE implementation in RustCrypto elliptic-curves versions 0.14.0-pre.0 and 0.14.0-rc.0. Attackers can recover the ephemeral nonce due to severely reduced entropy, enabling decryption of intercepted ciphertexts without needing private keys or authentication. For European organizations, this poses a significant risk to sensitive communications, intellectual property, and personal data protected by SM2 encryption. Industries such as finance, telecommunications, government, and critical infrastructure that rely on ECC for secure communications could face data breaches and regulatory non-compliance under GDPR. The vulnerability could also undermine trust in cryptographic libraries and software supply chains that incorporate RustCrypto. Although no exploits are currently known in the wild, the ease of exploitation and high confidentiality impact make this a pressing threat. Failure to patch could lead to targeted espionage, data theft, and disruption of secure services across Europe.

Mitigation Recommendations

1. Immediately upgrade RustCrypto elliptic-curves to a patched version beyond 0.14.0-rc.0 where the nonce entropy issue is fixed (commit e4f7778 or later). 2. Audit all cryptographic implementations and dependencies to identify usage of the vulnerable versions, especially where SM2 encryption is employed. 3. Replace or re-encrypt any sensitive data encrypted with the vulnerable versions to prevent retrospective decryption. 4. Implement cryptographic best practices including using well-vetted libraries and verifying cryptographic parameters and entropy sources. 5. Monitor software supply chains and dependency updates to detect and remediate vulnerable components promptly. 6. Educate developers and security teams on the importance of entropy in cryptographic operations and the risks of unit mismatches or similar coding errors. 7. Consider deploying additional layers of encryption or key management controls to mitigate risks from compromised cryptographic primitives. 8. Engage with RustCrypto maintainers and community for updates and security advisories.

Need more detailed analysis?Upgrade to Pro Console

Technical Details

Data Version
5.2
Assigner Short Name
GitHub_M
Date Reserved
2026-01-08T19:23:09.856Z
Cvss Version
4.0
State
PUBLISHED

Threat ID: 6961e3b319784dcf52ed654c

Added to database: 1/10/2026, 5:29:23 AM

Last enriched: 1/10/2026, 5:44:27 AM

Last updated: 1/10/2026, 10:00:17 PM

Views: 20

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console in Console -> Billing for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats