Live threats

All CVEs / Ruby-lang

CVE-2025-27220Ruby-lang Cgi

High 7.5 No auth needed

Priority
60
CVSS 3.1
7.5
EPSS
—
Auth required
No
Published
Mar 4, 2025
Updated
Jun 17, 2026
Category
Application · Cross-platform
Weakness (CWE)
CWE-1333
SSVC (CISA)
Exploitation: none · Automatable: no · Technical impact: partial
Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

What happens

In the CGI gem before 0.4.2 for Ruby, a Regular Expression Denial of Service (ReDoS) vulnerability exists in the Util#escapeElement method.

Original NVD text.

What to do

  1. Apply the vendor's security update for Cgi.
  2. It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.

Affected packages

EcosystemPackageAffected versionsFixed inHow to upgrade
RubyGems cgi < 0.3.5.1 0.3.5.1 gem "cgi", ">= 0.3.5.1"
RubyGems cgi ≥ 0.3.6 < 0.3.7 0.3.7 gem "cgi", ">= 0.3.7"
RubyGems cgi ≥ 0.4.0 < 0.4.2 0.4.2 gem "cgi", ">= 0.4.2"

Per OSV / GitHub Advisories (GHSA-mhwm-jh88-3gjf). Check the version in your lockfile before upgrading.

Affected products (CPE)

VendorProductVersions
ruby-langcgi< 0.3.5.1
ruby-langcgi≥ 0.4.0 < 0.4.2
ruby-langcgi0.3.6

Official sources

References

Links published by the sources. Open them with care.