FreeBSD VuXML: Documenting security issues in FreeBSD and the FreeBSD Ports Collection

Multiple implementations -- DoS via hash algorithm collision

Affected packages
jruby <
ruby <,1
ruby+nopthreads <,1
ruby+nopthreads+oniguruma <,1
ruby+oniguruma <,1
rubygem-rack < 1.3.6,3
v8 < 3.8.5
redis <= 2.4.6
node < 0.6.7


VuXML ID 91be81e7-3fea-11e1-afc7-2c4138874f7d
Discovery 2011-12-28
Entry 2012-01-16
Modified 2012-01-20

oCERT reports:

A variety of programming languages suffer from a denial-of-service (DoS) condition against storage functions of key/value pairs in hash data structures, the condition can be leveraged by exploiting predictable collisions in the underlying hashing algorithms.

The issue finds particular exposure in web server applications and/or frameworks. In particular, the lack of sufficient limits for the number of parameters in POST requests in conjunction with the predictable collision properties in the hashing functions of the underlying languages can render web applications vulnerable to the DoS condition. The attacker, using specially crafted HTTP requests, can lead to a 100% of CPU usage which can last up to several hours depending on the targeted application and server performance, the amplification effect is considerable and requires little bandwidth and time on the attacker side.

The condition for predictable collisions in the hashing functions has been reported for the following language implementations: Java, JRuby, PHP, Python, Rubinius, Ruby. In the case of the Ruby language, the 1.9.x branch is not affected by the predictable collision condition since this version includes a randomization of the hashing function.

The vulnerability outlined in this advisory is practically identical to the one reported in 2003 and described in the paper Denial of Service via Algorithmic Complexity Attacks which affected the Perl language.


CVE Name CVE-2011-4815
CVE Name CVE-2011-4838
CVE Name CVE-2011-5036
CVE Name CVE-2011-5037