CVE-2025-27220

published 3 Mar 2025 · updated 18 Feb 2026

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

4.0MediumCVSS 4.0EPSS 1%

No exploitation in the wild has been reported. EPSS puts the chance of exploitation in the next 30 days at 1%. Fixed in 0.3.5.1, 0.3.7 and 0.4.2.

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

Affected

Vendors, products and packages with version ranges

VendorProductVersionsFixed
ruby-lang<0.3.5.1, >=0.3.6 <0.3.7, >=0.4.0 <0.4.20.3.5.1, 0.3.7, 0.4.2

Timeline

Every event on this vulnerability

Embed

A live severity badge for an advisory, README or ticket

CVE-2025-27220 severity on Zeptric[![CVE-2025-27220](https://zeptric.io/badge/cve/CVE-2025-27220.svg)](https://zeptric.io/cve/CVE-2025-27220)