CVE-2022-28738: Ruby-Lang Ruby
Critical severity, CVSS 9.8. EPSS: 2.7% probability of exploitation activity in the next 30 days.
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 create a Regexp from untrusted user input, an attacker may be able to write to unexpected memory locations.
What to do
The record states a fixed version for each range of affected versions. Update to the one for the range your version is in: a later release on another branch may not have the fix.
- Ruby-Lang Ruby, from 3.0.0, before 3.0.4: fixed in 3.0.4
- Ruby-Lang Ruby, from 3.1.0, before 3.1.2: fixed in 3.1.2
Affected products
- Ruby-Lang Ruby: from 3.0.0, before 3.0.4 (fixed in 3.0.4); from 3.1.0, before 3.1.2 (fixed in 3.1.2)
Published 2022-05-09. Last modified 2026-06-17.