// For flags

CVE-2025-27220

CGI: ReDoS in CGI::Util#escapeElement

Severity Score

4.0
*CVSS v3.1

Exploit Likelihood

*EPSS

Affected Versions

*CPE

Public Exploits

0
*Multiple Sources

Exploited in Wild

-
*KEV

Decision

Track
*SSVC
Descriptions

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

A flaw was found in Ruby's CGI gem. The CGI::Util#escapeElement method is vulnerable to Regular expression Denial of Service (ReDoS), allowing a specially crafted input to cause a high CPU consumption.

It was discovered that Ruby incorrectly handled parsing of an XML document that has specific XML characters in an attribute value using REXML gem. An attacker could use this issue to cause Ruby to crash, resulting in a denial of service. This issue only affected in Ubuntu 22.04 LTS, Ubuntu 24.04 LTS, and Ubuntu 24.10. It was discovered that Ruby incorrectly handled expanding ranges in the net-imap response parser. If a user or automated system were tricked into connecting to a malicious IMAP server, a remote attacker could possibly use this issue to consume memory, leading to a denial of service. This issue only affected Ubuntu 24.04 LTS, and Ubuntu 24.10.

*Credits: N/A
CVSS Scores
Attack Vector
Network
Attack Complexity
High
Privileges Required
None
User Interaction
None
Scope
Changed
Confidentiality
None
Integrity
None
Availability
Low
Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
Low
Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
High
Attack Vector
Network
Attack Complexity
Low
Authentication
None
Confidentiality
None
Integrity
None
Availability
Complete
* Common Vulnerability Scoring System
SSVC
  • Decision:Track
Exploitation
None
Automatable
No
Tech. Impact
Partial
* Organization's Worst-case Scenario
Timeline
  • 2025-02-20 CVE Reserved
  • 2025-03-03 CVE Published
  • 2025-03-04 CVE Updated
  • 2025-07-04 EPSS Updated
  • ---------- Exploited in Wild
  • ---------- KEV Due Date
  • ---------- First Exploit
CWE
  • CWE-1333: Inefficient Regular Expression Complexity
CAPEC
Affected Vendors, Products, and Versions
Vendor Product Version Other Status
Vendor Product Version Other Status <-- --> Vendor Product Version Other Status
Ruby-lang
Search vendor "Ruby-lang"
CGI
Search vendor "Ruby-lang" for product "CGI"
< 0.3.5.1
Search vendor "Ruby-lang" for product "CGI" and version " < 0.3.5.1"
en
Affected
Ruby-lang
Search vendor "Ruby-lang"
CGI
Search vendor "Ruby-lang" for product "CGI"
>= 0.3.6 < 0.3.7
Search vendor "Ruby-lang" for product "CGI" and version " >= 0.3.6 < 0.3.7"
en
Affected
Ruby-lang
Search vendor "Ruby-lang"
CGI
Search vendor "Ruby-lang" for product "CGI"
>= 0.4.0 < 0.4.2
Search vendor "Ruby-lang" for product "CGI" and version " >= 0.4.0 < 0.4.2"
en
Affected