Answer in brief
CVE-2025-27220 records a Medium severity (CVSS 4.0) vulnerability in CGI has Regular Expression Denial of Service (ReDoS) potential in Util#escapeElement. The current sources do not mark it as known exploited. The current feed maps cgi (rubygems), cgi (rubygems), cgi (rubygems). Check affected ranges and fixed versions before updating.
Analysis pending evidence review
HOL Guard separates source facts from reviewed analysis. See the methodology.
CVSS is 4.0. The current sources do not mark it as known exploited. Treat this as a source-backed prioritization signal, not a statement about your environment.
Analysis status
Analysis pending evidence review
Factual feed record only; HOL analysis is not approved for indexing. Read the methodology.
The current feed maps cgi (rubygems), cgi (rubygems), cgi (rubygems). Check affected ranges and fixed versions before updating.
| Package | Affected range | Fixed version |
|---|---|---|
| cgirubygems | >=0 <0.3.5.1 | 0.3.5.1 |
| cgirubygems | >=0.3.6 <0.3.7 | 0.3.7 |
| cgirubygems | >=0.4.0 <0.4.2 | 0.4.2 |
Published upstream
Mar 3, 2025
Evidence: source:osv:source_dates:source-dates:recordSource modified
Sep 10, 2026
Evidence: source:osv:source_dates:source-dates:recordFirst seen by HOL
Aug 7, 2026
There is a possibility for Regular expression Denial of Service (ReDoS) by in the cgi gem. This vulnerability has been assigned the CVE identifier CVE-2025-27220. We recommend upgrading the cgi gem. ## Details The regular expression used in `CGI::Util#escapeElement` is vulnerable to ReDoS. The crafted input could lead to a high CPU consumption. This vulnerability only affects Ruby 3.1 and 3.2. If you are using these versions, please update CGI gem to version 0.3.5.1, 0.3.7, 0.4.2 or later. ## Affected versions cgi gem versions <= 0.3.5, 0.3.6, 0.4.0 and 0.4.1. ## Credits Thanks to svalkanov for discovering this issue. Also thanks to nobu for fixing this vulnerability.
Quoted source text, attributed separately from HOL analysis.