Advisory Database
  • Advisories
  • Dependency Scanning
  1. gem
  2. ›
  3. cgi
  4. ›
  5. CVE-2025-27220

CVE-2025-27220: CGI has Regular Expression Denial of Service (ReDoS) potential in Util#escapeElement

March 3, 2025 (updated November 4, 2025)

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.

References

  • github.com/advisories/GHSA-mhwm-jh88-3gjf
  • github.com/ruby/cgi
  • 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
  • hackerone.com/reports/2890322
  • lists.debian.org/debian-lts-announce/2025/03/msg00008.html
  • nvd.nist.gov/vuln/detail/CVE-2025-27220
  • www.cve.org/CVERecord?id=CVE-2025-27220
  • www.ruby-lang.org/en/news/2025/02/26/security-advisories

Code Behaviors & Features

Detect and mitigate CVE-2025-27220 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Dependency Scanning using SBOM also detects vulnerabilities from proprietary advisories that this site does not include. Learn more about Dependency Scanning using SBOM →

Affected versions

All versions before 0.3.5.1, all versions starting from 0.3.6 before 0.3.7, version 0.3.6, all versions starting from 0.4.0 before 0.4.2

Fixed versions

  • 0.3.5.1
  • 0.3.7
  • 0.4.2

Solution

Upgrade to versions 0.3.5.1, 0.3.7, 0.4.2 or above.

Impact 4 MEDIUM

CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:N/I:N/A:L

Learn more about CVSS

Weakness

  • CWE-1333: Inefficient Regular Expression Complexity

Source file

gem/cgi/CVE-2025-27220.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sun, 08 Nov 2026 00:15:56 +0000.