{"id":"GHSA-hc3c-63hc-2r9f","summary":"libcrux: 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.","aliases":["RUSTSEC-2026-0124"],"modified":"2026-05-20T07:26:23.649057951Z","published":"2026-05-19T16:18:33Z","database_specific":{"cwe_ids":["CWE-120"],"severity":"HIGH","github_reviewed":true,"github_reviewed_at":"2026-05-19T16:18:33Z","nvd_published_at":null},"references":[{"type":"WEB","url":"https://github.com/cryspen/libcrux/pull/1386"},{"type":"PACKAGE","url":"https://github.com/cryspen/libcrux"},{"type":"WEB","url":"https://rustsec.org/advisories/RUSTSEC-2026-0124.html"}],"affected":[{"package":{"name":"libcrux-chacha20poly1305","ecosystem":"crates.io","purl":"pkg:cargo/libcrux-chacha20poly1305"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"0.0.8"}]}],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/05/GHSA-hc3c-63hc-2r9f/GHSA-hc3c-63hc-2r9f.json"}}],"schema_version":"1.9.0","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"}]}