# CVE-2022-28738

- Priority: **Prioritise**
- Reason: Severe, CVSS 9.8 (NVD); no exploitation reported by the 5 checked sources; EPSS 3% (FIRST, 04-12-2026)
- Next step: Check applicability: affected before 3.0.4, 3.1.2 (CNA); fix release not confirmed
- Status: published
- Published: 2022-05-09 · Modified: 2024-08-03
- Aliases: ALPINE-CVE-2022-28738, UBUNTU-CVE-2022-28738
- Record: https://cvemate.com/vulnerability/CVE-2022-28738 · JSON: https://cvemate.com/vulnerability/CVE-2022-28738/json

## Description

```text
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.
```

## Signals

- CVSS: 9.8 critical (v3.1, NVD) CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
- EPSS: 3.138%, percentile 88.312%, as of 2026-12-04
- Known exploited (KEV): CISA not listed, ENISA not listed, CIRCL not listed
- Ransomware use: none recorded
- Public exploits: 0

## Affected

- alpine ruby (Alpine Linux): ≥ 3.0.0, \< 3.1.2-r0 \| ≥ 3.0.0, \< 3.0.4-r0 \| ≥ 3.1.0, \< 3.1.2-r0
- ubuntu ruby3.0 (Ubuntu): \< 3.0.2-7ubuntu2.1
- ruby-lang ruby: ≥ 3.0.0, \< 3.0.4 \| ≥ 3.1.0, \< 3.1.2

## References

- <https://hackerone.com/reports/1220911>
- <https://www.ruby-lang.org/en/news/2022/04/12/double-free-in-regexp-compilation-cve-2022-28738/>
- <https://security-tracker.debian.org/tracker/CVE-2022-28738>
- <https://security.netapp.com/advisory/ntap-20220624-0002/>
- <https://security.gentoo.org/glsa/202401-27>
- <https://security.alpinelinux.org/vuln/CVE-2022-28738>
- <https://ubuntu.com/security/CVE-2022-28738>
- <https://github.com/ruby/ruby/commit/052ec6d2585c3ace95671013d336f5543624ef3d>
- <https://github.com/ruby/ruby/commit/73f45e5e96ccc13a131f7c0122cf8600ce5b930f>
- <https://access.redhat.com/security/cve/CVE-2022-28738>
- <https://ubuntu.com/security/notices/USN-5462-1>
- <https://www.cve.org/CVERecord?id=CVE-2022-28738>

---

Data as of 2026-12-05T04:23:13.186Z. The priority label is CveMate's own model from public evidence, not an official rating, and it knows nothing about your assets. How labels are decided: https://cvemate.com/faq#priority
