{"id":"RUSTSEC-2026-0124","summary":"Potential Panic on Overlong Ciphertext Buffer","details":"An application that passes in a ciphertext buffer of length greater\nthan `ptxt.len() + TAG_LEN` to `libcrux_chacha20poly1305::encrypt` or\n`libcrux_chacha20poly1305::xchacha20_poly1305::encrypt` would\nexperience a panic.\n\n## Impact\nAn application where the length of the ciphertext buffer is under\nattacker control could be made to crash.\n\n## Mitigation\nThe fix makes it so that `libcrux_chacha20poly1305::encrypt` and\n`libcrux_chacha20poly1305::xchacha20_poly1305::encrypt` no longer\npanic in this case, but instead write out the ciphertext and tag into\nthe first `ptxt.len() + TAG_LEN` bytes of the provided buffer.","modified":"2026-05-13T10:15:33.525966Z","published":"2026-03-29T12:00:00Z","database_specific":{"license":"CC0-1.0"},"references":[{"type":"PACKAGE","url":"https://crates.io/crates/libcrux-chacha20poly1305"},{"type":"ADVISORY","url":"https://rustsec.org/advisories/RUSTSEC-2026-0124.html"},{"type":"WEB","url":"https://github.com/cryspen/libcrux/pull/1386"}],"affected":[{"package":{"name":"libcrux-chacha20poly1305","ecosystem":"crates.io","purl":"pkg:cargo/libcrux-chacha20poly1305"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0.0.0-0"},{"fixed":"0.0.8"}]}],"ecosystem_specific":{"affects":{"functions":["libcrux_chacha20poly1305::encrypt","libcrux_chacha20poly1305::xchacha20_poly1305::encrypt"],"arch":[],"os":[]},"affected_functions":null},"database_specific":{"informational":null,"cvss":"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","source":"https://github.com/rustsec/advisory-db/blob/osv/crates/RUSTSEC-2026-0124.json","categories":[]}}],"schema_version":"1.7.5","severity":[{"type":"CVSS_V4","score":"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"}]}