{"id":"GHSA-434v-x5qv-pmh6","aliases":["RUSTSEC-2026-0075"],"status":"published","title":"libcrux has All-Zero Key Generation Upon Catastrophic RNG Failure","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.\n\n## Impact\nThis 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.\n\n## Mitigation\nInstead 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.","severity":{"version":"4.0","score":8.2,"vector":"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","level":"high","from":"ghsa"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-1240","CWE-331","CWE-392"],"published":"2026-03-04T12:00:00Z","modified":"2026-03-27T06:11:21Z","fixes":[{"ecosystem":"crates.io","package":"libcrux-ed25519","fixed_in":["0.0.7"],"sources":["ghsa","osv"]}],"affected":[{"source":"ghsa","ecosystem":"crates.io","package":"libcrux-ed25519","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.0.7"}]}]},{"source":"osv","ecosystem":"crates.io","package":"libcrux-ed25519","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"0.0.7"}]}]},{"source":"osv","ecosystem":"crates.io","package":"libcrux-ed25519","ranges":[{"type":"SEMVER","events":[{"introduced":"0.0.0-0"},{"fixed":"0.0.7"}]}]}],"references":[{"url":"https://github.com/cryspen/libcrux/pull/1349","tags":["web"]},{"url":"https://rustsec.org/advisories/RUSTSEC-2026-0075.html","tags":["web","advisory"]},{"url":"https://github.com/advisories/GHSA-434v-x5qv-pmh6"},{"url":"https://github.com/cryspen/libcrux","tags":["package"]},{"url":"https://crates.io/crates/libcrux-ed25519","tags":["package"]}],"sources":{"ghsa":[{"id":"GHSA-434v-x5qv-pmh6","title":"libcrux has All-Zero Key Generation Upon Catastrophic RNG Failure","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.\n\n## Impact\nThis 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.\n\n## Mitigation\nInstead 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.","status":"published","published":"2026-03-26T17:58:55Z","modified":"2026-03-26T17:58:55Z","cvss":[{"version":"4.0","score":8.2,"vector":"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","level":"high"}],"cwes":["CWE-331","CWE-392","CWE-1240"],"updated_at":"2026-11-02T14:39:42.712607Z"}],"osv":[{"id":"GHSA-434v-x5qv-pmh6","title":"libcrux has All-Zero Key Generation Upon Catastrophic RNG Failure","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.\n\n## Impact\nThis 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.\n\n## Mitigation\nInstead 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.","status":"published","published":"2026-03-26T17:58:55Z","modified":"2026-03-27T06:11:21.578854Z","cvss":[{"version":"4.0","score":8.2,"vector":"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","level":"high"}],"cwes":["CWE-1240","CWE-331","CWE-392"],"updated_at":"2026-11-02T15:46:36.434231Z"},{"id":"RUSTSEC-2026-0075","title":"All-Zero Key Generation on Catastrophic RNG Failure","description":"The libcrux-ed25519 key generation samples Ed25519 secret keys from a\nprovided CSPRNG in a loop for up to 100 attempts until a non-zero key\nis found.  If a non-zero key could not be sampled within 100 attempts\nthe key generation function would silently continue with an all-zero buffer as\nthe secret key.\n\n## Impact\nThis bug only occurs in the event of a catastrophic failure of the\nCSPRNG, but would allow anyone to forge signatures under the resulting\nstatic signing key.\n\n## Mitigation\nInstead of silently continuing with an all-zero signing key, starting\nfrom version `0.0.7` key generation will error in the case of 100\nfailed attempts at sampling a valid key.","status":"published","published":"2026-03-04T12:00:00Z","modified":"2026-03-27T05:55:06Z","cvss":[{"version":"4.0","score":8.2,"vector":"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","level":"high"}],"updated_at":"2026-11-02T15:53:40.430679Z"}]}}
