cve.bz

CVE-2022-28738 ruby-lang ruby: Double Free

9.8 criticalEPSS 3.1%Fix available

Critical (9.8) in ruby-lang ruby. EPSS 3.1% estimated probability of exploitation activity in the next 30 days.

On this page
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.

Severity

CVSS 3.1

9.8 critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
EPSS
3.1% (unchanged from 3.1% a week ago; 3.0% 30 days ago) estimated probability of exploitation activity in the next 30 days; 88th percentile. Scored 2026-11-22. A forecast for this CVE across the internet, not for your own systems.
CWE
CWE-415 Double Free
Published
Modified
NVD analysis
Analyzed, since modified
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2022-28738 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2022-28738?via=ask-ai-copy and https://cve.bz/cve/CVE-2022-28738?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2022-28738 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the NVD's CPE matches.

ProductAffected
ruby-lang:rubyfrom 3.0.0 before 3.0.4
ruby-lang:rubyfrom 3.1.0 before 3.1.2

Linux distributions

DistributionReleasePackageFixed inAdvisory
Ubuntu18.04:LTSruby2.52.5.1-1ubuntu1.12USN-5462-1
Ubuntu20.04:LTSruby2.72.7.0-5ubuntu1.7USN-5462-1
Ubuntu22.04:LTSruby3.03.0.2-7ubuntu2.1UBUNTU-CVE-2022-28738 USN-5462-1
Red Hatenterprise_linux:8::appstreamruby, ruby-doc, ruby-libs and 5 more0:3.0.4-141.module+el8.6.0+16311+3e5e17e9RHSA-2022:6450
Red Hatenterprise_linux:8::appstreamrubygem-abrt, rubygem-abrt-doc0:0.4.0-1.module+el8.5.0+11580+845038ebRHSA-2022:6450
Red Hatenterprise_linux:8::appstreamrubygem-bigdecimal, rubygem-bigdecimal-debuginfo0:3.0.0-141.module+el8.6.0+16311+3e5e17e9RHSA-2022:6450
Red Hatenterprise_linux:8::appstreamrubygem-bundler0:2.2.33-141.module+el8.6.0+16311+3e5e17e9RHSA-2022:6450
Red Hatenterprise_linux:8::appstreamrubygem-io-console, rubygem-io-console-debuginfo0:0.5.7-141.module+el8.6.0+16311+3e5e17e9RHSA-2022:6450
Red Hatenterprise_linux:8::appstreamrubygem-irb0:1.3.5-141.module+el8.6.0+16311+3e5e17e9RHSA-2022:6450
Red Hatenterprise_linux:8::appstreamrubygem-json, rubygem-json-debuginfo0:2.5.1-141.module+el8.6.0+16311+3e5e17e9RHSA-2022:6450
Red Hatenterprise_linux:8::appstreamrubygem-minitest0:5.14.2-141.module+el8.6.0+16311+3e5e17e9RHSA-2022:6450
Red Hatenterprise_linux:8::appstreamrubygem-mysql2, rubygem-mysql2-doc, rubygem-mysql2-debuginfo and 1 more0:0.5.3-1.module+el8.5.0+11580+845038ebRHSA-2022:6450
Red Hatenterprise_linux:8::appstreamrubygem-pg, rubygem-pg-doc, rubygem-pg-debuginfo and 1 more0:1.2.3-1.module+el8.5.0+11580+845038ebRHSA-2022:6450
Red Hatenterprise_linux:8::appstreamrubygem-power_assert0:1.2.0-141.module+el8.6.0+16311+3e5e17e9RHSA-2022:6450
Red Hatenterprise_linux:8::appstreamrubygem-psych, rubygem-psych-debuginfo0:3.3.2-141.module+el8.6.0+16311+3e5e17e9RHSA-2022:6450
42 more for Red Hat in the JSON and on Red Hat's page.
openSUSETumbleweedruby3.13.1.2-1.1openSUSE-SU-2024:12006-1
openSUSETumbleweedruby3.23.2.1-1.1openSUSE-SU-2024:12712-1
openSUSETumbleweedruby3.33.3.0-1.2openSUSE-SU-2024:13623-1
openSUSETumbleweedruby3.43.4.1-1.1openSUSE-SU-2025:14621-1
openSUSETumbleweedruby4.04.0.0~preview2-1.1openSUSE-SU-2025:15819-1
AlmaLinux8ruby, ruby-doc, ruby-libs and 2 more3.0.4-141.module_el8.6.0+3263+41cde0c0ALSA-2022:6450
AlmaLinux8rubygem-abrt, rubygem-abrt-doc0.4.0-1.module_el8.5.0+2595+0c654ebcALSA-2022:6450
AlmaLinux8rubygem-bigdecimal3.0.0-141.module_el8.6.0+3263+41cde0c0ALSA-2022:6450
AlmaLinux8rubygem-bundler2.2.33-141.module_el8.6.0+3263+41cde0c0ALSA-2022:6450
AlmaLinux8rubygem-io-console0.5.7-141.module_el8.6.0+3263+41cde0c0ALSA-2022:6450
AlmaLinux8rubygem-irb1.3.5-141.module_el8.6.0+3263+41cde0c0ALSA-2022:6450
AlmaLinux8rubygem-json2.5.1-141.module_el8.6.0+3263+41cde0c0ALSA-2022:6450
AlmaLinux8rubygem-minitest5.14.2-141.module_el8.6.0+3263+41cde0c0ALSA-2022:6450
AlmaLinux8rubygem-mysql20.5.3-1.module_el8.5.0+118+1ab773e1ALSA-2022:6450
AlmaLinux8rubygem-mysql20.5.3-1.module_el8.6.0+3144+d138acf1ALSA-2022:6450
AlmaLinux8rubygem-mysql2, rubygem-mysql2-doc0.5.3-1.module_el8.5.0+2595+0c654ebcALSA-2022:6450
AlmaLinux8rubygem-pg1.2.3-1.module_el8.5.0+118+1ab773e1ALSA-2022:6450
29 more for AlmaLinux in the JSON.
Rocky Linux8ruby0:3.0.4-141.module+el8.6.0+1002+a7dba0acRLSA-2022:6450
Rocky Linux8rubygem-abrt0:0.4.0-1.module+el8.4.0+411+b946f28cRLSA-2022:6450
Rocky Linux8rubygem-abrt0:0.4.0-1.module+el8.4.0+594+11b6673aRLSA-2022:6450
Rocky Linux8rubygem-abrt0:0.4.0-1.module+el8.5.0+668+665814faRLSA-2022:6450
Rocky Linux8rubygem-mysql20:0.5.3-1.module+el8.4.0+411+b946f28cRLSA-2022:6450
Rocky Linux8rubygem-mysql20:0.5.3-1.module+el8.4.0+594+11b6673aRLSA-2022:6450
Rocky Linux8rubygem-mysql20:0.5.3-1.module+el8.5.0+668+665814faRLSA-2022:6450
Rocky Linux8rubygem-pg0:1.2.3-1.module+el8.4.0+411+b946f28cRLSA-2022:6450
Rocky Linux8rubygem-pg0:1.2.3-1.module+el8.4.0+594+11b6673aRLSA-2022:6450
Rocky Linux8rubygem-pg0:1.2.3-1.module+el8.5.0+668+665814faRLSA-2022:6450
Rocky Linux9ruby0:3.0.4-160.el9_0RLSA-2022:6585
Alpinev3.15ruby3.0.4-r0ALPINE-CVE-2022-28738
Alpinev3.16, v3.17, v3.18 and 6 moreruby3.1.2-r0ALPINE-CVE-2022-28738

From the distributions' data via OSV.dev: Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; Red Hat Security Data © Red Hat, Inc., CC BY 4.0; SUSE security data, CC BY 4.0; AlmaLinux's OSV database, MIT; Rocky Linux's errata, BSD-3-Clause; the Alpine secdb, CC BY-SA 4.0. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Ubuntu · Red Hat · openSUSE · Alpine.

Red Hat

Red Hat rates this Moderate.

Red Hat's statement

Ruby 2.6 series and 2.7 series are not affected.

ProductPackageStateAdvisory
Red Hat Enterprise Linux 8ruby:3.0-8060020220810162001.ad008a3aFixed 2022-09-13RHSA-2022:6450
Red Hat Enterprise Linux 9ruby-0:3.0.4-160.el9_0Fixed 2022-09-20RHSA-2022:6585
Red Hat Software Collections for Red Hat Enterprise Linux 7rh-ruby30-ruby-0:3.0.4-149.el7Fixed 2022-10-11RHSA-2022:6855
Red Hat Enterprise Linux 6rubyNot affected
Red Hat Enterprise Linux 7rubyNot affected
Red Hat Enterprise Linux 8ruby:2.5/rubyNot affected
Red Hat Enterprise Linux 8ruby:2.6/rubyNot affected
Red Hat Enterprise Linux 8ruby:2.7/rubyNot affected
Red Hat Software Collectionsrh-ruby27-rubyNot affected

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2022-28738.

ICS advisories (CISA)

AdvisoryTitlePublishedSectorsAffectedFixed
ICSA-24-046-11Siemens SCALANCE XCM-/XRM-3002024-02-13MultipleSCALANCE XCH328 (6GK5328-4TS01-2EC2), SCALANCE XCM324 (6GK5324-8TS01-2AC2), SCALANCE XCM328 (6GK5328-4TS01-2AC2) and 8 morenone listed

From CISA's ICS advisories (CSAF), provided under CISA's notification. Only the facts are shown; each advisory is on CISA's page. Credits.

References

Check your stackJSON