Vulnerabilities · 2022 · Ruby-lang
CVE-2022-28738
Ruby-lang Ruby vulnerability
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.
High priority: this vulnerability is rated critical and can be attacked over the network without a login.
Affected products
Ruby. The exact versions are in the references.
What to do now
- Check your exposureFind out whether Ruby-lang Ruby runs anywhere in your environment, including systems of suppliers.
- UpdateInstall the version in which the vendor fixed the vulnerability. The references lead to the advisory.
- Limit access until thenIf you cannot update at once, take the system off the internet or restrict who can reach it.
References
- www.ruby-lang.org/en/news/2022/04/12/double-free-in-regexp-compilation-cve-2022-28738/ · Vendor Advisory
- security-tracker.debian.org/tracker/CVE-2022-28738 · Patch
- hackerone.com/reports/1220911 · Third Party Advisory
- security.netapp.com/advisory/ntap-20220624-0002/ · Third Party Advisory
- security.gentoo.org/glsa/202401-27
- nvd.nist.gov/vuln/detail/CVE-2022-28738
- cve.org/CVERecord?id=CVE-2022-28738
More vulnerabilities in Ruby-lang products
CVE-2026-46727CVE-2025-58767CVE-2025-43857CVE-2025-27788CVE-2025-27221CVE-2025-27220CVE-2025-27219CVE-2025-6442All 115
Data: CVE list and the NVD. This product uses data from the NVD API but is not endorsed or certified by the NVD.