HashDoS in V8
V8's string hashing maps integer-like strings to their numeric value, so collisions are easy to predict. An attacker can send input that creates many collisions in the internal string table, slowing down a Node.js process.
Originally disclosed on HackerOne
- Triaged in 11 days
- Fixed in 2 months
- Disclosed after 2 months
Summary by the program
A flaw in V8's string hashing mechanism causes integer-like strings to be hashed to their numeric value, making hash collisions trivially predictable. By crafting a request that causes many such collisions in V8's internal string table, an attacker can significantly degrade performance of the Node.js process.
The most common trigger is any endpoint that calls JSON.parse() on attacker-controlled input, as JSON parsing automatically internalizes short strings into the affected hash table.
This vulnerability affects 20.x, 22.x, 24.x, and 25.x.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the string hash function used the numeric value of integer-like strings directly, so many distinct strings produced the same hash.
Impact
An attacker could significantly degrade the performance of a Node.js process, but the text does not claim a full denial of service.
What the attacker needed
Endpoint parses attacker-controlled JSON
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
A hash table is a way to store and look up data quickly by turning each item into a number (a hash). If many different items get the same number, the table becomes slow because it has to check them one by one. Here, certain text values that look like numbers all got the same hash, so sending lots of them could make the server work much harder.
What is DoS?
A request that exhausts resources or crashes a component. Many programs forbid testing it; reports usually show it from code, not by attacking.