GHSA-hc3c-63hc-2r9f
high
libcrux: Potential Panic on Overlong Ciphertext Buffer
- Severity
- high CVSS:4.0 by GitHub
- Published
- Last changed
- Also known as
- RUSTSEC-2026-0124
Description
An application that passes in a ciphertext buffer of length greater
than ptxt.len() + TAG_LEN to libcrux_chacha20poly1305::encrypt or
libcrux_chacha20poly1305::xchacha20_poly1305::encrypt would
experience a panic.
Impact
An application where the length of the ciphertext buffer is under attacker control could be made to crash.
Mitigation
The fix makes it so that libcrux_chacha20poly1305::encrypt and
libcrux_chacha20poly1305::xchacha20_poly1305::encrypt no longer
panic in this case, but instead write out the ciphertext and tag into
the first ptxt.len() + TAG_LEN bytes of the provided buffer.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| libcrux-chacha20poly1305 (crates.io) | before 0.0.8, from 0.0.0-0 before 0.0.8 | GitHub Advisory Database, RustSec Advisory Database |
All scores
| GitHub | high CVSS:4.0 | CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N |
| RustSec Advisory Database | Not scored CVSS:4.0 | CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N |
Classification
References
Sources
| Source | Record | Licence |
|---|---|---|
| GitHub Advisory Database | GHSA-hc3c-63hc-2r9f changed 2026-05-20 | CC-BY-4.0 |
| RustSec Advisory Database | RUSTSEC-2026-0124 changed 2026-05-20 | CC0-1.0 |