Vulnerability DatabaseGHSA-wf5j-8r63-pr27

GHSA-wf5j-8r63-pr27: 
Rust vulnerability analysis and mitigation

Impact

In mlkem-fips203 0.1.0 and 0.1.1, K-PKE key generation samples the secret vector s and error vector e using the same seed and PRF nonce sequence. The sampling is deterministic, so s = e. The public-key relation becomes t = (A + I)s, allowing an attacker with the encapsulation key to recover the PKE secret by solving the public linear system when the relevant matrix blocks are invertible. That secret also permits recovery of the shared secrets associated with valid ML-KEM ciphertexts available to the attacker. All three parameter sets are affected: ML-KEM-512, ML-KEM-768, and ML-KEM-1024. Dickson Wu reported successful PKE-secret and shared-secret recovery for each parameter set, using both ordinary key generation and fixed seeds. The maintainer confirmed the source defect; the recovery results are the reporter's findings. The defect is in MLKEM::_k_pke_keygen, reached by both MLKEM::keygen and MLKEM::key_derive. Both published crate versions contain the vulnerable code present at commit 6e5536514671c119d6f6e0049be0119a7a340520.

Patches

Version 0.1.2 corrects the key-generation counter sequence required by FIPS 203 Algorithm 13. It retains the counter returned after sampling s: s uses nonces 0 through k - 1, and e uses k through 2k - 1. The same release corrects a related discarded-counter defect found during maintainer review of MLKEM::_k_pke_encrypt. Previously, sampling y, e1, and e2 each started at zero. The correction follows Algorithm 14: y uses nonces 0 through k - 1, e1 uses k through 2k - 1, and e2 uses 2k. Dickson also reviewed and approved this correction. No separate exploitation result is claimed for the encryption defect.

Remediation

Update to 0.1.2 to obtain these corrections. Applications that relied on keys generated by an affected version for confidentiality should treat those keys as compromised and replace them using fresh randomness with an implementation suitable for their use. Updating the library alone does not repair existing keys. Re-expanding an old seed with the corrected code is insufficient: this correction changes the error samples but leaves the secret samples for that seed unchanged. Updating or replacing keys cannot restore confidentiality to previously exposed shared secrets or data protected by them. The corrections change deterministic key-generation and encryption outputs; interoperability with affected releases should not be relied on. There is no workaround that makes affected keys safe to continue using. This project remains educational software. It is not constant-time or resistant to other side-channel attacks and must not be used to protect real-world secrets. This patch does not change those limitations.

Validation

The corrected code passes all 54 Rust tests: seven existing unit tests, nine new vector-test groups, and 38 doctests. The vector tests cover 180 exact-output cases from the NIST ACVP FIPS 203 vectors across all three parameter sets: 75 key-generation, 75 encapsulation, and 30 decapsulation cases. The decapsulation cases include 15 valid and 15 modified ciphertexts, checking implicit rejection. Fixture sources are pinned and documented in tests/vectors/README.md. All nine vector-test groups fail against the original code and pass with the corrections. On 2026-11-16, Dickson independently retested and approved code commit 74acf0cca4e06c4c983d7bf7486eecb668c4f1d2. He confirmed that cargo test --release passes, restoring the original source makes all nine vector-test groups fail, and the corrected counter sequences match Algorithms 13 and 14. These checks are regression evidence, not NIST validation, a complete conformance assessment, or a security audit.

Credit

Thanks to Dickson Wu (SEAL & CertiK) for discovering and privately reporting the key-generation vulnerability, demonstrating its impact, supplying the initial patch, and reviewing and independently retesting both counter corrections.


Source: NVD

Related Rust vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

GHSA-xm3f-jwj9-3x8mMEDIUM4.5
  • Rust logoRust
  • russh-config
NoYesNov 21, 2026
GHSA-m6v5-wqxv-mffhMEDIUM4.3
  • Rust logoRust
  • russh
NoYesNov 21, 2026
GHSA-66vf-xq4p-pg7qLOW3.7
  • Rust logoRust
  • russh
NoYesNov 21, 2026
GHSA-7qgr-cjxw-6vjfLOW3.1
  • Rust logoRust
  • russh
NoYesNov 21, 2026
GHSA-v3vc-7662-5hv7LOWN/A
  • Rust logoRust
  • russh
NoYesNov 21, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Additional Wiz resources

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management