# GHSA-434v-x5qv-pmh6: All-Zero Key Generation on Catastrophic RNG Failure

> A flaw in libcrux-ed25519 allows signature forgery if the CSPRNG fails, generating an all-zero key instead of erroring.

- **Severity:** Not scored
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 4 Mar 2026
- **Also known as:** RUSTSEC-2026-0075

## What is GHSA-434v-x5qv-pmh6?

GHSA-434v-x5qv-pmh6 is a vulnerability in libcrux-ed25519, published on 4 Mar 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official 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.

## Which versions are affected by GHSA-434v-x5qv-pmh6?

3 open source packages ship an affected version, including libcrux-ed25519.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `libcrux-ed25519` | crates.io | All versions | 0.0.7 |
| `libcrux-ed25519` | crates.io | All versions | 0.0.7 |
| `libcrux-ed25519` | crates.io | From 0.0.0-0 | 0.0.7 |

## How do I fix GHSA-434v-x5qv-pmh6?

Upgrade libcrux-ed25519 to 0.0.7 or later.

## Is GHSA-434v-x5qv-pmh6 being exploited?

There is no known exploitation of GHSA-434v-x5qv-pmh6 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for GHSA-434v-x5qv-pmh6 and fix it if it is affected.

What it is: GHSA-434v-x5qv-pmh6 is a vulnerability in libcrux-ed25519, published on 4 Mar 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of GHSA-434v-x5qv-pmh6 in the wild and no public exploit code.

Affected packages and fixed versions:
- libcrux-ed25519 (crates.io): affected all versions; fixed in 0.0.7
- libcrux-ed25519 (crates.io): affected all versions; fixed in 0.0.7
- libcrux-ed25519 (crates.io): affected from 0.0.0-0; fixed in 0.0.7

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/GHSA-434v-x5qv-pmh6/ (Markdown: https://insights.sbomify.com/GHSA-434v-x5qv-pmh6/index.md)
```

## Sources

- OSV: https://osv.dev/vulnerability/GHSA-434v-x5qv-pmh6

---
From sbomify Insights: https://insights.sbomify.com/GHSA-434v-x5qv-pmh6/
Summaries are generated and may contain mistakes; the official description above is the record.
