# GHSA-xrf2-5r3p-5wgj: libcrux: Panic in Signature Hint Decoding During Verification

> A manipulated invalid hint in ML-DSA verification causes an out-of-bounds memory access and runtime panic, leading to denial of service.

- **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-0076

## What is GHSA-xrf2-5r3p-5wgj?

GHSA-xrf2-5r3p-5wgj is a denial of service vulnerability in libcrux-ml-dsa, published on 4 Mar 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

During ML-DSA verification the serialized hint values are decoded as specified in algorithm 22 `HintBitUnpack` of [FIPS 204, subsection 7.1](https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.204.pdf#%5B%7B%22num%22%3A120%2C%22gen%22%3A0%7D%2C%7B%22name%22%3A%22FitH%22%7D%2C657%5D). The algorithm requires that the cumulative hint counters per row of the hint vector are strictly increasing and below a maximum value which depends on the choice of ML-DSA parameter set (line 4).

In libcrux-ml-dsa, hint decoding did not check the boundedness of the cumulative hint counter of the last row of the hint vector.

## Impact
A manipulated invalid hint can cause an out-of-bounds memory access since the hint decoding logic may attempt to read outside the bounds of the serialized signature, causing a runtime panic.

## Mitigation
Starting from version `0.0.8`, hint decoding will check the cumulative hint counter of the last row as well.

## Which versions are affected by GHSA-xrf2-5r3p-5wgj?

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


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `libcrux-ml-dsa` | crates.io | All versions | 0.0.8 |
| `libcrux-ml-dsa` | crates.io | All versions | 0.0.8 |
| `libcrux-ml-dsa` | crates.io | From 0.0.0-0 | 0.0.8 |

## How do I fix GHSA-xrf2-5r3p-5wgj?

Upgrade libcrux-ml-dsa to 0.0.8 or later.

## Is GHSA-xrf2-5r3p-5wgj being exploited?

There is no known exploitation of GHSA-xrf2-5r3p-5wgj in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for GHSA-xrf2-5r3p-5wgj and fix it if it is affected.

What it is: GHSA-xrf2-5r3p-5wgj is a denial of service vulnerability in libcrux-ml-dsa, 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-xrf2-5r3p-5wgj in the wild and no public exploit code.

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

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-xrf2-5r3p-5wgj/ (Markdown: https://insights.sbomify.com/GHSA-xrf2-5r3p-5wgj/index.md)
```

## Sources

- OSV: https://osv.dev/vulnerability/GHSA-xrf2-5r3p-5wgj

---
From sbomify Insights: https://insights.sbomify.com/GHSA-xrf2-5r3p-5wgj/
Summaries are generated and may contain mistakes; the official description above is the record.
