{"id":"GHSA-hc3c-63hc-2r9f","aliases":["GHSA-hc3c-63hc-2r9f","RUSTSEC-2026-0124"],"related":[],"kind":"vulnerability","state":"published","title":"libcrux: Potential Panic on Overlong Ciphertext Buffer","summary":"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.","summaryFormat":"markdown","summarySource":"ghsa","descriptions":[{"lang":"en","text":"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.","format":"markdown","source":"ghsa"}],"published":"2026-03-29T12:00:00.000Z","modified":"2026-05-20T07:26:23.649Z","severity":{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"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","rating":"HIGH"},"severities":[{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"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","rating":"HIGH"},{"scorer":"RustSec Advisory Database","scheme":"CVSS:4.0","vector":"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"}],"cwes":["CWE-120"],"affected":[{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"0.0.8"}],"ecosystem":"crates.io","package":"libcrux-chacha20poly1305","purl":"pkg:cargo/libcrux-chacha20poly1305","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0.0.0-0","status":"affected","fixed":"0.0.8"}],"ecosystem":"crates.io","package":"libcrux-chacha20poly1305","purl":"pkg:cargo/libcrux-chacha20poly1305","source":"rustsec"}],"references":[{"url":"https://github.com/cryspen/libcrux/pull/1386","tags":["web"],"sources":["ghsa","rustsec"]},{"url":"https://github.com/cryspen/libcrux","tags":["package"],"sources":["ghsa"]},{"url":"https://rustsec.org/advisories/RUSTSEC-2026-0124.html","tags":["advisory","web"],"sources":["ghsa","rustsec"]},{"url":"https://crates.io/crates/libcrux-chacha20poly1305","tags":["package"],"sources":["rustsec"]}],"credits":[],"sources":[{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-hc3c-63hc-2r9f","url":"https://github.com/advisories/GHSA-hc3c-63hc-2r9f","licence":"CC-BY-4.0","modified":"2026-05-20T07:26:23.649Z"},{"source":"rustsec","name":"RustSec Advisory Database","id":"RUSTSEC-2026-0124","url":"https://rustsec.org/advisories/RUSTSEC-2026-0124.html","licence":"CC0-1.0","modified":"2026-05-20T07:15:03.934Z"}],"updatedAt":"2026-11-25T22:56:43.347Z"}