Cloudanix VulnDB

CVE-2024-27282

Medium · 6.6

CVSS

6.6

EPSS

0.6%

Published

May 14, 2024

CISA due date

—

Cloudanix analysis

Monitor only SSVC: Track

A flaw in Ruby lets attackers pull hidden memory contents out of programs that use certain text-matching features, which could expose private information.

Exploitation
Requires User Interaction
Attacker needs
User Interaction
Complexity
Moderate
Impact
Data Exposure
Component
Library
Class
Information Disclosure
Remediation
Upgrade
Effort
Medium
Patch risk
Low

What it actually does

Attacker-supplied data to the Ruby regex compiler allows extraction of arbitrary heap data relative to the text start, including pointers and sensitive strings.

Why it matters to the business

Sensitive internal data such as memory pointers and strings can leak from affected Ruby applications, increasing risk of further compromise or data exposure in environments using vulnerable Ruby versions.

How an attack unfolds

An attacker crafts malicious input that reaches the Ruby regex engine, triggering a flaw in the compiler that reads and returns heap memory contents beyond intended bounds.

How to fix it

Upgrade Ruby to 3.0.7, 3.1.5, 3.2.4, or 3.3.1. For GitLab (Bitnami) deployments, upgrade to version 15.1.6 or later that incorporates the fixed Ruby runtime.

How to confirm the fix worked

Verify installed Ruby version matches a fixed release, test regex processing paths with known-safe inputs, and confirm no heap data leaks occur under expected workloads.

Typical attack path

  1. Identify an application or service using vulnerable Ruby that processes untrusted input in regex operations
  2. Supply crafted data to the regex compiler entry point
  3. Observe returned heap contents containing pointers or strings
  4. Use leaked data to inform additional attacks such as memory corruption or credential theft

How to detect it

Review application logs for unusual regex compilation failures or large unexpected outputs from regex operations; examine process memory dumps for evidence of heap reads triggered by external input.

What your security team should do

  • Prioritize upgrade of Ruby runtimes in all affected applications within the next patch cycle
  • Review and restrict untrusted input reaching regex compilation functions
  • Monitor for downstream dependents and apply fixed versions such as GitLab 15.1.6 where applicable

The record

An issue was discovered in Ruby 3.x through 3.3.0. If attacker-supplied data is provided to the Ruby regex compiler, it is possible to extract arbitrary heap data relative to the start of the text, including pointers and sensitive strings. The fixed versions are 3.0.7, 3.1.5, 3.2.4, and 3.3.1.

Affected packages

Ecosystem Package Introduced Fixed
AlmaLinux:8 ruby 0 3.0.7-143.module_el8.10.0+3852+ce828b19
AlmaLinux:8 ruby 0 3.1.5-143.module_el8.10.0+3854+02eaa59a
AlmaLinux:8 ruby 0 3.3.1-2.module_el8.10.0+3855+767cb125
AlmaLinux:8 ruby 0 2.5.9-112.module_el8.10.0+3871+342e2c2f
AlmaLinux:8 ruby-bundled-gems 0 3.1.5-143.module_el8.10.0+3854+02eaa59a
AlmaLinux:8 ruby-bundled-gems 0 3.3.1-2.module_el8.10.0+3855+767cb125
AlmaLinux:8 ruby-default-gems 0 3.0.7-143.module_el8.10.0+3852+ce828b19
AlmaLinux:8 ruby-default-gems 0 3.1.5-143.module_el8.10.0+3854+02eaa59a
AlmaLinux:8 ruby-default-gems 0 3.3.1-2.module_el8.10.0+3855+767cb125
AlmaLinux:8 ruby-devel 0 3.0.7-143.module_el8.10.0+3852+ce828b19
AlmaLinux:8 ruby-devel 0 3.1.5-143.module_el8.10.0+3854+02eaa59a
AlmaLinux:8 ruby-devel 0 3.3.1-2.module_el8.10.0+3855+767cb125
AlmaLinux:8 ruby-devel 0 2.5.9-112.module_el8.10.0+3871+342e2c2f
AlmaLinux:8 ruby-doc 0 3.0.7-143.module_el8.10.0+3852+ce828b19
AlmaLinux:8 ruby-doc 0 3.1.5-143.module_el8.10.0+3854+02eaa59a
AlmaLinux:8 ruby-doc 0 3.3.1-2.module_el8.10.0+3855+767cb125
AlmaLinux:8 ruby-doc 0 2.5.9-112.module_el8.10.0+3871+342e2c2f
AlmaLinux:8 ruby-irb 0 2.5.9-112.module_el8.10.0+3871+342e2c2f
AlmaLinux:8 ruby-libs 0 3.0.7-143.module_el8.10.0+3852+ce828b19
AlmaLinux:8 ruby-libs 0 3.1.5-143.module_el8.10.0+3854+02eaa59a
AlmaLinux:8 ruby-libs 0 3.3.1-2.module_el8.10.0+3855+767cb125
AlmaLinux:8 ruby-libs 0 2.5.9-112.module_el8.10.0+3871+342e2c2f
AlmaLinux:8 rubygem-abrt 0 0.4.0-1.module_el8.10.0+3852+ce828b19
AlmaLinux:8 rubygem-abrt 0 0.4.0-1.module_el8.9.0+3746+91b8233a
AlmaLinux:8 rubygem-abrt 0 0.4.0-1.module_el8.10.0+3799+191214cc
AlmaLinux:8 rubygem-abrt 0 0.3.0-4.module_el8.10.0+3871+342e2c2f
AlmaLinux:8 rubygem-abrt-doc 0 0.4.0-1.module_el8.10.0+3852+ce828b19
AlmaLinux:8 rubygem-abrt-doc 0 0.4.0-1.module_el8.9.0+3746+91b8233a
AlmaLinux:8 rubygem-abrt-doc 0 0.4.0-1.module_el8.10.0+3799+191214cc
AlmaLinux:8 rubygem-abrt-doc 0 0.3.0-4.module_el8.10.0+3871+342e2c2f
AlmaLinux:8 rubygem-bigdecimal 0 3.0.0-143.module_el8.10.0+3852+ce828b19
AlmaLinux:8 rubygem-bigdecimal 0 3.1.1-143.module_el8.10.0+3854+02eaa59a
AlmaLinux:8 rubygem-bigdecimal 0 3.1.5-2.module_el8.10.0+3855+767cb125
AlmaLinux:8 rubygem-bigdecimal 0 1.3.4-112.module_el8.10.0+3871+342e2c2f
AlmaLinux:8 rubygem-bson 0 4.3.0-2.module_el8.5.0+259+8cec6917
AlmaLinux:8 rubygem-bson 0 4.3.0-2.module_el8.5.0+2625+ec418553
AlmaLinux:8 rubygem-bson 0 4.3.0-2.module_el8.6.0+3170+4b08f9d4
AlmaLinux:8 rubygem-bson-doc 0 4.3.0-2.module_el8.5.0+2625+ec418553
AlmaLinux:8 rubygem-bundler 0 2.2.33-143.module_el8.10.0+3852+ce828b19
AlmaLinux:8 rubygem-bundler 0 2.3.27-143.module_el8.10.0+3854+02eaa59a
AlmaLinux:8 rubygem-bundler 0 2.5.9-2.module_el8.10.0+3855+767cb125
AlmaLinux:8 rubygem-bundler 0 1.16.1-4.module_el8.10.0+3871+342e2c2f
AlmaLinux:8 rubygem-bundler-doc 0 1.16.1-4.module_el8.10.0+3871+342e2c2f
AlmaLinux:8 rubygem-did_you_mean 0 1.2.0-112.module_el8.10.0+3871+342e2c2f
AlmaLinux:8 rubygem-io-console 0 0.5.7-143.module_el8.10.0+3852+ce828b19
AlmaLinux:8 rubygem-io-console 0 0.5.11-143.module_el8.10.0+3854+02eaa59a
AlmaLinux:8 rubygem-io-console 0 0.7.1-2.module_el8.10.0+3855+767cb125
AlmaLinux:8 rubygem-io-console 0 0.4.6-112.module_el8.10.0+3871+342e2c2f
AlmaLinux:8 rubygem-irb 0 1.3.5-143.module_el8.10.0+3852+ce828b19
AlmaLinux:8 rubygem-irb 0 1.4.1-143.module_el8.10.0+3854+02eaa59a
AlmaLinux:8 rubygem-irb 0 1.11.0-2.module_el8.10.0+3855+767cb125
AlmaLinux:8 rubygem-json 0 2.5.1-143.module_el8.10.0+3852+ce828b19
AlmaLinux:8 rubygem-json 0 2.6.1-143.module_el8.10.0+3854+02eaa59a
AlmaLinux:8 rubygem-json 0 2.7.1-2.module_el8.10.0+3855+767cb125
AlmaLinux:8 rubygem-json 0 2.1.0-112.module_el8.10.0+3871+342e2c2f
AlmaLinux:8 rubygem-minitest 0 5.14.2-143.module_el8.10.0+3852+ce828b19
AlmaLinux:8 rubygem-minitest 0 5.15.0-143.module_el8.10.0+3854+02eaa59a
AlmaLinux:8 rubygem-minitest 0 5.20.0-2.module_el8.10.0+3855+767cb125
AlmaLinux:8 rubygem-minitest 0 5.10.3-112.module_el8.10.0+3871+342e2c2f
AlmaLinux:8 rubygem-mongo 0 2.5.1-2.module_el8.5.0+2625+ec418553
AlmaLinux:8 rubygem-mongo-doc 0 2.5.1-2.module_el8.5.0+2625+ec418553
AlmaLinux:8 rubygem-mysql2 0 0.5.3-2.module_el8.10.0+3852+ce828b19
AlmaLinux:8 rubygem-mysql2 0 0.5.3-3.module_el8.9.0+3746+91b8233a
AlmaLinux:8 rubygem-mysql2 0 0.5.5-1.module_el8.10.0+3799+191214cc
AlmaLinux:8 rubygem-mysql2 0 0.4.10-4.module_el8.5.0+259+8cec6917
AlmaLinux:8 rubygem-mysql2 0 0.4.10-4.module_el8.5.0+2625+ec418553
AlmaLinux:8 rubygem-mysql2 0 0.4.10-4.module_el8.6.0+3170+4b08f9d4
AlmaLinux:8 rubygem-mysql2-doc 0 0.5.3-2.module_el8.10.0+3852+ce828b19
AlmaLinux:8 rubygem-mysql2-doc 0 0.5.3-3.module_el8.9.0+3746+91b8233a
AlmaLinux:8 rubygem-mysql2-doc 0 0.5.5-1.module_el8.10.0+3799+191214cc
AlmaLinux:8 rubygem-mysql2-doc 0 0.4.10-4.module_el8.5.0+2625+ec418553
AlmaLinux:8 rubygem-net-telnet 0 0.1.1-112.module_el8.10.0+3871+342e2c2f
AlmaLinux:8 rubygem-openssl 0 2.1.2-112.module_el8.10.0+3871+342e2c2f
AlmaLinux:8 rubygem-pg 0 1.2.3-1.module_el8.5.0+118+1ab773e1
AlmaLinux:8 rubygem-pg 0 1.2.3-1.module_el8.5.0+2595+0c654ebc
AlmaLinux:8 rubygem-pg 0 1.2.3-1.module_el8.6.0+3144+d138acf1
AlmaLinux:8 rubygem-pg 0 1.3.2-1.module_el8.9.0+3746+91b8233a
AlmaLinux:8 rubygem-pg 0 1.5.4-1.module_el8.10.0+3799+191214cc
AlmaLinux:8 rubygem-pg 0 1.0.0-3.module_el8.9.0+3635+c6f99506
AlmaLinux:8 rubygem-pg-doc 0 1.2.3-1.module_el8.10.0+3852+ce828b19
AlmaLinux:8 rubygem-pg-doc 0 1.2.3-1.module_el8.5.0+2595+0c654ebc
AlmaLinux:8 rubygem-pg-doc 0 1.3.2-1.module_el8.9.0+3746+91b8233a
AlmaLinux:8 rubygem-pg-doc 0 1.5.4-1.module_el8.10.0+3799+191214cc
AlmaLinux:8 rubygem-pg-doc 0 1.0.0-3.module_el8.9.0+3635+c6f99506
AlmaLinux:8 rubygem-power_assert 0 1.2.1-143.module_el8.10.0+3852+ce828b19
AlmaLinux:8 rubygem-power_assert 0 2.0.1-143.module_el8.10.0+3854+02eaa59a
AlmaLinux:8 rubygem-power_assert 0 2.0.3-2.module_el8.10.0+3855+767cb125
AlmaLinux:8 rubygem-power_assert 0 1.1.1-112.module_el8.10.0+3871+342e2c2f
AlmaLinux:8 rubygem-psych 0 3.3.2-143.module_el8.10.0+3852+ce828b19
AlmaLinux:8 rubygem-psych 0 4.0.4-143.module_el8.10.0+3854+02eaa59a
AlmaLinux:8 rubygem-psych 0 5.1.2-2.module_el8.10.0+3855+767cb125
AlmaLinux:8 rubygem-psych 0 3.0.2-112.module_el8.10.0+3871+342e2c2f
AlmaLinux:8 rubygem-racc 0 1.7.3-2.module_el8.10.0+3855+767cb125
AlmaLinux:8 rubygem-rake 0 13.0.3-143.module_el8.10.0+3852+ce828b19
AlmaLinux:8 rubygem-rake 0 13.0.6-143.module_el8.10.0+3854+02eaa59a
AlmaLinux:8 rubygem-rake 0 13.1.0-2.module_el8.10.0+3855+767cb125
AlmaLinux:8 rubygem-rake 0 12.3.3-112.module_el8.10.0+3871+342e2c2f
AlmaLinux:8 rubygem-rbs 0 1.4.0-143.module_el8.10.0+3852+ce828b19
AlmaLinux:8 rubygem-rbs 0 2.7.0-143.module_el8.10.0+3854+02eaa59a
AlmaLinux:8 rubygem-rbs 0 3.4.0-2.module_el8.10.0+3855+767cb125
AlmaLinux:8 rubygem-rdoc 0 6.3.4.1-143.module_el8.10.0+3852+ce828b19
AlmaLinux:8 rubygem-rdoc 0 6.4.1.1-143.module_el8.10.0+3854+02eaa59a
AlmaLinux:8 rubygem-rdoc 0 6.6.3.1-2.module_el8.10.0+3855+767cb125
AlmaLinux:8 rubygem-rdoc 0 6.0.1.1-112.module_el8.10.0+3871+342e2c2f
AlmaLinux:8 rubygem-rexml 0 3.2.5-143.module_el8.10.0+3852+ce828b19
AlmaLinux:8 rubygem-rexml 0 3.2.5-143.module_el8.10.0+3854+02eaa59a
AlmaLinux:8 rubygem-rexml 0 3.2.6-2.module_el8.10.0+3855+767cb125
AlmaLinux:8 rubygem-rss 0 0.2.9-143.module_el8.10.0+3852+ce828b19
AlmaLinux:8 rubygem-rss 0 0.2.9-143.module_el8.10.0+3854+02eaa59a
AlmaLinux:8 rubygem-rss 0 0.3.0-2.module_el8.10.0+3855+767cb125
AlmaLinux:8 rubygem-test-unit 0 3.3.7-143.module_el8.10.0+3852+ce828b19
AlmaLinux:8 rubygem-test-unit 0 3.5.3-143.module_el8.10.0+3854+02eaa59a
AlmaLinux:8 rubygem-test-unit 0 3.6.1-2.module_el8.10.0+3855+767cb125
AlmaLinux:8 rubygem-test-unit 0 3.2.7-112.module_el8.10.0+3871+342e2c2f
AlmaLinux:8 rubygem-typeprof 0 0.15.2-143.module_el8.10.0+3852+ce828b19
AlmaLinux:8 rubygem-typeprof 0 0.21.3-143.module_el8.10.0+3854+02eaa59a
AlmaLinux:8 rubygem-typeprof 0 0.21.9-2.module_el8.10.0+3855+767cb125
AlmaLinux:8 rubygem-xmlrpc 0 0.3.0-112.module_el8.10.0+3871+342e2c2f
AlmaLinux:8 rubygems 0 3.2.33-143.module_el8.10.0+3852+ce828b19
AlmaLinux:8 rubygems 0 3.3.27-143.module_el8.10.0+3854+02eaa59a
AlmaLinux:8 rubygems 0 3.5.9-2.module_el8.10.0+3855+767cb125
AlmaLinux:8 rubygems 0 2.7.6.3-112.module_el8.10.0+3871+342e2c2f
AlmaLinux:8 rubygems-devel 0 3.2.33-143.module_el8.10.0+3852+ce828b19
AlmaLinux:8 rubygems-devel 0 3.3.27-143.module_el8.10.0+3854+02eaa59a
AlmaLinux:8 rubygems-devel 0 3.5.9-2.module_el8.10.0+3855+767cb125
AlmaLinux:8 rubygems-devel 0 2.7.6.3-112.module_el8.10.0+3871+342e2c2f
AlmaLinux:9 ruby 0 3.1.5-144.module_el9.4.0+101+d58a8d95
AlmaLinux:9 ruby 0 3.3.1-2.module_el9.4.0+102+68a93853
AlmaLinux:9 ruby 0 3.0.7-162.el9_4
AlmaLinux:9 ruby-bundled-gems 0 3.1.5-144.module_el9.4.0+101+d58a8d95
AlmaLinux:9 ruby-bundled-gems 0 3.3.1-2.module_el9.4.0+102+68a93853
AlmaLinux:9 ruby-default-gems 0 3.1.5-144.module_el9.4.0+101+d58a8d95
AlmaLinux:9 ruby-default-gems 0 3.3.1-2.module_el9.4.0+102+68a93853
AlmaLinux:9 ruby-default-gems 0 3.0.7-162.el9_4
AlmaLinux:9 ruby-devel 0 3.1.5-144.module_el9.4.0+101+d58a8d95
AlmaLinux:9 ruby-devel 0 3.3.1-2.module_el9.4.0+102+68a93853
AlmaLinux:9 ruby-devel 0 3.0.7-162.el9_4
AlmaLinux:9 ruby-doc 0 3.1.5-144.module_el9.4.0+101+d58a8d95
AlmaLinux:9 ruby-doc 0 3.3.1-2.module_el9.4.0+102+68a93853
AlmaLinux:9 ruby-doc 0 3.0.7-162.el9_4
AlmaLinux:9 ruby-libs 0 3.1.5-144.module_el9.4.0+101+d58a8d95
AlmaLinux:9 ruby-libs 0 3.3.1-2.module_el9.4.0+102+68a93853
AlmaLinux:9 ruby-libs 0 3.0.7-162.el9_4
AlmaLinux:9 rubygem-bigdecimal 0 3.1.1-144.module_el9.4.0+101+d58a8d95
AlmaLinux:9 rubygem-bigdecimal 0 3.1.5-2.module_el9.4.0+102+68a93853
AlmaLinux:9 rubygem-bigdecimal 0 3.0.0-162.el9_4
AlmaLinux:9 rubygem-bundler 0 2.3.27-144.module_el9.4.0+101+d58a8d95
AlmaLinux:9 rubygem-bundler 0 2.5.9-2.module_el9.4.0+102+68a93853
AlmaLinux:9 rubygem-bundler 0 2.2.33-162.el9_4
AlmaLinux:9 rubygem-io-console 0 0.5.11-144.module_el9.4.0+101+d58a8d95
AlmaLinux:9 rubygem-io-console 0 0.7.1-2.module_el9.4.0+102+68a93853
AlmaLinux:9 rubygem-io-console 0 0.5.7-162.el9_4
AlmaLinux:9 rubygem-irb 0 1.4.1-144.module_el9.4.0+101+d58a8d95
AlmaLinux:9 rubygem-irb 0 1.11.0-2.module_el9.4.0+102+68a93853
AlmaLinux:9 rubygem-irb 0 1.3.5-162.el9_4
AlmaLinux:9 rubygem-json 0 2.6.1-144.module_el9.4.0+101+d58a8d95
AlmaLinux:9 rubygem-json 0 2.7.1-2.module_el9.4.0+102+68a93853
AlmaLinux:9 rubygem-json 0 2.5.1-162.el9_4
AlmaLinux:9 rubygem-minitest 0 5.15.0-144.module_el9.4.0+101+d58a8d95
AlmaLinux:9 rubygem-minitest 0 5.20.0-2.module_el9.4.0+102+68a93853
AlmaLinux:9 rubygem-minitest 0 5.14.2-162.el9_4
AlmaLinux:9 rubygem-mysql2 0 0.5.4-1.module_el9.1.0+8+503f6fbd
AlmaLinux:9 rubygem-mysql2 0 0.5.5-1.module_el9.4.0+75+1a8fe981
AlmaLinux:9 rubygem-mysql2-doc 0 0.5.4-1.module_el9.1.0+8+503f6fbd
AlmaLinux:9 rubygem-mysql2-doc 0 0.5.5-1.module_el9.4.0+75+1a8fe981
AlmaLinux:9 rubygem-pg 0 1.3.5-1.module_el9.1.0+8+503f6fbd
AlmaLinux:9 rubygem-pg 0 1.5.4-1.module_el9.4.0+75+1a8fe981
AlmaLinux:9 rubygem-pg-doc 0 1.3.5-1.module_el9.1.0+8+503f6fbd
AlmaLinux:9 rubygem-pg-doc 0 1.5.4-1.module_el9.4.0+75+1a8fe981
AlmaLinux:9 rubygem-power_assert 0 2.0.1-144.module_el9.4.0+101+d58a8d95
AlmaLinux:9 rubygem-power_assert 0 2.0.3-2.module_el9.4.0+102+68a93853
AlmaLinux:9 rubygem-power_assert 0 1.2.1-162.el9_4
AlmaLinux:9 rubygem-psych 0 4.0.4-144.module_el9.4.0+101+d58a8d95
AlmaLinux:9 rubygem-psych 0 5.1.2-2.module_el9.4.0+102+68a93853
AlmaLinux:9 rubygem-psych 0 3.3.2-162.el9_4
AlmaLinux:9 rubygem-racc 0 1.7.3-2.module_el9.4.0+102+68a93853
AlmaLinux:9 rubygem-rake 0 13.0.6-144.module_el9.4.0+101+d58a8d95
AlmaLinux:9 rubygem-rake 0 13.1.0-2.module_el9.4.0+102+68a93853
AlmaLinux:9 rubygem-rake 0 13.0.3-162.el9_4
AlmaLinux:9 rubygem-rbs 0 2.7.0-144.module_el9.4.0+101+d58a8d95
AlmaLinux:9 rubygem-rbs 0 3.4.0-2.module_el9.4.0+102+68a93853
AlmaLinux:9 rubygem-rbs 0 1.4.0-162.el9_4
AlmaLinux:9 rubygem-rdoc 0 6.4.1.1-144.module_el9.4.0+101+d58a8d95
AlmaLinux:9 rubygem-rdoc 0 6.6.3.1-2.module_el9.4.0+102+68a93853
AlmaLinux:9 rubygem-rdoc 0 6.3.4.1-162.el9_4
AlmaLinux:9 rubygem-rexml 0 3.2.5-144.module_el9.4.0+101+d58a8d95
AlmaLinux:9 rubygem-rexml 0 3.2.6-2.module_el9.4.0+102+68a93853
AlmaLinux:9 rubygem-rexml 0 3.2.5-162.el9_4
AlmaLinux:9 rubygem-rss 0 0.2.9-144.module_el9.4.0+101+d58a8d95
AlmaLinux:9 rubygem-rss 0 0.3.0-2.module_el9.4.0+102+68a93853
AlmaLinux:9 rubygem-rss 0 0.2.9-162.el9_4
AlmaLinux:9 rubygem-test-unit 0 3.5.3-144.module_el9.4.0+101+d58a8d95
AlmaLinux:9 rubygem-test-unit 0 3.6.1-2.module_el9.4.0+102+68a93853
AlmaLinux:9 rubygem-test-unit 0 3.3.7-162.el9_4
AlmaLinux:9 rubygem-typeprof 0 0.21.3-144.module_el9.4.0+101+d58a8d95
AlmaLinux:9 rubygem-typeprof 0 0.21.9-2.module_el9.4.0+102+68a93853
AlmaLinux:9 rubygem-typeprof 0 0.15.2-162.el9_4
AlmaLinux:9 rubygems 0 3.3.27-144.module_el9.4.0+101+d58a8d95
AlmaLinux:9 rubygems 0 3.5.9-2.module_el9.4.0+102+68a93853
AlmaLinux:9 rubygems 0 3.2.33-162.el9_4

Related vulnerabilities