GHSA-hc3c-63hc-2r9f
JSON

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 packageVersionsReported by
libcrux-chacha20poly1305 (crates.io)before 0.0.8, from 0.0.0-0 before 0.0.8GitHub Advisory Database, RustSec Advisory Database

All scores

GitHubhigh CVSS:4.0CVSS: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 DatabaseNot scored CVSS:4.0CVSS: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

SourceRecordLicence
GitHub Advisory DatabaseGHSA-hc3c-63hc-2r9f changed 2026-05-20CC-BY-4.0
RustSec Advisory DatabaseRUSTSEC-2026-0124 changed 2026-05-20CC0-1.0