CVE-2025-27220
CGI: ReDoS in CGI::Util#escapeElement
Severity Score
Exploit Likelihood
Affected Versions
Public Exploits
0Exploited in Wild
-Decision
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.
CVSS Scores
SSVC
- Decision:Track
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
References (4)
URL | Tag | Source |
---|---|---|
https://github.com/rubysec/ruby-advisory-db/blob/master/gems/cgi/CVE-2025-27220.yml | ||
https://hackerone.com/reports/2890322 |
URL | Date | SRC |
---|
URL | Date | SRC |
---|
URL | Date | SRC |
---|---|---|
https://access.redhat.com/security/cve/CVE-2025-27220 | 2025-05-06 | |
https://bugzilla.redhat.com/show_bug.cgi?id=2349696 | 2025-05-06 |
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
|