Hash-flooding DoS vulnerability for Ruby 1.9
Ruby 1.9's Hash function used a modified MurmurHash that allowed an attacker to craft a sequence of strings with colliding hash values. Parsing such a sequence into a Hash could cause a denial of service, for example in a web application that parses JSON from untrusted sources.
ruby-lang.org
Published on ruby-lang.org
Hash-flooding DoS attack reported for the Hash function ruby 1.9 series were using. This vulnerability is different from CVE-2011-4815 for ruby 1.8.7.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Impact
An attacker could cause a denial of service on services that parse attacker-supplied sequences of strings into a Hash, such as web applications parsing JSON from untrusted sources.
What the attacker needed
Service parses untrusted strings into a Hash; attacker can send crafted colliding strings
The fix
The Hash function for String was changed from MurmurHash to SipHash 2-4, and applications should also limit the size of untrusted input.
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 write-up has not been written yet. The Original tab links to the source.
A hash function turns data like text into a short number, and a hash table uses these numbers to store and find items quickly. If many different pieces of text produce the same number, the table becomes very slow, like a filing cabinet where every folder has the same label. An attacker can send many such colliding strings to a service, making it use lots of processing time and stop responding to normal users.
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.