CGI Gem Regular Expression Denial-of-Service Vulnerability

Vulnerability

A Regular Expression Denial-of-Service (ReDoS) vulnerability has been identified in the CGI gem for Ruby, specifically in versions prior to 0.4.2. The issue arises in the Util#escapeElement method, where a vulnerable regular expression can be exploited to cause high CPU consumption.

Impact

Exploitation of this vulnerability leads to increased CPU usage, causing a denial-of-service condition.

Remediation

Users of the affected CGI gem versions should upgrade to version 0.3.5.1, 0.3.7, or 0.4.2 and later.

Added: Jun 9, 2025, 7:46 PM
Updated: Jun 9, 2025, 7:46 PM

Vulnerability Rating

Custom Algorithm
spread
6.6
impact
2.5
exploitability
4.7
remediation
7.7
relevance
0.0
threat
0.0
urgency
2.9
incentive
1.7

Our algorithm analyzes dozens of metrics to generate these 8 key vulnerability categories, which are then combined to calculate the overall risk score.