CVE-2025-27220: Ruby-Lang Cgi
High severity, CVSS 7.5. EPSS: 1.3% probability of exploitation activity in the next 30 days.
In the CGI gem before 0.4.2 for Ruby, a Regular Expression Denial of Service (ReDoS) vulnerability exists in the Util#escapeElement method.
What to do
The record states a fixed version for each range of affected versions. Update to the one for the range your version is in: a later release on another branch may not have the fix.
- Ruby-Lang Cgi, before 0.3.5.1: fixed in 0.3.5.1
- Ruby-Lang Cgi, from 0.4.0, before 0.4.2: fixed in 0.4.2
Affected products
- Ruby-Lang Cgi: before 0.3.5.1 (fixed in 0.3.5.1); from 0.4.0, before 0.4.2 (fixed in 0.4.2); version 0.3.6 only
Affected packages
- cgi (RubyGems)
Published 2025-03-04. Last modified 2026-06-17.