GHSA-hc3c-63hc-2r9f: libcrux Potential Panic On Overlong Ciphertext Vulnerability
HIGHGHSA-hc3c-63hc-2r9f is a HIGH potential panic on overlong ciphertext vulnerability (CWE-120: Buffer Copy without Checking Size of Input ('Classic Buffer Overflow')) affecting libcrux libraries in the crates.io ecosystem. The issue involves potential panic on overlong ciphertext buffer. Remediation is available by upgrading affected packages to version 0.0.8.
GHSA-hc3c-63hc-2r9f at a Glance
How to Fix GHSA-hc3c-63hc-2r9f
To remediate this vulnerability, upgrade all affected libcrux dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade libcrux-chacha20poly1305 to 0.0.8
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for libcrux-chacha20poly1305
How to Check if You Are Affected
To determine whether your application is affected by GHSA-hc3c-63hc-2r9f, inspect your project dependencies for libcrux:
inspect dependencies for libcrux-chacha20poly1305
Analyze the terminal output to locate any version of libcrux in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.0.8), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-120: Buffer Copy without Checking Size of Input ('Classic Buffer Overflow'), where the product copies an input buffer to an output buffer without verifying that the size of the input buffer is less than the size of the output buffer. In libcrux, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
GHSA-hc3c-63hc-2r9f Affected libcrux Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
libcrux-chacha20poly1305
|
crates.io |
< 0.0.8
|
0.0.8
|
References
Frequently Asked Questions
What is GHSA-hc3c-63hc-2r9f?
Which libcrux versions are affected?
What version fixes GHSA-hc3c-63hc-2r9f?
Is libcrux-chacha20poly1305 affected?
What CWE is associated with GHSA-hc3c-63hc-2r9f?
How can I check crates.io dependencies for GHSA-hc3c-63hc-2r9f?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-hc3c-63hc-2r9f",
"modified" : "2026-05-19T16:18:33Z",
"published" : "2026-05-19T16:18:33Z",
"aliases" : [ ],
"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.",
"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"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "crates.io",
"name" : "libcrux-chacha20poly1305"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.0.8"
} ]
} ]
} ],
"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"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-120" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2026-05-19T16:18:33Z",
"nvd_published_at" : null
}
}