Arbitrary Heap Data Extraction in Ruby

ruby Updated 02 Oct 2025

Summary

14/05/2024
N/A
Yes i
Unrated
Not published

CVE-2024-27282: An issue was discovered in Ruby 3.x through 3.3.0. Affects ruby versions < 3.1.5-r0. Fixed in 3.1.5-r0. 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 Devnack Mobile apps built by Devnack Design, build and launch iOS and Android apps with a senior product team. From idea to store release Start a project

Background

Ruby is a dynamic, object-oriented programming language known for its simplicity and productivity. It is widely used for web development, scripting, and system administration tasks. The vulnerability CVE-2024-27282 affects Ruby versions 3.x through 3.3.0. It allows an attacker to extract arbitrary heap data relative to the start of the text, including pointers and sensitive strings.

Vulnerability Detail

The vulnerability arises when attacker-supplied data is provided to the Ruby regex compiler. By exploiting this issue, an attacker can access sensitive information stored in the heap memory, such as pointers and strings. This can lead to potential security breaches and unauthorized access to sensitive data. The fixed versions of Ruby that address this vulnerability are 3.0.7, 3.1.5, 3.2.4, and 3.3.1.

How To Fix

Minimum fixed version

3.1.5-r0

This is the first release that contains the fix.

sudo apk add --upgrade ruby

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

Workaround

There is no specific workaround available for this vulnerability. It is crucial to update Ruby to the fixed versions as soon as possible to mitigate the risk of exploitation.

Conclusion

The vulnerability CVE-2024-27282 in Ruby allows an attacker to extract arbitrary heap data, including sensitive information. To mitigate this risk, it is crucial to update Ruby to one of the fixed versions (3.0.7, 3.1.5, 3.2.4, or 3.3.1). For further support on vulnerability remediation, you can contact DevNack.com.

See every vulnerability recorded for ruby →

Share this vulnerability

FAQ

This vulnerability allows an attacker to extract arbitrary heap data, including sensitive information, from the Ruby regex compiler. It can potentially lead to unauthorized access to sensitive data and security breaches.

Ruby versions 3.x through 3.3.0 are affected by this vulnerability.

You can use the Vulert Playground (https://vulert.com/scanner) to check if your Ruby installation is affected by this vulnerability. Simply upload your manifest file (e.g., package-lock.json) and Vulert will provide real-time alerts for open-source vulnerabilities.

At the time of this report, there are no known public exploits for this vulnerability. However, it is essential to update Ruby to the fixed versions to prevent potential exploitation.

Yes, the Ruby development team has released fixed versions (3.0.7, 3.1.5, 3.2.4, and 3.3.1) that address this vulnerability. It is recommended to update Ruby to one of these versions.

Related vulnerabilities

Recent vulnerabilities recorded for ruby.

How To Fix

Minimum fixed version

3.1.5-r0

This is the first release that contains the fix.

sudo apk add --upgrade ruby

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