CVE-2025-27220 — Vulnerability in cgi — CVE Details
CGI has Regular Expression Denial of Service (ReDoS) potential in Util#escapeElement
Summary
Advisory Timeline
- First published March 3, 2025 (588 days ago).
- Last revised September 10, 2026 — 555 days after initial publication.
Remediation
Upgrade to the fixed version using your package manager.
gem install cgi -v 0.3.7
gem install cgi -v 0.4.2
gem install cgi -v 0.3.5.1
After upgrading, run your dependency scanner again to confirm the vulnerability is resolved.
Affected Packages (3)
Affects 1 ecosystem: rubygems (1).
Vulnerability Classification
Common Weakness Enumeration (CWE) identifiers for this vulnerability type.
- CWE-1333
CVSS Score Breakdown
What the CVSS (Common Vulnerability Scoring System) 4.0 score means for each attack dimension.
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:N/I:N/A:L
References
- https://nvd.nist.gov/vuln/detail/CVE-2025-27220ADVISORY
- https://github.com/ruby/cgi/pull/52WEB
- https://github.com/ruby/cgi/pull/53WEB
- https://github.com/ruby/cgi/pull/54WEB
- https://hackerone.com/reports/2890322WEB
- https://github.com/ruby/cgiPACKAGE
- https://github.com/rubysec/ruby-advisory-db/blob/master/gems/cgi/CVE-2025-27220.ymlWEB
- https://lists.debian.org/debian-lts-announce/2025/03/msg00008.htmlWEB
- https://www.cve.org/CVERecord?id=CVE-2025-27220WEB
- https://www.ruby-lang.org/en/news/2025/02/26/security-advisoriesWEB
Frequently Asked Questions
- What is CVE-2025-27220?
- CGI has Regular Expression Denial of Service (ReDoS) potential in Util#escapeElement This vulnerability has been assigned a severity rating of MEDIUM (CVSS score: 4.0/10).
- How do I check if my project is affected by CVE-2025-27220?
- CVE-2025-27220 affects cgi. Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2025-27220 and 200,000+ other known vulnerabilities.
Severity & Exploitability
Exploitation requires specific conditions or has limited impact. Remediate within weeks.
Also Known As
Related CVEs
- CVE-2021-41816CRITICAL
Buffer overrun in CGI.escape_html
- CVE-2021-41819HIGH
Cookie Prefix Spoofing in CGI::Cookie.parse
- CVE-2021-33621HIGH
HTTP response splitting in CGI
- CVE-2026-107715MEDIUM
Mechanize sends credential headers to another host after an HTTP redirect
- CVE-2026-107399MEDIUM
Mechanize sends credential headers to another origin after a meta refresh
- CVE-2025-27219MEDIUM
CGI has Denial of Service (DoS) potential in Cookie.parse
Check if you're affected
Scan your dependencies to see if this vulnerability affects your projects.
Scan Your Dependencies