CVE-2025-27220
highpriority · track · 30EPSS 0.008 · 55 %ileDEEURUUSEPSS · scored 2026-10-23
In the CGI gem before 0.4.2 for Ruby, a Regular Expression Denial of Service (ReDoS) vulnerability exists in the Util#escapeElement method.
cvss
Technical severity, 0–10. One row per scoring source.
base score 0–10 · higher = more severe · hover a vector to decode⚠ sources disagree · medium–high · 4–7.5
ssvc
A stakeholder decision — act, attend, or track — from exploitation and impact.
weaknesses
The CWE weakness classes this flaw belongs to.
affected products (24)
Products and version ranges known to be affected.
advisories (3)
Vendor and ecosystem advisories describing this.
- WID-SEC-W-2025-0438Ruby (CGI und URI gem): Mehrere SchwachstellenDeutsch2025-02-25csaf · cert_bundDE
Ein entfernter, anonymer Angreifer kann mehrere Schwachstellen in Ruby ausnutzen, um einen Denial-of-Service-Zustand zu erzeugen und vertrauliche Informationen preiszugeben.
- WID-SEC-W-2025-1439Dell Secure Connect Gateway: Mehrere Schwachstellen ermöglichen nicht spezifizierten AngriffDeutsch2025-06-30csaf · cert_bundDE
Ein Angreifer kann mehrere Schwachstellen in Dell Secure Connect Gateway ausnutzen, um einen nicht näher spezifizierten Angriff durchzuführen.
- GHSA-mhwm-jh88-3gjfCGI has Regular Expression Denial of Service (ReDoS) potential in Util#escapeElement2025-03-03ghsa · osvUS
There is a possibility for Regular expression Denial of Service (ReDoS) by in the cgi gem. This vulnerability has been assigned the CVE identifier CVE-2025-27220. We recommend upgrading the cgi gem. ## Details The regular expression used in `CGI::Util#escapeElement` is vulnerable to ReDoS. The crafted input could lead to a high CPU consumption. This vulnerability only affects Ruby 3.1 and 3.2. If you are using these versions, please update CGI gem to version 0.3.5.1, 0.3.7, 0.4.2 or later. ## Affected versions cgi gem versions <= 0.3.5, 0.3.6, 0.4.0 and 0.4.1. ## Credits Thanks to svalkanov for discovering this issue. Also thanks to nobu for fixing this vulnerability.
also known as (4)
Other names and identifiers for this entity.
sources
Which sources assert this record, and when.
references (10)
External citations — patches, advisories, analysis.
- https://github.com/ruby/cgi/releases/tag/v0.4.2Patchcnnvd
- https://github.com/rubysec/ruby-advisory-db/blob/master/gems/cgi/CVE-2025-27220.ymlcnnvd
- https://hackerone.com/reports/2890322cnnvd
- https://nvd.nist.gov/vuln/detail/CVE-2025-27220cnnvd
- https://vigilance.fr/vulnerability/Ruby-CGI-URI-three-vulnerabilities-dated-26-02-2025-46457cnnvd
- https://github.com/rubysec/ruby-advisory-db/blob/master/gems/cgi/CVE-2025-27220.ymlenisa_euvd
- https://hackerone.com/reports/2890322enisa_euvd
- https://github.com/rubysec/ruby-advisory-db/blob/master/gems/cgi/CVE-2025-27220.ymlThird Party Advisorynvd
Attackers weaponise vulnerabilities like this against internet-exposed services. See what is exposed on your perimeter with a free passive scan.
Free scan