CVE-2022-28738 json
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.
published 2022-05-09 4 y ago modified 2026-09-08 2 mo ago also BIT-ruby-2022-28738 , BIT-ruby-min-2022-28738 , EUVD-2022-33177
- cvss
- 9.8
- version 3.1, NVD
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 3.1%
- EPSS 3.1% chance of exploitation in 30 days, percentile 87%
- public exploits
- 0
- none known
Summary
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.
Patch / fix
- bitnami ruby 3.0.4, 3.1.2
- bitnami ruby-min 3.0.4, 3.1.2
- ruby-lang ruby 3.0.4, 3.1.2
- ruby3.0 Ubuntu 22.04 LTS 3.0.2-7ubuntu2.1
ubuntu advisories UBUNTU-CVE-2022-28738
Ubuntu security data © Canonical Ltd., from https://github.com/canonical/ubuntu-security-notices via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0
- ruby RHEL 8 3.0.4-141.module+el8.6.0+16311+3e5e17e9
- rubygems RHEL 8 3.2.33-141.module+el8.6.0+16311+3e5e17e9
- ruby-libs RHEL 8 3.0.4-141.module+el8.6.0+16311+3e5e17e9
- rubygem-pg RHEL 8 1.2.3-1.module+el8.5.0+11580+845038eb
- rubygem-irb RHEL 8 1.3.5-141.module+el8.6.0+16311+3e5e17e9
- rubygem-rbs RHEL 8 1.4.0-141.module+el8.6.0+16311+3e5e17e9
- rubygem-rss RHEL 8 0.2.9-141.module+el8.6.0+16311+3e5e17e9
- rubygem-abrt RHEL 8 0.4.0-1.module+el8.5.0+11580+845038eb
red hat advisories RHSA-2022:6450RHSA-2022:6855RHSA-2022:6585
- ruby4.0 openSUSE Tumbleweed 4.0.0~preview2-1.1
- ruby3.4 openSUSE Tumbleweed 3.4.1-1.1
- ruby3.1 openSUSE Tumbleweed 3.1.2-1.1
- ruby3.2 openSUSE Tumbleweed 3.2.1-1.1
- ruby3.3 openSUSE Tumbleweed 3.3.0-1.2
opensuse advisories openSUSE-SU-2025:15819-1openSUSE-SU-2025:14621-1openSUSE-SU-2024:12006-1openSUSE-SU-2024:12712-1openSUSE-SU-2024:13623-1
- ruby AlmaLinux 9 3.0.4-160.el9_0
- rubygems AlmaLinux 9 3.2.33-160.el9_0
- ruby-libs AlmaLinux 9 3.0.4-160.el9_0
- rubygem-irb AlmaLinux 9 1.3.5-160.el9_0
- rubygem-rbs AlmaLinux 9 1.4.0-160.el9_0
- rubygem-rss AlmaLinux 9 0.2.9-160.el9_0
- rubygem-json AlmaLinux 9 2.5.1-160.el9_0
- rubygem-rake AlmaLinux 9 13.0.3-160.el9_0
almalinux advisories ALSA-2022:6585ALSA-2022:6450
- ruby Rocky Linux 9 3.0.4-160.el9_0
- ruby Rocky Linux 8 3.0.4-141.module+el8.6.0+1002+a7dba0ac
- rubygem-pg Rocky Linux 8 1.2.3-1.module+el8.5.0+668+665814fa
- rubygem-pg Rocky Linux 8 1.2.3-1.module+el8.4.0+411+b946f28c
- rubygem-pg Rocky Linux 8 1.2.3-1.module+el8.4.0+594+11b6673a
- rubygem-abrt Rocky Linux 8 0.4.0-1.module+el8.5.0+668+665814fa
- rubygem-abrt Rocky Linux 8 0.4.0-1.module+el8.4.0+411+b946f28c
- rubygem-abrt Rocky Linux 8 0.4.0-1.module+el8.4.0+594+11b6673a
rocky linux advisories RLSA-2022:6585RLSA-2022:6450
- ruby Alpine 3.15 3.0.4-r0
- ruby Alpine 3.24, Alpine 3.23, Alpine 3.22 +6 more 3.1.2-r0
alpine advisories ALPINE-CVE-2022-28738
Alpine secdb © Alpine Linux, from https://secdb.alpinelinux.org via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0
- ruby Arch Linux 3.0.4-1
arch linux advisories AVG-2757
Vendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2022-28738 updated cvss 7.7
Ruby: Double free in Regexp compilation
-
Red Hat CodeReady Linux Builder (v. 9) ruby-doc 3.0.4-160.el9_0fixed: vendor fix RHSA-2022:6585
-
Red Hat Enterprise Linux AppStream (v. 8) ruby 3.0.4-141.module+el8.6.0+16311+3e5e17e9, rubygem-pg 1.2.3-1.module+el8.5.0+11580+845038eb, ruby-libs 3.0.4-141.module+el8.6.0+16311+3e5e17e9, rubygems 3.2.33-141.module+el8.6.0+16311+3e5e17e9, rubygem-abrt 0.4.0-1.module+el8.5.0+11580+845038eb, rubygem-irb 1.3.5-141.module+el8.6.0+16311+3e5e17e9, +16 morefixed: vendor fix RHSA-2022:6450
-
Red Hat Enterprise Linux AppStream (v. 9) ruby 3.0.4-160.el9_0, ruby-libs 3.0.4-160.el9_0, rubygems 3.2.33-160.el9_0, rubygem-irb 1.3.5-160.el9_0, rubygem-rbs 1.4.0-160.el9_0, rubygem-rss 0.2.9-160.el9_0, +13 morefixed: vendor fix RHSA-2022:6585
-
Red Hat Software Collections for RHEL Workstation(v. 7) rh-ruby30-ruby 3.0.4-149.el7, rh-ruby30-ruby-libs 3.0.4-149.el7, rh-ruby30-rubygems 3.2.33-149.el7, rh-ruby30-rubygem-irb 1.3.5-149.el7, rh-ruby30-rubygem-rbs 1.4.0-149.el7, rh-ruby30-rubygem-rss 0.2.9-149.el7, +12 more Red Hat Software Collections for RHEL(v. 7) rh-ruby30-ruby 3.0.4-149.el7, rh-ruby30-ruby-libs 3.0.4-149.el7, rh-ruby30-rubygems 3.2.33-149.el7, rh-ruby30-rubygem-irb 1.3.5-149.el7, rh-ruby30-rubygem-rbs 1.4.0-149.el7, rh-ruby30-rubygem-rss 0.2.9-149.el7, +12 morefixed: vendor fix RHSA-2022:6855
-
Red Hat Enterprise Linux 6 ruby, ruby-ri, ruby-irb, ruby-libs, ruby-rdoc, ruby-tcltk Red Hat Enterprise Linux 7 ruby, ruby-irb, rubygems, ruby-libs, ruby-tcltk, rubygem-json, +6 more Red Hat Enterprise Linux 8 ruby, ruby-irb, rubygems, ruby-libs, rubygem-pg, rubygem-irb, +25 more Red Hat Software Collections rh-ruby27-ruby, rh-ruby27-rubygems, rh-ruby27-ruby-libs, rh-ruby27-rubygem-irb, rh-ruby27-rubygem-json, rh-ruby27-rubygem-racc, +13 morenot affected: vulnerable code not present
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
cisa ICSA-24-046-11 updated cvss 9.8
Siemens SCALANCE XCM-/XRM-300
-
Siemens SCALANCE XCH328 (6GK5328-4TS01-2EC2) <V2.4 Siemens SCALANCE XCM324 (6GK5324-8TS01-2AC2) <V2.4 Siemens SCALANCE XCM328 (6GK5328-4TS01-2AC2) <V2.4 Siemens SCALANCE XCM332 (6GK5332-0GA01-2AC2) <V2.4 Siemens SCALANCE XRH334 (24 V DC, 8xFO, CC) (6GK5334-2TS01-2ER3) <V2.4 Siemens SCALANCE XRM334 (2x230 V AC, 8xFO) (6GK5334-2TS01-4AR3) <V2.4affected: fixed in V2.4 support.industry.siemens.com
+5 more productsfewer
Siemens SCALANCE XRM334 (2x230 V AC, 12xFO) (6GK5334-3TS01-4AR3) <V2.4 Siemens SCALANCE XRM334 (24 V DC, 8xFO) (6GK5334-2TS01-2AR3) <V2.4 Siemens SCALANCE XRM334 (24 V DC, 12xFO) (6GK5334-3TS01-2AR3) <V2.4 Siemens SCALANCE XRM334 (230 V AC, 8xFO) (6GK5334-2TS01-3AR3) <V2.4 Siemens SCALANCE XRM334 (230 V AC, 12xFO) (6GK5334-3TS01-3AR3) <V2.4
Facts from CISA's republication of the vendor's own advisory (CSAF); the linked advisory is the authoritative source. CISA notification · csaf
Exploit prediction
3.14% chance of exploitation in the next 30 days, higher than 87% of all scored CVEs (FIRST EPSS, 2026-11-08).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| NVD | 3.1 | 9.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| NVD | 2.0 | 7.5 | AV:N/AC:L/Au:N/C:P/I:P/A:P |
| OSV | 3.1 | 9.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| bitnami | ruby | >=3.0.0, <3.0.4 >=3.1.0, <3.1.2 |
3.0.4 3.1.2 |
| bitnami | ruby-min | >=3.0.0, <3.0.4 >=3.1.0, <3.1.2 |
3.0.4 3.1.2 |
Classification
- Weakness
-
- CWE-415 Double Free
References
-
security-tracker.debian.org
/tracker/CVE-2022-28738
patch, third-party-advisory, advisory
-
security.gentoo.org
/glsa/202401-27
vendor-advisory, web
-
ruby-lang.org
/en/news/2022/04/12/double-free-in-regexp-compilation-cve-2022-28738/
vendor-advisory, advisory
-
hackerone.com
/reports/1220911
permissions-required, third-party-advisory, advisory
-
security.netapp.com
/advisory/ntap-20220624-0002/
third-party-advisory, advisory
-
nvd.nist.gov
/vuln/detail/CVE-2022-28738
web
Sources
- CVE List CVE-2022-28738
- NVD CVE-2022-28738
- OSV BIT-ruby-2022-28738
- OSV BIT-ruby-min-2022-28738
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.