CVE-2025-27220Regex Denial of Service in CGI

Severity
7.5HIGHNVD
CNA4.0OSV6.6
EPSS
0.2%
top 60.15%
CISA KEV
Not in KEV
Exploit
No known exploits
Affected products
Timeline
PublishedMar 4
Latest updateApr 17

Description

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

CVSS vector

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:HExploitability: 3.9 | Impact: 3.6

Affected Packages3 packages

CVEListV5ruby-lang/cgi0.3.60.3.7+2
NVDruby-lang/cgi0.4.00.4.2+2
RubyGemsruby-lang/cgi0.3.60.3.7+2

🔴Vulnerability Details

5
OSV
ruby2.3, ruby2.5 vulnerabilities2025-04-17
OSV
CVE-2025-27220: In the CGI gem before 02025-03-04
CVEList
CVE-2025-27220: In the CGI gem before 02025-03-03
GHSA
CGI has Regular Expression Denial of Service (ReDoS) potential in Util#escapeElement2025-03-03
OSV
CGI has Regular Expression Denial of Service (ReDoS) potential in Util#escapeElement2025-03-03

📋Vendor Advisories

5
Ubuntu
Ruby vulnerabilities2025-04-17
Ubuntu
Ruby vulnerabilities2025-04-07
Microsoft
In the CGI gem before 0.4.2 for Ruby, a Regular Expression Denial of Service (ReDoS) vulnerability exists in the Util#escapeElement method.2025-03-11
Red Hat
CGI: ReDoS in CGI::Util#escapeElement2025-03-03
Debian
CVE-2025-27220: ruby2.7 - In the CGI gem before 0.4.2 for Ruby, a Regular Expression Denial of Service (Re...2025
CVE-2025-27220 — Regex Denial of Service in CGI | cvebase