CVE-2012-5370: JRuby Denial of Service via Hash Collision

org.jruby:jruby-parent Updated 02 Oct 2025

Summary

17/05/2022
Yes i
Moderate
Not published

CVE-2012-5370: JRuby denial of service via Hash Collision. Affects org.jruby:jruby-parent versions < 1.7.1. Fixed in 1.7.1. How to fix ↓

Also tracked for

The same CVE-2012-5370 is tracked separately for each ecosystem and vendor. Its fix information is the same; the package and affected versions differ.

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Penetration testing for web, API and mobile Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

JRuby is an implementation of the Ruby programming language that runs on the Java Virtual Machine (JVM). It provides a seamless integration between Ruby and Java, allowing developers to leverage the power of both languages. The 'org.jruby:jruby-parent' package is a Maven package that serves as the parent POM for JRuby projects, providing common configuration and dependencies. This vulnerability affects versions of JRuby prior to 1.7.1.

Vulnerability Detail

The vulnerability in JRuby stems from its computation of hash values without properly restricting the ability to trigger hash collisions predictably. This allows context-dependent attackers to cause a denial of service (CPU consumption) by exploiting crafted input to an application that maintains a hash table. The vulnerability is demonstrated through a universal multicollision attack against the MurmurHash2 algorithm. It is important to note that this vulnerability is different from CVE-2011-4838.

How To Fix

Minimum fixed version

1.7.1

This is the first release that contains the fix.

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

There is no specific workaround mentioned for this vulnerability. However, as a general best practice, it is recommended to follow secure coding practices and input validation to minimize the risk of exploitation.

Conclusion

The vulnerability in JRuby versions prior to 1.7.1 allows context-dependent attackers to cause a denial of service by exploiting hash collisions. To mitigate this vulnerability, it is crucial to update the 'org.jruby:jruby-parent' package to version 1.7.1 or later. Additionally, following secure coding practices and input validation can help minimize the risk of exploitation. For further support on vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for org.jruby:jruby-parent →

Share this vulnerability

FAQ

JRuby is an implementation of the Ruby programming language that runs on the Java Virtual Machine (JVM). It provides a seamless integration between Ruby and Java.

The 'org.jruby:jruby-parent' package is a Maven package that serves as the parent POM for JRuby projects, providing common configuration and dependencies.

A hash collision occurs when two different inputs produce the same hash value. In this vulnerability, the ability to trigger hash collisions predictably can lead to a denial of service.

A denial of service (DoS) attack is an attempt to make a computer system or network unavailable to its intended users by overwhelming it with a flood of illegitimate requests or by exploiting vulnerabilities to consume excessive resources.

You can use Vulert's playground (https://vulert.com/scanner) to check if your application is affected by this vulnerability. Vulert monitors and alerts in real-time for open-source vulnerabilities in software using just the pom.xml file, without requiring access to the code or installation.

How To Fix

Minimum fixed version

1.7.1

This is the first release that contains the fix.

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback