What’s Vulnerable › Vulnerabilities
CVE-2022-28738
- Severity: critical (CVSS 9.8 v3.1)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 3.1% probability of exploitation in the next 30 days
- Public exploit or detection template: none known
- Published: 2022-05-09 · updated 2026-06-17
- Weakness: CWE-415
Description
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.
Affected products
- Ruby: from 3.0.0 before 3.0.4; from 3.1.0 before 3.1.2 — fixed in 3.0.4, 3.1.2
How to fix
Upgrade to a fixed version: Ruby 3.0.4, 3.1.2. Check the vendor advisory for mitigations.
References
- https://hackerone.com/reports/1220911
- https://security-tracker.debian.org/tracker/CVE-2022-28738
- https://security.gentoo.org/glsa/202401-27
- https://security.netapp.com/advisory/ntap-20220624-0002/
- https://www.ruby-lang.org/en/news/2022/04/12/double-free-in-regexp-compilation-cve-2022-28738/
- https://hackerone.com/reports/1220911
- https://security-tracker.debian.org/tracker/CVE-2022-28738
- https://security.gentoo.org/glsa/202401-27
- https://security.netapp.com/advisory/ntap-20220624-0002/
- https://www.ruby-lang.org/en/news/2022/04/12/double-free-in-regexp-compilation-cve-2022-28738/
Get alerted when CVE-2022-28738 or the next vulnerability affects your stack