Vulnerabilities · 2025 · Ruby-lang
CVE-2025-27220
Ruby-lang Cgi vulnerability
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 products
Cgi. The exact versions are in the references.
What to do now
- Check your exposureFind out whether Ruby-lang Cgi runs anywhere in your environment, including systems of suppliers.
- UpdateInstall the version in which the vendor fixed the vulnerability. The references lead to the advisory.
- Limit access until thenIf you cannot update at once, take the system off the internet or restrict who can reach it.
References
- github.com/ruby/cgi/pull/52
- github.com/ruby/cgi/pull/53
- github.com/ruby/cgi/pull/54
- github.com/rubysec/ruby-advisory-db/blob/master/gems/cgi/CVE-2025-27220.yml
- www.cve.org/CVERecord?id=CVE-2025-27220
- www.ruby-lang.org/en/news/2025/02/26/security-advisories
- nvd.nist.gov/vuln/detail/CVE-2025-27220
- hackerone.com/reports/2890322
- nvd.nist.gov/vuln/detail/CVE-2025-27220
- cve.org/CVERecord?id=CVE-2025-27220
More vulnerabilities in Ruby-lang products
CVE-2026-46727CVE-2025-58767CVE-2025-43857CVE-2025-27788CVE-2025-27221CVE-2025-27219CVE-2025-6442CVE-2024-49761All 115
Data: CVE list and the NVD. This product uses data from the NVD API but is not endorsed or certified by the NVD.