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

- Severity: High (CVSS:4.0, scored by GitHub) `CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/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.325Z
- Also known as: RUSTSEC-2026-0076
- Weaknesses: CWE-125, CWE-1285

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

(As written by GitHub Advisory Database.)

## Affected

- libcrux-ml-dsa (crates.io): before 0.0.8; from 0.0.0-0 before 0.0.8

## Every score

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

## References

- <https://github.com/cryspen/libcrux/pull/1348> (web)
- <https://github.com/cryspen/libcrux> (package)
- <https://rustsec.org/advisories/RUSTSEC-2026-0076.html> (advisory, web)
- <https://crates.io/crates/libcrux-ml-dsa> (package)

## Sources

- GitHub Advisory Database: [GHSA-xrf2-5r3p-5wgj](https://github.com/advisories/GHSA-xrf2-5r3p-5wgj), CC-BY-4.0, modified 2026-03-27
- RustSec Advisory Database: [RUSTSEC-2026-0076](https://rustsec.org/advisories/RUSTSEC-2026-0076.html), CC0-1.0, modified 2026-03-27

---

Page: https://cve.day/GHSA-xrf2-5r3p-5wgj · Whole record: https://cve.day/GHSA-xrf2-5r3p-5wgj.json · Rebuilt by cve.day 2026-11-25T22:56:43.328Z
