Intel

AIKIDO-2026-182147

rapidhash is vulnerable to Use of Insufficiently Random Values

Use of Insufficiently Random Values Pre-CVE
Found by Aikido Intel before public disclosure or CVE publication.
Published 4 days ago

40

Medium Risk

This Affects:

RUSTrapidhash
2.0.0 - 4.4.2
Fixed in 4.5.0
Are you affected? Scan for Free

TL;DR

rapidhash's RandomState derives each hasher's seed from a thread-local counter that starts at zero combined with the current stack address as its only per-thread entropy. When the operating system recycles thread stacks, newly spawned threads observe the same stack address and therefore compute duplicate, predictable seeds, and on targets without ASLR or ambient entropy the seed is effectively deterministic. An attacker who can predict the seed can craft keys that all collide in a HashMap or HashSet, forcing worst-case quadratic behavior and denial of service. The fix initializes each thread's seed counter from a global thread counter mixed with a process-wide random seed and adds getrandom-based entropy paths for no_std and wasm targets.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range and rely on RandomState or RapidHashMap/RapidHashSet for HashDoS resistance when hashing untrusted or externally supplied keys.

Background info

rapidhash is vulnerable to Use of Insufficiently Random Values in versions 2.0.0 - 4.4.2.

How to fix this

Upgrade the rapidhash library to the patch version.