CVE-2025-27220 CGI has Regular Expression Denial of Service (ReDoS) potential in Util#escapeElement
HighCVSS 7.5
EPSS 0.76%
PoC
- Published
- Updated
- Exploit status
- Proof-of-concept only
- CISA SSVC
- No known exploitation · automatable: no · technical impact: partial
- Technology
- UbuntuDebian
Description
In the CGI gem before 0.4.2 for Ruby, a Regular Expression Denial of Service (ReDoS) vulnerability exists in the Util#escapeElement method.
Upgrade path
12 packages: 8 fixed, 1 partially fixed, 3 with no fix yet.
| Package | Affected | Fixed in | Status |
|---|---|---|---|
| ubuntu/jruby(Ubuntu 24.04) | All versions | No fix listed | No fix yet |
| ubuntu/jruby(Ubuntu 26.04) | All versions | No fix listed | No fix yet |
| ubuntu/jruby(Ubuntu 26.10) | All versions | No fix listed | No fix yet |
| debian/ruby3.1(Debian 12) | < 3.1.7-1~deb12u2; = 3.1.2-7; = 3.1.2-7+deb12u1; = 3.1.2-7+hurd.1 +8 more | 3.1.7-1~deb12u2 | Partially fixed |
| azure linux ruby(Azure Linux 3.0) | < 3.3.5-3 | 3.3.5-3 | Fixed |
| cbl-mariner ruby(CBL-Mariner 2.0) | < 3.1.4-9 | 3.1.4-9 | Fixed |
| debian/ruby3.3(Debian 13) | < 3.3.7-2 | 3.3.7-2 | Fixed |
| debian/ruby3.3(Debian 14) | < 3.3.7-2 | 3.3.7-2 | Fixed |
| ruby-lang CGI | < 0.3.5.1; = 0.3.6; >= 0.3.6, < 0.3.7; >= 0.4.0, < 0.4.2 | 0.3.5.1, 0.3.7, 0.4.2 | Fixed |
| rubygems cgi(RubyGems) | < 0.3.5.1; = 0.1.0; = 0.1.0.1; = 0.1.0.2 +17 more | 0.3.5.1, 0.3.7, 0.4.2 | Fixed |
| ubuntu/ruby3.0(Ubuntu 22.04) | < 3.0.2-7ubuntu2.10 | 3.0.2-7ubuntu2.10 | Fixed |
| ubuntu/ruby3.2(Ubuntu 24.04) | < 3.2.3-1ubuntu0.24.04.5 | 3.2.3-1ubuntu0.24.04.5 | Fixed |
Affected products
| Product | Affected versions | Fixed in |
|---|---|---|
| cbl-mariner ruby(CBL-Mariner:2.0) | < 3.1.4-9 | 3.1.4-9 |
| azure linux ruby(Azure Linux:3.0) | < 3.3.5-3 | 3.3.5-3 |
| rubygems cgi(RubyGems) | < 0.3.5.1 | 0.3.5.1 |
| rubygems cgi(RubyGems) | = 0.1.0 | No fix listed |
| rubygems cgi(RubyGems) | = 0.1.0.1 | No fix listed |
| rubygems cgi(RubyGems) | = 0.1.0.2 | No fix listed |
| rubygems cgi(RubyGems) | = 0.1.1 | No fix listed |
| rubygems cgi(RubyGems) | = 0.2.0 | No fix listed |
| rubygems cgi(RubyGems) | = 0.2.1 | No fix listed |
| rubygems cgi(RubyGems) | = 0.2.2 | No fix listed |
| rubygems cgi(RubyGems) | = 0.3.0 | No fix listed |
| rubygems cgi(RubyGems) | = 0.3.1 | No fix listed |
| rubygems cgi(RubyGems) | = 0.3.2 | No fix listed |
| rubygems cgi(RubyGems) | = 0.3.3 | No fix listed |
| rubygems cgi(RubyGems) | = 0.3.4 | No fix listed |
| rubygems cgi(RubyGems) | = 0.3.5 | No fix listed |
| rubygems cgi(RubyGems) | >= 0.3.6, < 0.3.7 | 0.3.7 |
| rubygems cgi(RubyGems) | = 0.3.6 | No fix listed |
| rubygems cgi(RubyGems) | >= 0.4.0, < 0.4.2 | 0.4.2 |
| rubygems cgi(RubyGems) | = 0.4.0 | No fix listed |
| rubygems cgi(RubyGems) | = 0.4.1 | No fix listed |
| rubygems cgi(RubyGems) | = 0.4.2.beta1 | No fix listed |
| rubygems cgi(RubyGems) | = 0.4.2.beta2 | No fix listed |
| ruby-lang CGI | < 0.3.5.1 | 0.3.5.1 |
| ruby-lang CGI | >= 0.3.6, < 0.3.7 | 0.3.7 |
Show 21 more
| Product | Affected versions | Fixed in |
|---|---|---|
| ruby-lang CGI | >= 0.4.0, < 0.4.2 | 0.4.2 |
| ubuntu/ruby3.0(Ubuntu:22.04) | < 3.0.2-7ubuntu2.10 | 3.0.2-7ubuntu2.10 |
| ubuntu/jruby(Ubuntu:24.04) | All versions | No fix listed |
| ubuntu/ruby3.2(Ubuntu:24.04) | < 3.2.3-1ubuntu0.24.04.5 | 3.2.3-1ubuntu0.24.04.5 |
| ubuntu/jruby(Ubuntu:26.04) | All versions | No fix listed |
| ruby-lang CGI | = 0.3.6 | No fix listed |
| ubuntu/jruby(Ubuntu:26.10) | All versions | No fix listed |
| debian/ruby3.1(Debian:12) | < 3.1.7-1~deb12u2 | 3.1.7-1~deb12u2 |
| debian/ruby3.3(Debian:14) | < 3.3.7-2 | 3.3.7-2 |
| debian/ruby3.3(Debian:13) | < 3.3.7-2 | 3.3.7-2 |
| debian/ruby3.1(Debian:12) | All versions | No fix listed |
| debian/ruby3.1(Debian:12) | = 3.1.2-7 | No fix listed |
| debian/ruby3.1(Debian:12) | = 3.1.2-7+deb12u1 | No fix listed |
| debian/ruby3.1(Debian:12) | = 3.1.2-7+hurd.1 | No fix listed |
| debian/ruby3.1(Debian:12) | = 3.1.2-8 | No fix listed |
| debian/ruby3.1(Debian:12) | = 3.1.2-8.1~exp1 | No fix listed |
| debian/ruby3.1(Debian:12) | = 3.1.2-8.3 | No fix listed |
| debian/ruby3.1(Debian:12) | = 3.1.2-8.4 | No fix listed |
| debian/ruby3.1(Debian:12) | = 3.1.2-8.5 | No fix listed |
| debian/ruby3.1(Debian:12) | = 3.1.7+really3.1.2-0+deb12u1 | No fix listed |
| debian/ruby3.1(Debian:12) | = 3.1.7-1~deb12u2 | No fix listed |
References
- MSRC Security Update Guide vendor-advisory
- CBL-Mariner Releases vendor-advisory
- nvd.nist.gov third-party-advisory vendor-advisory
- github.com patch
- github.com patch
- github.com patch
- hackerone.com permissions-required
- github.com product
- github.com exploit third-party-advisory
- lists.debian.org
- www.cve.org
- www.ruby-lang.org
- Debian Security Tracker CVE-2025-27220 vendor-advisory
- github.com
- Ubuntu CVE tracker vendor-advisory
- USN-7418-1 vendor-advisory
- USN-7442-1 vendor-advisory
- bugs.debian.org issue-tracking