Skip to main content

xxhash-rust: Safe xxh3 custom-secret API accepts too-short secret in release

0
Low
Published: 10/02/2026 (10/02/2026, 18:29:13 UTC)
Source: GCVE Database
Product: xxhash-rust

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

Attack Vector
Local
Attack Complexity
Low
Privileges Required
High
User Interaction
None
Scope
Unchanged
Confidentiality
Low
Integrity
None
Availability
None
CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:U/C:L/I:N/A:N

Affected software

crates.ioghsa
xxhash-rust
Affected versions
<0.8.16

Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 10/02/2026, 20:02:35 UTC

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.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

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 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

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

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses