xxhash-rust: Safe xxh3 custom-secret API accepts too-short secret in release
A vulnerability in xxhash-rust version prior to 0.8.16 allows a safe API to accept a custom secret that is shorter than the internal minimum length. This leads to undefined behavior due to construction of invalid fixed-width references when running in release mode, as the length check is only enforced by debug assertions. The issue does not require unsafe code from the caller and can cause memory safety violations under certain conditions.
AI Analysis
Technical Summary
The xxhash-rust crate version <0.8.16 contains a vulnerability where the safe API function xxh3_64_with_secret accepts a custom secret slice shorter than the internal minimum length. The length check is enforced only by debug_assert!, which is disabled in release builds, causing undefined behavior such as dangling references when the function attempts to read a fixed-width secret from an insufficiently sized slice. This was demonstrated using release-Miri, which reported invalid reference construction. A local fix involves validating the secret length before such reads. This vulnerability is tracked as CWE-125 (Out-of-bounds Read).
Potential Impact
The vulnerability can cause undefined behavior including memory safety violations due to out-of-bounds reads of the secret slice in release builds. The CVSS score is low (2.3) with low confidentiality impact and no integrity or availability impact. Exploitation requires local privileges (AV:L) and high privileges (PR:H). There are no known exploits in the wild.
Mitigation Recommendations
A patch is available that fixes this issue in xxhash-rust version 0.8.16 and later. Users should upgrade to version 0.8.16 or newer to mitigate this vulnerability. Until patched, avoid passing custom secrets shorter than the required minimum length to the affected API.
xxhash-rust: Safe xxh3 custom-secret API accepts too-short secret in release
Description
A vulnerability in xxhash-rust version prior to 0.8.16 allows a safe API to accept a custom secret that is shorter than the internal minimum length. This leads to undefined behavior due to construction of invalid fixed-width references when running in release mode, as the length check is only enforced by debug assertions. The issue does not require unsafe code from the caller and can cause memory safety violations under certain conditions.
CVSS v3.1
Score 2.3low
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The xxhash-rust crate version <0.8.16 contains a vulnerability where the safe API function xxh3_64_with_secret accepts a custom secret slice shorter than the internal minimum length. The length check is enforced only by debug_assert!, which is disabled in release builds, causing undefined behavior such as dangling references when the function attempts to read a fixed-width secret from an insufficiently sized slice. This was demonstrated using release-Miri, which reported invalid reference construction. A local fix involves validating the secret length before such reads. This vulnerability is tracked as CWE-125 (Out-of-bounds Read).
Potential Impact
The vulnerability can cause undefined behavior including memory safety violations due to out-of-bounds reads of the secret slice in release builds. The CVSS score is low (2.3) with low confidentiality impact and no integrity or availability impact. Exploitation requires local privileges (AV:L) and high privileges (PR:H). There are no known exploits in the wild.
Mitigation Recommendations
A patch is available that fixes this issue in xxhash-rust version 0.8.16 and later. Users should upgrade to version 0.8.16 or newer to mitigate this vulnerability. Until patched, avoid passing custom secrets shorter than the required minimum length to the affected API.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- GHSA-6g2r-675j-hx59
- Osv Schema Version
- 1.4.0
- Ecosystems
- ["crates.io"]
- Database Specific Severity
- LOW
- Cvss Version
- 3.1
Threat ID: 6ac00d25a43b0b3b89fb1495
Added to database: 10/02/2026, 19:59:33 UTC
Last enriched: 10/02/2026, 20:02:35 UTC
Last updated: 10/03/2026, 02:55:37 UTC
Views: 8
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
External Links
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.