# GHSA-pv9v-5j35-xwcr: libcrux Panics During Standalone MAC Operations

> Incorrect key length constant causes panics in standalone MAC operations, leading to denial of service for applications using libcrux-poly1305 directly.

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

## What is GHSA-pv9v-5j35-xwcr?

GHSA-pv9v-5j35-xwcr is a denial of service vulnerability in libcrux-poly1305, published on 4 Mar 2026. 

### Official description

An incorrect constant for the key length in libcrux-poly1305 caused the standalone MAC function `libcrux_poly1305::mac` to always panic with an out-of-bounds memory access.

## Impact
Applications wishing to use libcrux-poly1305 as a standalone MAC would experience panics. The use of libcrux-poly1305 in libcrux-chacha20poly1305 is unaffected.

## Mitigation
Starting from version `0.0.5`, the correct value is used for the key length constant.

## Which versions are affected by GHSA-pv9v-5j35-xwcr?

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


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

## How do I fix GHSA-pv9v-5j35-xwcr?

Upgrade libcrux-poly1305 to 0.0.5 or later.

## Is GHSA-pv9v-5j35-xwcr being exploited?

There is no known exploitation of GHSA-pv9v-5j35-xwcr in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for GHSA-pv9v-5j35-xwcr and fix it if it is affected.

What it is: GHSA-pv9v-5j35-xwcr is a denial of service vulnerability in libcrux-poly1305, published on 4 Mar 2026. 
Exploitation: There is no known exploitation of GHSA-pv9v-5j35-xwcr in the wild and no public exploit code.

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

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-pv9v-5j35-xwcr/ (Markdown: https://insights.sbomify.com/GHSA-pv9v-5j35-xwcr/index.md)
```

## Sources

- OSV: https://osv.dev/vulnerability/GHSA-pv9v-5j35-xwcr

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