GHSA-hc3c-63hc-2r9f

Suggest an improvement
Source
https://github.com/advisories/GHSA-hc3c-63hc-2r9f
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/05/GHSA-hc3c-63hc-2r9f/GHSA-hc3c-63hc-2r9f.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-hc3c-63hc-2r9f
Aliases
Published
2026-05-19T16:18:33Z
Modified
2026-05-20T07:26:23Z
Severity
  • 8.2 (High) CVSS_V4 - 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 CVSS Calculator
Summary
libcrux: 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.

Database specific
{
    "cwe_ids":  [
        "CWE-120"
    ],
    "github_reviewed":  true,
    "github_reviewed_at":  "2026-05-19T16:18:33Z",
    "nvd_published_at":  null,
    "severity":  "HIGH"
}
References

Affected packages

crates.io / libcrux-chacha20poly1305

Package

Name
libcrux-chacha20poly1305
View open source insights on deps.dev
Purl
pkg:cargo/libcrux-chacha20poly1305

Affected ranges

Type
SEMVER
Events
Introduced
0 Unknown introduced version / All previous versions are affected
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"