Denial of Service Vulnerability in JRuby - CVE-2011-4838

jruby Updated 02 Oct 2025

Summary

30/12/2011
N/A
Yes i
Unrated
Not published

DEBIAN-CVE-2011-4838: JRuby before 1.6.5.1 computes hash values without restricting the ability to trigger hash collisions predictably, which allows context-dependent attackers to cause a denial of service (CPU consumption) via crafted input... Affects jruby versions < 1.5.6-4. Fixed in 1.5.6-4. How to fix ↓

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 MarkAI Find prospects already talking about the problem you solve AI watches the communities your customers use to find qualified prospects, then alerts you when a conversation is worth joining. See MarkAI

Background

JRuby is an implementation of the Ruby programming language on the Java Virtual Machine (JVM). It allows Ruby applications to run on the JVM, providing access to Java libraries and performance optimizations. The package is widely used for web applications and other software that benefits from Ruby's syntax and features. However, prior to version 1.6.5.1, JRuby had a vulnerability that allowed attackers to exploit hash collisions, leading to potential denial of service.

Vulnerability Detail

The vulnerability identified as CVE-2011-4838 in JRuby arises from its method of computing hash values without adequate restrictions. This flaw enables attackers to craft specific inputs that can trigger predictable hash collisions. When such collisions occur, they can significantly increase CPU consumption, leading to a denial of service. This vulnerability is particularly concerning for applications that rely on hash tables for data storage and retrieval, as it can degrade performance and availability.

How To Fix

Minimum fixed version

1.5.6-4

This is the first release that contains the fix.

sudo apt-get install --only-upgrade jruby

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

Workaround

As a temporary workaround, developers can implement input validation to limit the types of data that can be processed by the application, thereby reducing the risk of triggering hash collisions. Additionally, consider using alternative data structures that are less susceptible to such attacks.

Conclusion

The CVE-2011-4838 vulnerability in JRuby poses a significant risk of denial of service due to predictable hash collisions. Users are strongly advised to upgrade to the patched version to ensure the security and stability of their applications. Temporary workarounds can help mitigate the risk until an upgrade is feasible.

See every vulnerability recorded for jruby →

Share this vulnerability

FAQ

CVE-2011-4838 is a vulnerability in JRuby that allows attackers to exploit hash collisions, leading to denial of service through excessive CPU consumption.

You can check if your application is affected by using the Vulert playground at Vulert Scanner, which analyzes your manifest file for vulnerabilities.

JRuby versions prior to 1.6.5.1 are vulnerable to this issue. It is essential to upgrade to version 1.5.6-4 or later to mitigate the risk.

The primary consequence is a denial of service, where an attacker can cause the application to consume excessive CPU resources, potentially leading to application downtime.

While upgrading is the best solution, implementing input validation and using alternative data structures can serve as temporary workarounds to mitigate the risk.

Related vulnerabilities

Recent vulnerabilities recorded for jruby.

How To Fix

Minimum fixed version

1.5.6-4

This is the first release that contains the fix.

sudo apt-get install --only-upgrade jruby

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

Follow Vulert in Google

Get more Vulert vulnerability and dependency-security updates in Google Search and AI results.