Advisory

RUSTSEC-2026-0124

Also known as: GHSA-hc3c-63hc-2r9f

Summary

Potential Panic on Overlong Ciphertext Buffer

Details

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.

Severity

Not rated by the source.

Dates

Published
2026-03-29 12:00 UTC
Modified
2026-05-20 07:15 UTC

Affected packages and fixes

libcrux-chacha20poly1305

crates.io · All systems

Affected

  • introduced 0.0.0-0, fixed 0.0.8 (semver)

Fixed versions

0.0.8

Fix

  • Fixed version 0.0.8
    cargo update -p libcrux-chacha20poly1305 --precise 0.0.8

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: RustSec Advisory Database · CC0-1.0

Sources & licences