CVE-2012-5371: Medium severity ruby vulnerability
Ruby (aka CRuby) 1.9 before 1.9.3-p327 and 2.0 before r37575 computes hash values without properly restricting the ability to trigger hash collisions predictably, which allows context-dependent attackers to cause a denial of service (CPU consumption) via crafted input to an application that maintains a hash table, as demonstrated by a universal multicollision attack against a variant of the MurmurHash2 algorithm, a different vulnerability than CVE-2011-4815.
Other sources
Ruby 1.9.3-p327 was released to correct a hash-flooding DoS vulnerability that only affects 1.9.x and the 2.0.0 preview [1].
As noted in the upstream report:
Carefully crafted sequence of strings can cause a denial of service attack on the service that parses the sequence to create a Hash object by using the strings as keys. For instance, this vulnerability affects web application that parses the JSON data sent from untrusted entity.
This vulnerability is similar to CVS-2011-4815 for ruby 1.8.7. ruby 1.9 versions were using modified MurmurHash function but it's reported that there is a way to create sequence of strings that collide their hash values each other. This fix changes the Hash function of String object from the MurmurHash to SipHash 2-4.
Ruby 1.8.x is not noted as being affected by this flaw.
[1] http://www.ruby-lang.org/en/news/2012/11/09/ruby19-hashdos-cve-2012-5371/
— Red Hat
Affected Software
Remediation
Patch Available
Patch Available
Event History
Frequently Asked Questions
What is the severity of CVE-2012-5371?
CVE-2012-5371 is categorized as a medium severity vulnerability due to its potential to disrupt service via hash collision attacks.
How do I fix CVE-2012-5371?
To mitigate CVE-2012-5371, upgrade Ruby to version 1.9.3-p327 or later, or 2.0 r37575 or later.
What systems are affected by CVE-2012-5371?
CVE-2012-5371 affects Ruby versions prior to 1.9.3-p327 and 2.0 before r37575.
What kind of attacks can CVE-2012-5371 facilitate?
CVE-2012-5371 can facilitate denial of service attacks through CPU resource exhaustion caused by hash flooding.
Is CVE-2012-5371 exploitable remotely?
Yes, CVE-2012-5371 can be exploited remotely by context-dependent attackers using specially crafted input.