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

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

Affected products (7)

More vulnerabilities in Ruby-lang Ruby

All CVEs affecting Ruby-lang Ruby →

Other CWE-119 (Improper Restriction of Operations within the Bounds of a Memory Buffer) vulnerabilities

Browse all CWE-119 (Improper Restriction of Operations within the Bounds of a Memory Buffer) vulnerabilities →