# GHSA-434v-x5qv-pmh6: libcrux has All-Zero Key Generation Upon Catastrophic RNG Failure

- Severity: High (CVSS:4.0, scored by GitHub) `CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Published: 2026-03-04T12:00:00.000Z
- Modified: 2026-03-27T06:11:21.578Z
- Also known as: RUSTSEC-2026-0075
- Weaknesses: CWE-331, CWE-392, CWE-1240

## Description

The libcrux-ed25519 key generation samples Ed25519 secret keys from a provided CSPRNG in a loop for up to 100 attempts until a non-zero key is found.  If a non-zero key could not be sampled within 100 attempts the key generation function would silently continue with an all-zero buffer as the secret key.

## Impact
This bug only occurs in the event of a catastrophic failure of the CSPRNG, but would allow anyone to forge signatures under the resulting static signing key.

## Mitigation
Instead of silently continuing with an all-zero signing key, starting from version `0.0.7` key generation will error in the case of 100 failed attempts at sampling a valid key.

(As written by GitHub Advisory Database.)

## Affected

- libcrux-ed25519 (crates.io): before 0.0.7; from 0.0.0-0 before 0.0.7

## Every score

- GitHub: CVSS:4.0 High `CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N`
- RustSec Advisory Database: CVSS:4.0 `CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N`

## References

- <https://github.com/cryspen/libcrux/pull/1349> (web)
- <https://github.com/cryspen/libcrux> (package)
- <https://rustsec.org/advisories/RUSTSEC-2026-0075.html> (advisory, web)
- <https://crates.io/crates/libcrux-ed25519> (package)

## Sources

- GitHub Advisory Database: [GHSA-434v-x5qv-pmh6](https://github.com/advisories/GHSA-434v-x5qv-pmh6), CC-BY-4.0, modified 2026-03-27
- RustSec Advisory Database: [RUSTSEC-2026-0075](https://rustsec.org/advisories/RUSTSEC-2026-0075.html), CC0-1.0, modified 2026-03-27

---

Page: https://cve.day/GHSA-434v-x5qv-pmh6 · Whole record: https://cve.day/GHSA-434v-x5qv-pmh6.json · Rebuilt by cve.day 2026-11-25T22:56:43.328Z
