Skip to content
OpenAdvisories
Unscored CVE-2022-28738 EUVD-2022-33177GHSA-8pqg-8p79-j5j8

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 fro…

Published May 9, 2022 · Updated Aug 3, 2024 · Assigned by mitre

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.

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Ubuntu 22.04 LTS ruby3.0 3.0.2-7ubuntu2.1 USN-5462-1
Ubuntu 20.04 LTS ruby2.7 2.7.0-5ubuntu1.7 USN-5462-1
Ubuntu 18.04 LTS ruby2.5 2.5.1-1ubuntu1.12 USN-5462-1
ReleasePackageFixed inAdvisory
RHEL 9 ruby +4 3.0.4-160.el9_0 RHSA-2022:6585
RHEL 9 rubygem-bigdecimal 3.0.0-160.el9_0 RHSA-2022:6585
RHEL 9 rubygem-bundler 2.2.33-160.el9_0 RHSA-2022:6585
RHEL 9 rubygem-io-console 0.5.7-160.el9_0 RHSA-2022:6585
RHEL 9 rubygem-irb 1.3.5-160.el9_0 RHSA-2022:6585
RHEL 9 rubygem-json 2.5.1-160.el9_0 RHSA-2022:6585
RHEL 9 rubygem-minitest 5.14.2-160.el9_0 RHSA-2022:6585
RHEL 9 rubygem-power_assert 1.2.0-160.el9_0 RHSA-2022:6585
RHEL 9 rubygem-psych 3.3.2-160.el9_0 RHSA-2022:6585
RHEL 9 rubygem-rake 13.0.3-160.el9_0 RHSA-2022:6585
RHEL 9 rubygem-rbs 1.4.0-160.el9_0 RHSA-2022:6585
RHEL 9 rubygem-rdoc 6.3.3-160.el9_0 RHSA-2022:6585
RHEL 9 rubygem-rexml 3.2.5-160.el9_0 RHSA-2022:6585
RHEL 9 rubygem-rss 0.2.9-160.el9_0 RHSA-2022:6585
RHEL 9 rubygem-test-unit 3.3.7-160.el9_0 RHSA-2022:6585
RHEL 9 rubygem-typeprof 0.15.2-160.el9_0 RHSA-2022:6585
RHEL 9 rubygems +1 3.2.33-160.el9_0 RHSA-2022:6585
RHEL 8 ruby +4 3.0.4-141.module+el8.6.0+16311+3e5e17e9 RHSA-2022:6450
RHEL 8 rubygem-abrt +1 0.4.0-1.module+el8.5.0+11580+845038eb RHSA-2022:6450
RHEL 8 rubygem-bigdecimal 3.0.0-141.module+el8.6.0+16311+3e5e17e9 RHSA-2022:6450
RHEL 8 rubygem-bundler 2.2.33-141.module+el8.6.0+16311+3e5e17e9 RHSA-2022:6450
RHEL 8 rubygem-io-console 0.5.7-141.module+el8.6.0+16311+3e5e17e9 RHSA-2022:6450
RHEL 8 rubygem-irb 1.3.5-141.module+el8.6.0+16311+3e5e17e9 RHSA-2022:6450
RHEL 8 rubygem-json 2.5.1-141.module+el8.6.0+16311+3e5e17e9 RHSA-2022:6450
RHEL 8 rubygem-minitest 5.14.2-141.module+el8.6.0+16311+3e5e17e9 RHSA-2022:6450
RHEL 8 rubygem-mysql2 +1 0.5.3-1.module+el8.5.0+11580+845038eb RHSA-2022:6450
RHEL 8 rubygem-pg +1 1.2.3-1.module+el8.5.0+11580+845038eb RHSA-2022:6450
RHEL 8 rubygem-power_assert 1.2.0-141.module+el8.6.0+16311+3e5e17e9 RHSA-2022:6450
RHEL 8 rubygem-psych 3.3.2-141.module+el8.6.0+16311+3e5e17e9 RHSA-2022:6450
RHEL 8 rubygem-rake 13.0.3-141.module+el8.6.0+16311+3e5e17e9 RHSA-2022:6450
RHEL 8 rubygem-rbs 1.4.0-141.module+el8.6.0+16311+3e5e17e9 RHSA-2022:6450
RHEL 8 rubygem-rdoc 6.3.3-141.module+el8.6.0+16311+3e5e17e9 RHSA-2022:6450
RHEL 8 rubygem-rexml 3.2.5-141.module+el8.6.0+16311+3e5e17e9 RHSA-2022:6450
RHEL 8 rubygem-rss 0.2.9-141.module+el8.6.0+16311+3e5e17e9 RHSA-2022:6450
RHEL 8 rubygem-test-unit 3.3.7-141.module+el8.6.0+16311+3e5e17e9 RHSA-2022:6450
RHEL 8 rubygem-typeprof 0.15.2-141.module+el8.6.0+16311+3e5e17e9 RHSA-2022:6450
RHEL 8 rubygems +1 3.2.33-141.module+el8.6.0+16311+3e5e17e9 RHSA-2022:6450
RHEL 3 rh-ruby30-ruby +4 3.0.4-149.el7 RHSA-2022:6855
RHEL 3 rh-ruby30-rubygem-bigdecimal 3.0.0-149.el7 RHSA-2022:6855
RHEL 3 rh-ruby30-rubygem-bundler 2.2.33-149.el7 RHSA-2022:6855
RHEL 3 rh-ruby30-rubygem-io-console 0.5.7-149.el7 RHSA-2022:6855
RHEL 3 rh-ruby30-rubygem-irb 1.3.5-149.el7 RHSA-2022:6855
RHEL 3 rh-ruby30-rubygem-json 2.5.1-149.el7 RHSA-2022:6855
RHEL 3 rh-ruby30-rubygem-minitest 5.14.2-149.el7 RHSA-2022:6855
RHEL 3 rh-ruby30-rubygem-power_assert 1.2.0-149.el7 RHSA-2022:6855
RHEL 3 rh-ruby30-rubygem-psych 3.3.2-149.el7 RHSA-2022:6855
RHEL 3 rh-ruby30-rubygem-rake 13.0.3-149.el7 RHSA-2022:6855
RHEL 3 rh-ruby30-rubygem-rbs 1.4.0-149.el7 RHSA-2022:6855
RHEL 3 rh-ruby30-rubygem-rexml 3.2.5-149.el7 RHSA-2022:6855
RHEL 3 rh-ruby30-rubygem-rss 0.2.9-149.el7 RHSA-2022:6855
RHEL 3 rh-ruby30-rubygem-test-unit 3.3.7-149.el7 RHSA-2022:6855
RHEL 3 rh-ruby30-rubygem-typeprof 0.15.2-149.el7 RHSA-2022:6855
RHEL 3 rh-ruby30-rubygems +1 3.2.33-149.el7 RHSA-2022:6855

AlmaLinux

Errata ↗
ReleasePackageFixed inAdvisory
AlmaLinux 9 ruby +4 3.0.4-160.el9_0 ALSA-2022:6585
AlmaLinux 9 rubygem-bigdecimal 3.0.0-160.el9_0 ALSA-2022:6585
AlmaLinux 9 rubygem-bundler 2.2.33-160.el9_0 ALSA-2022:6585
AlmaLinux 9 rubygem-io-console 0.5.7-160.el9_0 ALSA-2022:6585
AlmaLinux 9 rubygem-irb 1.3.5-160.el9_0 ALSA-2022:6585
AlmaLinux 9 rubygem-json 2.5.1-160.el9_0 ALSA-2022:6585
AlmaLinux 9 rubygem-minitest 5.14.2-160.el9_0 ALSA-2022:6585
AlmaLinux 9 rubygem-power_assert 1.2.0-160.el9_0 ALSA-2022:6585
AlmaLinux 9 rubygem-psych 3.3.2-160.el9_0 ALSA-2022:6585
AlmaLinux 9 rubygem-rake 13.0.3-160.el9_0 ALSA-2022:6585
AlmaLinux 9 rubygem-rbs 1.4.0-160.el9_0 ALSA-2022:6585
AlmaLinux 9 rubygem-rdoc 6.3.3-160.el9_0 ALSA-2022:6585
AlmaLinux 9 rubygem-rexml 3.2.5-160.el9_0 ALSA-2022:6585
AlmaLinux 9 rubygem-rss 0.2.9-160.el9_0 ALSA-2022:6585
AlmaLinux 9 rubygem-test-unit 3.3.7-160.el9_0 ALSA-2022:6585
AlmaLinux 9 rubygem-typeprof 0.15.2-160.el9_0 ALSA-2022:6585
AlmaLinux 9 rubygems +1 3.2.33-160.el9_0 ALSA-2022:6585
AlmaLinux 8 ruby +4 3.0.4-141.module_el8.6.0+3263+41cde0c0 ALSA-2022:6450
AlmaLinux 8 rubygem-abrt +1 0.4.0-1.module_el8.5.0+2595+0c654ebc ALSA-2022:6450
AlmaLinux 8 rubygem-bigdecimal 3.0.0-141.module_el8.6.0+3263+41cde0c0 ALSA-2022:6450
AlmaLinux 8 rubygem-bundler 2.2.33-141.module_el8.6.0+3263+41cde0c0 ALSA-2022:6450
AlmaLinux 8 rubygem-io-console 0.5.7-141.module_el8.6.0+3263+41cde0c0 ALSA-2022:6450
AlmaLinux 8 rubygem-irb 1.3.5-141.module_el8.6.0+3263+41cde0c0 ALSA-2022:6450
AlmaLinux 8 rubygem-json 2.5.1-141.module_el8.6.0+3263+41cde0c0 ALSA-2022:6450
AlmaLinux 8 rubygem-minitest 5.14.2-141.module_el8.6.0+3263+41cde0c0 ALSA-2022:6450
AlmaLinux 8 rubygem-mysql2 0.5.3-1.module_el8.5.0+118+1ab773e1 ALSA-2022:6450
AlmaLinux 8 rubygem-mysql2-doc 0.5.3-1.module_el8.5.0+2595+0c654ebc ALSA-2022:6450
AlmaLinux 8 rubygem-pg 1.2.3-1.module_el8.5.0+118+1ab773e1 ALSA-2022:6450
AlmaLinux 8 rubygem-pg-doc 1.2.3-1.module_el8.5.0+2595+0c654ebc ALSA-2022:6450
AlmaLinux 8 rubygem-power_assert 1.2.0-141.module_el8.6.0+3263+41cde0c0 ALSA-2022:6450
AlmaLinux 8 rubygem-psych 3.3.2-141.module_el8.6.0+3263+41cde0c0 ALSA-2022:6450
AlmaLinux 8 rubygem-rake 13.0.3-141.module_el8.6.0+3263+41cde0c0 ALSA-2022:6450
AlmaLinux 8 rubygem-rbs 1.4.0-141.module_el8.6.0+3263+41cde0c0 ALSA-2022:6450
AlmaLinux 8 rubygem-rdoc 6.3.3-141.module_el8.6.0+3263+41cde0c0 ALSA-2022:6450
AlmaLinux 8 rubygem-rexml 3.2.5-141.module_el8.6.0+3263+41cde0c0 ALSA-2022:6450
AlmaLinux 8 rubygem-rss 0.2.9-141.module_el8.6.0+3263+41cde0c0 ALSA-2022:6450
AlmaLinux 8 rubygem-test-unit 3.3.7-141.module_el8.6.0+3263+41cde0c0 ALSA-2022:6450
AlmaLinux 8 rubygem-typeprof 0.15.2-141.module_el8.6.0+3263+41cde0c0 ALSA-2022:6450
AlmaLinux 8 rubygems +1 3.2.33-141.module_el8.6.0+3263+41cde0c0 ALSA-2022:6450

Rocky Linux

Errata ↗
ReleasePackageFixed inAdvisory
Rocky Linux 9 ruby 3.0.4-160.el9_0 RLSA-2022:6585
Rocky Linux 8 ruby 3.0.4-141.module+el8.6.0+1002+a7dba0ac RLSA-2022:6450
Rocky Linux 8 rubygem-abrt 0.4.0-1.module+el8.4.0+411+b946f28c RLSA-2022:6450
Rocky Linux 8 rubygem-mysql2 0.5.3-1.module+el8.4.0+411+b946f28c RLSA-2022:6450
Rocky Linux 8 rubygem-pg 1.2.3-1.module+el8.4.0+411+b946f28c RLSA-2022:6450
ReleasePackageFixed inAdvisory
openSUSE Tumbleweed ruby3.1 3.1.2-1.1 openSUSE-SU-2024:12006-1
openSUSE Tumbleweed ruby3.2 3.2.1-1.1 openSUSE-SU-2024:12712-1
openSUSE Tumbleweed ruby3.3 3.3.0-1.2 openSUSE-SU-2024:13623-1
openSUSE Tumbleweed ruby3.4 3.4.1-1.1 openSUSE-SU-2025:14621-1
openSUSE Tumbleweed ruby4.0 4.0.0~preview2-1.1 openSUSE-SU-2025:15819-1
ReleasePackageFixed inAdvisory
Alpine v3.24 ruby 3.1.2-r0 —
Alpine v3.23 ruby 3.1.2-r0 —
Alpine v3.22 ruby 3.1.2-r0 —
Alpine v3.21 ruby 3.1.2-r0 —
Alpine v3.20 ruby 3.1.2-r0 —
Show 5 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
Alpine v3.19 ruby 3.1.2-r0 —
Alpine v3.18 ruby 3.1.2-r0 —
Alpine v3.17 ruby 3.1.2-r0 —
Alpine v3.16 ruby 3.1.2-r0 —
Alpine v3.15 ruby 3.0.4-r0 —

Oracle Linux

ReleasePackageFixed inAdvisory
Oracle Linux 9 ruby +4 3.0.4-160.el9_0 ELSA-2022-6585
Oracle Linux 9 rubygem-bigdecimal 3.0.0-160.el9_0 ELSA-2022-6585
Oracle Linux 9 rubygem-bundler 2.2.33-160.el9_0 ELSA-2022-6585
Oracle Linux 9 rubygem-io-console 0.5.7-160.el9_0 ELSA-2022-6585
Oracle Linux 9 rubygem-irb 1.3.5-160.el9_0 ELSA-2022-6585
Oracle Linux 9 rubygem-json 2.5.1-160.el9_0 ELSA-2022-6585
Oracle Linux 9 rubygem-minitest 5.14.2-160.el9_0 ELSA-2022-6585
Oracle Linux 9 rubygem-power_assert 1.2.0-160.el9_0 ELSA-2022-6585
Oracle Linux 9 rubygem-psych 3.3.2-160.el9_0 ELSA-2022-6585
Oracle Linux 9 rubygem-rake 13.0.3-160.el9_0 ELSA-2022-6585
Oracle Linux 9 rubygem-rbs 1.4.0-160.el9_0 ELSA-2022-6585
Oracle Linux 9 rubygem-rdoc 6.3.3-160.el9_0 ELSA-2022-6585
Oracle Linux 9 rubygem-rexml 3.2.5-160.el9_0 ELSA-2022-6585
Oracle Linux 9 rubygem-rss 0.2.9-160.el9_0 ELSA-2022-6585
Oracle Linux 9 rubygem-test-unit 3.3.7-160.el9_0 ELSA-2022-6585
Oracle Linux 9 rubygem-typeprof 0.15.2-160.el9_0 ELSA-2022-6585
Oracle Linux 9 rubygems +1 3.2.33-160.el9_0 ELSA-2022-6585
Oracle Linux 8 ruby +4 3.0.4-141.module+el8.6.0+20741+4fdba061 ELSA-2022-6450
Oracle Linux 8 rubygem-abrt +1 0.4.0-1.module+el8.5.0+20321+0ba6c954 ELSA-2022-6450
Oracle Linux 8 rubygem-bigdecimal 3.0.0-141.module+el8.6.0+20741+4fdba061 ELSA-2022-6450
Oracle Linux 8 rubygem-bundler 2.2.33-141.module+el8.6.0+20741+4fdba061 ELSA-2022-6450
Oracle Linux 8 rubygem-io-console 0.5.7-141.module+el8.6.0+20741+4fdba061 ELSA-2022-6450
Oracle Linux 8 rubygem-irb 1.3.5-141.module+el8.6.0+20741+4fdba061 ELSA-2022-6450
Oracle Linux 8 rubygem-json 2.5.1-141.module+el8.6.0+20741+4fdba061 ELSA-2022-6450
Oracle Linux 8 rubygem-minitest 5.14.2-141.module+el8.6.0+20741+4fdba061 ELSA-2022-6450
Oracle Linux 8 rubygem-mysql2 +1 0.5.3-1.module+el8.5.0+20321+0ba6c954 ELSA-2022-6450
Oracle Linux 8 rubygem-pg +1 1.2.3-1.module+el8.5.0+20321+0ba6c954 ELSA-2022-6450
Oracle Linux 8 rubygem-power_assert 1.2.0-141.module+el8.6.0+20741+4fdba061 ELSA-2022-6450
Oracle Linux 8 rubygem-psych 3.3.2-141.module+el8.6.0+20741+4fdba061 ELSA-2022-6450
Oracle Linux 8 rubygem-rake 13.0.3-141.module+el8.6.0+20741+4fdba061 ELSA-2022-6450
Oracle Linux 8 rubygem-rbs 1.4.0-141.module+el8.6.0+20741+4fdba061 ELSA-2022-6450
Oracle Linux 8 rubygem-rdoc 6.3.3-141.module+el8.6.0+20741+4fdba061 ELSA-2022-6450
Oracle Linux 8 rubygem-rexml 3.2.5-141.module+el8.6.0+20741+4fdba061 ELSA-2022-6450
Oracle Linux 8 rubygem-rss 0.2.9-141.module+el8.6.0+20741+4fdba061 ELSA-2022-6450
Oracle Linux 8 rubygem-test-unit 3.3.7-141.module+el8.6.0+20741+4fdba061 ELSA-2022-6450
Oracle Linux 8 rubygem-typeprof 0.15.2-141.module+el8.6.0+20741+4fdba061 ELSA-2022-6450
Oracle Linux 8 rubygems +1 3.2.33-141.module+el8.6.0+20741+4fdba061 ELSA-2022-6450

Advisories 19

References