CVE-2009-4124
CVE-2009-4124 is a critical-severity vulnerability in Ruby-lang Ruby with a CVSS 2.0 base score of 10.0. It is not currently listed as actively exploited by CISA, and its EPSS exploit-prediction score is low. The underlying weakness is classified as CWE-119.
Key facts
- Severity: Critical (CVSS 2.0 base score 10.0)
- EPSS exploit prediction: 4% (89th percentile)
- Actively exploited: Not listed in CISA KEV
- Weakness: CWE-119
- Affected product: Ruby-lang Ruby
- Published:
- Last modified:
Description
Heap-based buffer overflow in the rb_str_justify function in string.c in Ruby 1.9.1 before 1.9.1-p376 allows context-dependent attackers to execute arbitrary code via unspecified vectors involving (1) String#ljust, (2) String#center, or (3) String#rjust. NOTE: some of these details are obtained from third party information.
Frequently asked questions
- What is CVE-2009-4124?
- Heap-based buffer overflow in the rb_str_justify function in string.c in Ruby 1.9.1 before 1.9.1-p376 allows context-dependent attackers to execute arbitrary code via unspecified vectors involving (1) String#ljust, (2) String#center, or (3) String#rjust. NOTE: some of these details are obtained from third party information.
- How severe is CVE-2009-4124?
- CVE-2009-4124 has a CVSS 2.0 base score of 10.0, rated critical severity.
- Is CVE-2009-4124 being actively exploited?
- It is not currently listed in CISA's KEV catalog. Its EPSS exploit-prediction score is 4% (89th percentile), an estimate of the probability of exploitation in the next 30 days.
- What products are affected by CVE-2009-4124?
- CVE-2009-4124 primarily affects Ruby-lang Ruby. In total, 7 product configurations (CPEs) are listed as vulnerable; see the affected-products list for the exact versions.
- How do I fix CVE-2009-4124?
- Review the linked vendor and NVD advisories for patched versions and mitigations, then upgrade or apply the recommended workaround. Given its critical severity, prioritise patching exposed systems.
- When was CVE-2009-4124 published?
- CVE-2009-4124 was published on 2009-12-11 and last updated on 2026-06-16.
References
- http://secunia.com/advisories/37660
- http://www.osvdb.org/60880
- http://www.ruby-lang.org/en/news/2009/12/07/heap-overflow-in-string/
- http://www.securityfocus.com/bid/37278
- http://www.vupen.com/english/advisories/2009/3471
- https://exchange.xforce.ibmcloud.com/vulnerabilities/54674
Affected products (7)
- cpe:2.3:a:ruby-lang:ruby:1.9.1:-p0:*:*:*:*:*:*
- cpe:2.3:a:ruby-lang:ruby:1.9.1:-p129:*:*:*:*:*:*
- cpe:2.3:a:ruby-lang:ruby:1.9.1:-p243:*:*:*:*:*:*
- cpe:2.3:a:ruby-lang:ruby:1.9.1:-preview_1:*:*:*:*:*:*
- cpe:2.3:a:ruby-lang:ruby:1.9.1:-preview_2:*:*:*:*:*:*
- cpe:2.3:a:ruby-lang:ruby:1.9.1:-rc1:*:*:*:*:*:*
- cpe:2.3:a:ruby-lang:ruby:1.9.1:-rc2:*:*:*:*:*:*
More vulnerabilities in Ruby-lang Ruby
- CVE-2008-2663 — Critical (CVSS 10.0): Multiple integer overflows in the rb_ary_store function in Ruby 1.8.4 and earlier, 1.8.5 before 1.8.5-p231, 1.8.6…
- CVE-2008-2662 — Critical (CVSS 10.0): Multiple integer overflows in the rb_str_buf_append function in Ruby 1.8.4 and earlier, 1.8.5 before 1.8.5-p231, 1.8.6…
- CVE-2016-2338 — Critical (CVSS 9.8): An exploitable heap overflow vulnerability exists in the Psych::Emitter start_document function of Ruby. In…
- CVE-2022-28738 — Critical (CVSS 9.8): A double free was found in the Regexp compiler in Ruby 3.x before 3.0.4 and 3.1.x before 3.1.2. If a victim attempts to…
- CVE-2011-4121 — Critical (CVSS 9.8): The OpenSSL extension of Ruby (Git trunk) versions after 2011-09-01 up to 2011-11-03 always generated an exponent value…
- CVE-2018-16395 — Critical (CVSS 9.8): An issue was discovered in the OpenSSL library in Ruby before 2.3.8, 2.4.x before 2.4.5, 2.5.x before 2.5.2, and 2.6.x…
All CVEs affecting Ruby-lang Ruby →
Other CWE-119 (Improper Restriction of Operations within the Bounds of a Memory Buffer) vulnerabilities
- CVE-2026-2778 — Critical (CVSS 10.0): Sandbox escape due to incorrect boundary conditions in the DOM: Core & HTML component. This vulnerability was fixed in…
- CVE-2026-2776 — Critical (CVSS 10.0): Sandbox escape due to incorrect boundary conditions in the Telemetry component in External Software. This vulnerability…
- CVE-2025-1866 — Critical (CVSS 10.0): Improper Restriction of Operations within the Bounds of a Memory Buffer vulnerability in warmcat libwebsockets allows…
- CVE-2022-27625 — Critical (CVSS 10.0): A vulnerability regarding improper restriction of operations within the bounds of a memory buffer is found in the…
- CVE-2022-27624 — Critical (CVSS 10.0): A vulnerability regarding improper restriction of operations within the bounds of a memory buffer is found in the…
- CVE-2020-11896 — Critical (CVSS 10.0): The Treck TCP/IP stack before 6.0.1.66 allows Remote Code Execution, related to IPv4 tunneling.