Skip to content
Noroxi
NVD / CVE Program· CNA mitre

CVE-2022-28738: 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.

Noroxi assessment

Priority: Plan (action score 40/100)

  • The sources we track (CISA KEV, Exploit-DB, Metasploit, Nuclei, GitHub) show no public exploit code or exploitation in the wild.
  • Probability of exploitation in the next 30 days: 3.1% (FIRST EPSS); higher than 87.9% of all records.
  • Anyone who can reach it over the internet can trigger it. No account or password is required. No user action is required. No special conditions are required; it is repeatable.
  • Fixed version: ruby (AlmaLinux:8) 3.0.4-141.module_el8.6.0+3263+41cde0c0; ruby-default-gems (AlmaLinux:8) 3.0.4-141.module_el8.6.0+3263+41cde0c0; ruby-devel (AlmaLinux:8) 3.0.4-141.module_el8.6.0+3263+41cde0c0.

Add it to your regular patch cycle. Upgrade to ruby (AlmaLinux:8) 3.0.4-141.module_el8.6.0+3263+41cde0c0; ruby-default-gems (AlmaLinux:8) 3.0.4-141.module_el8.6.0+3263+41cde0c0; ruby-devel (AlmaLinux:8) 3.0.4-141.module_el8.6.0+3263+41cde0c0 or later.

Generated automatically from the record's data: CVSS (NVD and CNA), CISA KEV and SSVC, FIRST EPSS, exploit sources, fixed versions. How we calculate it

Primary sources: NVD · CVE.org · FIRST EPSS

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.

CriticalCVSS 9.8 · v3.1—No exploit Fix available
Published
May 9, 2022
Updated
Jun 17, 2026
EPSS
3.1% · 87th percentile

Report tools

JSON

Action score

40

Plan

Add it to your regular patch cycle.

CVSS
39 / 40 · 9.8 / 10
CISA KEV
0 / 30 · Not listed
EPSS
1 / 30 · 3.1%

Get told when this record changes

  • Not in KEV: no record of exploitation in the wild
  • No public exploit code on record
  • A fix has been released

If any of these changes, we'll tell you in the daily email digest.

Follow CVE-2022-28738

When you'll hear from us

  • when it enters CISA KEV
  • when exploit code appears or is weaponized
  • when the record is updated (including a fixed version)
  • when EPSS rises 20 points in a week

One daily email digest (06:00 UTC); connect a webhook for KEV listings and weaponized exploits instantly.

Your free account also gets you

Running WordPress? Scan your site free with WP Lens

  • Stack alerts: add the products and versions you run, get the new CVEs that affect them
  • Uptime monitoring: 1 site, instant email when it goes down
  • Add your domain: subdomains and takeover risk scanned every week (1 domain)
  • 10 scans an hour on the security tools (3 a day without an account), an API key and MCP
  • All your scans in one panel: findings, what changed in the last scan, a report per domain or per client (PDF, share link)
All free tools

Sign up with email · Have an account? Sign in

Free account, no card. Unfollow any time.

Running WordPress? Scan your site free with WP Lens

Is your version affected? Check it

Noroxi analysis

What does it mean in your environment?

The assessment above is generated automatically from the record's data; it doesn't know your environment. Our team verifies on your systems whether this vulnerability is actually exploitable and which mitigation is enough.

We use this product, ask for help

Affected systems

Is your version affected?

Pick the product and type the version you run. It's compared with this record's version ranges in your browser; the version isn't sent anywhere.

VendorProduct
ruby-langruby

Affected versions

NVD version ranges (for catalog products). Add the product to your stack with a version and matching uses these.

  • ruby-lang ruby3.0.0 and later · before 3.0.4
  • ruby-lang ruby3.1.0 and later · before 3.1.2

Package-level exposure

OSV and GitHub Advisory data: ecosystem, package and range. SBOM matching uses this table.

EcosystemPackageAffected rangeFix
AlmaLinux:8rubybefore 3.0.4-141.module_el8.6.0+3263+41cde0c03.0.4-141.module_el8.6.0+3263+41cde0c0
AlmaLinux:8ruby-default-gemsbefore 3.0.4-141.module_el8.6.0+3263+41cde0c03.0.4-141.module_el8.6.0+3263+41cde0c0
AlmaLinux:8ruby-develbefore 3.0.4-141.module_el8.6.0+3263+41cde0c03.0.4-141.module_el8.6.0+3263+41cde0c0
AlmaLinux:8ruby-docbefore 3.0.4-141.module_el8.6.0+3263+41cde0c03.0.4-141.module_el8.6.0+3263+41cde0c0
AlmaLinux:8ruby-libsbefore 3.0.4-141.module_el8.6.0+3263+41cde0c03.0.4-141.module_el8.6.0+3263+41cde0c0
AlmaLinux:8rubygem-abrtbefore 0.4.0-1.module_el8.5.0+2595+0c654ebc0.4.0-1.module_el8.5.0+2595+0c654ebc
AlmaLinux:8rubygem-abrt-docbefore 0.4.0-1.module_el8.5.0+2595+0c654ebc0.4.0-1.module_el8.5.0+2595+0c654ebc
AlmaLinux:8rubygem-bigdecimalbefore 3.0.0-141.module_el8.6.0+3263+41cde0c03.0.0-141.module_el8.6.0+3263+41cde0c0
AlmaLinux:8rubygem-bundlerbefore 2.2.33-141.module_el8.6.0+3263+41cde0c02.2.33-141.module_el8.6.0+3263+41cde0c0
AlmaLinux:8rubygem-io-consolebefore 0.5.7-141.module_el8.6.0+3263+41cde0c00.5.7-141.module_el8.6.0+3263+41cde0c0
AlmaLinux:8rubygem-irbbefore 1.3.5-141.module_el8.6.0+3263+41cde0c01.3.5-141.module_el8.6.0+3263+41cde0c0
AlmaLinux:8rubygem-jsonbefore 2.5.1-141.module_el8.6.0+3263+41cde0c02.5.1-141.module_el8.6.0+3263+41cde0c0
AlmaLinux:8rubygem-minitestbefore 5.14.2-141.module_el8.6.0+3263+41cde0c05.14.2-141.module_el8.6.0+3263+41cde0c0
AlmaLinux:8rubygem-mysql2before 0.5.3-1.module_el8.5.0+2595+0c654ebc0.5.3-1.module_el8.5.0+2595+0c654ebc
AlmaLinux:8rubygem-mysql2before 0.5.3-1.module_el8.6.0+3144+d138acf10.5.3-1.module_el8.6.0+3144+d138acf1
AlmaLinux:8rubygem-mysql2before 0.5.3-1.module_el8.5.0+118+1ab773e10.5.3-1.module_el8.5.0+118+1ab773e1
AlmaLinux:8rubygem-mysql2-docbefore 0.5.3-1.module_el8.5.0+2595+0c654ebc0.5.3-1.module_el8.5.0+2595+0c654ebc
AlmaLinux:8rubygem-pgbefore 1.2.3-1.module_el8.5.0+2595+0c654ebc1.2.3-1.module_el8.5.0+2595+0c654ebc
AlmaLinux:8rubygem-pgbefore 1.2.3-1.module_el8.5.0+118+1ab773e11.2.3-1.module_el8.5.0+118+1ab773e1
AlmaLinux:8rubygem-pgbefore 1.2.3-1.module_el8.6.0+3144+d138acf11.2.3-1.module_el8.6.0+3144+d138acf1
AlmaLinux:8rubygem-pg-docbefore 1.2.3-1.module_el8.5.0+2595+0c654ebc1.2.3-1.module_el8.5.0+2595+0c654ebc
AlmaLinux:8rubygem-power_assertbefore 1.2.0-141.module_el8.6.0+3263+41cde0c01.2.0-141.module_el8.6.0+3263+41cde0c0
AlmaLinux:8rubygem-psychbefore 3.3.2-141.module_el8.6.0+3263+41cde0c03.3.2-141.module_el8.6.0+3263+41cde0c0
AlmaLinux:8rubygem-rakebefore 13.0.3-141.module_el8.6.0+3263+41cde0c013.0.3-141.module_el8.6.0+3263+41cde0c0

+96

Other highest-scoring records for the same primary product.

  • CVE-2017-17405Ruby before 2.4.3 allows Net::FTP command injection.
    57Plan
  • CVE-2008-3656Algorithmic complexity vulnerability in the WEBrick::HTTPUtils.split_header_value function in WEBrick::HTTP::DefaultFileHandler in WEBrick i
    52Plan
  • CVE-2021-28966In Ruby through 3.0 on Windows, a remote attacker can submit a crafted path when a Web application handles a parameter with TmpDir.
    47Plan

Published before and after this one in the same product

  • ← EarlierCVE-2021-31810Jul 13, 2021 · An issue was discovered in Ruby through 2.6.7, 2.7.x through 2.7.3, and 3.x through 3.0.1.
    24Monitor
  • ← EarlierCVE-2021-32066Aug 1, 2021 · An issue was discovered in Ruby through 2.6.7, 2.7.x through 2.7.3, and 3.x through 3.0.1.
    30Monitor
  • Later →CVE-2022-28739May 9, 2022 · There is a buffer over-read in Ruby before 2.6.10, 2.7.x before 2.7.6, 3.x before 3.0.4, and 3.1.x before 3.1.2.
    31Monitor

Remediation

Which version to upgrade to

Fix versions compiled from the vendor, package registries and Microsoft. Verify the vendor's note before upgrading.

Product / packageFixed versionSource
almalinux:ruby3.0.4-141.module_el8.6.0+3263+41cde0c0 · AlmaLinux:8Package registry (OSV)
almalinux:ruby-default-gems3.0.4-141.module_el8.6.0+3263+41cde0c0 · AlmaLinux:8Package registry (OSV)
almalinux:ruby-devel3.0.4-141.module_el8.6.0+3263+41cde0c0 · AlmaLinux:8Package registry (OSV)
almalinux:ruby-doc3.0.4-141.module_el8.6.0+3263+41cde0c0 · AlmaLinux:8Package registry (OSV)
almalinux:ruby-libs3.0.4-141.module_el8.6.0+3263+41cde0c0 · AlmaLinux:8Package registry (OSV)
almalinux:rubygem-abrt0.4.0-1.module_el8.5.0+2595+0c654ebc · AlmaLinux:8Package registry (OSV)
almalinux:rubygem-abrt-doc0.4.0-1.module_el8.5.0+2595+0c654ebc · AlmaLinux:8Package registry (OSV)
almalinux:rubygem-bigdecimal3.0.0-141.module_el8.6.0+3263+41cde0c0 · AlmaLinux:8Package registry (OSV)
almalinux:rubygem-bundler2.2.33-141.module_el8.6.0+3263+41cde0c0 · AlmaLinux:8Package registry (OSV)
almalinux:rubygem-io-console0.5.7-141.module_el8.6.0+3263+41cde0c0 · AlmaLinux:8Package registry (OSV)
almalinux:rubygem-irb1.3.5-141.module_el8.6.0+3263+41cde0c0 · AlmaLinux:8Package registry (OSV)
almalinux:rubygem-json2.5.1-141.module_el8.6.0+3263+41cde0c0 · AlmaLinux:8Package registry (OSV)
alpine:ruby3.0.4-r0 · Alpine:v3.15Package registry (OSV)
opensuse:ruby3.13.1.2-1.1 · openSUSE:TumbleweedPackage registry (OSV)
opensuse:ruby3.23.2.1-1.1 · openSUSE:TumbleweedPackage registry (OSV)
opensuse:ruby3.33.3.0-1.2 · openSUSE:TumbleweedPackage registry (OSV)
opensuse:ruby3.43.4.1-1.1 · openSUSE:TumbleweedPackage registry (OSV)
opensuse:ruby4.04.0.0~preview2-1.1 · openSUSE:TumbleweedPackage registry (OSV)
red hat:ruby0:3.0.4-141.module+el8.6.0+16311+3e5e17e9 · Red Hat:enterprise_linux:8::appstreamPackage registry (OSV)
red hat:ruby-debuginfo0:3.0.4-141.module+el8.6.0+16311+3e5e17e9 · Red Hat:enterprise_linux:8::appstreamPackage registry (OSV)
red hat:ruby-debugsource0:3.0.4-141.module+el8.6.0+16311+3e5e17e9 · Red Hat:enterprise_linux:8::appstreamPackage registry (OSV)
red hat:ruby-default-gems0:3.0.4-141.module+el8.6.0+16311+3e5e17e9 · Red Hat:enterprise_linux:8::appstreamPackage registry (OSV)
red hat:ruby-devel0:3.0.4-141.module+el8.6.0+16311+3e5e17e9 · Red Hat:enterprise_linux:8::appstreamPackage registry (OSV)
red hat:ruby-doc0:3.0.4-141.module+el8.6.0+16311+3e5e17e9 · Red Hat:enterprise_linux:8::appstreamPackage registry (OSV)
red hat:ruby-libs0:3.0.4-141.module+el8.6.0+16311+3e5e17e9 · Red Hat:enterprise_linux:8::appstreamPackage registry (OSV)
red hat:ruby-libs-debuginfo0:3.0.4-141.module+el8.6.0+16311+3e5e17e9 · Red Hat:enterprise_linux:8::appstreamPackage registry (OSV)
red hat:rubygem-abrt0:0.4.0-1.module+el8.5.0+11580+845038eb · Red Hat:enterprise_linux:8::appstreamPackage registry (OSV)
red hat:rubygem-abrt-doc0:0.4.0-1.module+el8.5.0+11580+845038eb · Red Hat:enterprise_linux:8::appstreamPackage registry (OSV)
red hat:rubygem-bigdecimal0:3.0.0-141.module+el8.6.0+16311+3e5e17e9 · Red Hat:enterprise_linux:8::appstreamPackage registry (OSV)
red hat:rubygem-bigdecimal-debuginfo0:3.0.0-141.module+el8.6.0+16311+3e5e17e9 · Red Hat:enterprise_linux:8::appstreamPackage registry (OSV)

+4

Exploit status

No known public exploit

No public exploit has been observed yet. That doesn't mean you're safe, only that the bar is a little higher.

Research context

For pentesters and researchers: attack profile, score disagreement, timeline, patch commits, credits, variant and chain candidates, bug bounty scope. All derived from existing data; no exploit code.

Timeline

From publication to today: proof of concept, Metasploit module, CISA KEV and fix record. Dates are as reported by the sources.

No dated events beyond publication.

No history yet (it accumulates with the daily EPSS job).

Patch and commit links

Commit, PR and diff links among the references. A starting point for patch-diffing and variant hunting; fixes, not exploits.

No commit or PR link among the references.

Finders, reporters and analysts named in the CNA record. Click a name for that researcher’s other records.

No credits in the CNA record.

Variant candidates

Same product, same weakness class, within 18 months. If the patch missed the root cause, the sibling bug is here.

No nightly-computed relations.

Chain candidates

An authentication bypass and a privilege-requiring bug in the same product, published close together: combined they may become an unauthenticated path.

—

Bug bounty scope

The product’s vendor appears in a public program. Matched by name; verify the scope text in the program.

Technical details

Attack conditions

  • Anyone who can reach it over the internet can trigger it.
  • No account or password is required.
  • No user action is required.
  • No special conditions are required; it is repeatable.

If successful

Confidentiality
high · data can be read
Integrity
high · data or configuration can be modified
Availability
high · the service can be disrupted
Attack vector
Network
Attack complexity
Low
Privileges required
None
User interaction
None
Scope
Unchanged
Confidentiality impact
High
Integrity impact
High
Availability impact
High

Weakness class (CWE)

CWE-415 · Double Free

CVSS vector

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

nvd-primary

Attack context

MITRE CAPEC attack patterns and ATT&CK techniques for this weakness class (CWE). A starting point for detection rules and threat hunting.

MITRE has no CAPEC/ATT&CK mapping for this CWE.

Change log

  1. Fix✗ → ✓

For records you follow, these changes also arrive as notifications. →

References

All records