Rust advisories / libcrux-chacha20poly1305
Vulnerability HighRUSTSEC-2026-0124 · libcrux-chacha20poly1305
RUSTSEC-2026-0124: Potential Panic on Overlong Ciphertext Buffer
Short answerA security vulnerability in the libcrux-chacha20poly1305 crate: Potential Panic on Overlong Ciphertext Buffer. GitHub rates it High. Fixed in 0.0.8: update to a fixed version.
| Crate | libcrux-chacha20poly1305 |
|---|---|
| Type | Vulnerability |
| Affected versions | Before 0.0.8. |
| Fixed in | 0.0.8 |
| Severity | High (GitHub rating) 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 |
| Published | 2026-03-29 |
| Last changed | 2026-05-20 |
| Also known as | GHSA-hc3c-63hc-2r9f |
| Affected functions | libcrux_chacha20poly1305::encrypt, libcrux_chacha20poly1305::xchacha20_poly1305::encrypt |
What to do
- See which version you have:
cargo tree -i libcrux-chacha20poly1305(it also shows which of your dependencies pulls it in). - Update within your version requirement:
cargo update -p libcrux-chacha20poly1305. If the fix is a newer major or minor than your requirement allows, raise it in Cargo.toml (for examplelibcrux-chacha20poly1305 = "0.0.8") or update the dependency that pulls it in. - Check again with
cargo audit, or paste your Cargo.lock into our Cargo.toml checker.
Details from the advisory
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.
References
- Package: crates.io/crates/libcrux-chacha20poly1305
- Advisory: rustsec.org/advisories/RUSTSEC-2026-0124.html
- Web: github.com/cryspen/libcrux/pull/1386
From the RustSec Advisory Database (CC0-1.0) via the OSV export, downloaded Oct 24, 2026. Severity score computed from the published CVSS vector.
Up next
Are you affected?Check your whole dependency treePaste Cargo.lock: every advisory, for your exact versions.Read it next →Also worth your time
Did this answer your question?