{"schema_version":"1.9.0","id":"CVE-2025-27220","published":"2025-03-03T00:00:00Z","modified":"2026-08-12T03:51:42.524070554Z","aliases":["GHSA-mhwm-jh88-3gjf"],"related":["ALSA-2025:4063","ALSA-2025:4488","CGA-9mpc-wqhj-mv2j","SUSE-SU-2025:1369-1","SUSE-SU-2025:4264-1"],"details":"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":[{"ranges":[{"type":"GIT","repo":"https://github.com/ruby/cgi","events":[{"introduced":"0"},{"fixed":"9f7e78ece68a2cab7531d5e1111ec2e4d5344ad9"},{"introduced":"6ddd5fc7d76b43b518b51277aecfb77fb5cad9ba"},{"fixed":"ab84b7fe6624faeba21fb52acac33ea678366e11"},{"introduced":"827b7d43cceafa3a05a22d786d63671d27e0d5bc"},{"last_affected":"827b7d43cceafa3a05a22d786d63671d27e0d5bc"}],"database_specific":{"cpe":["cpe:2.3:a:ruby-lang:cgi:*:*:*:*:*:ruby:*:*","cpe:2.3:a:ruby-lang:cgi:0.3.6:*:*:*:*:ruby:*:*"],"extracted_events":[{"introduced":"0"},{"fixed":"0.3.5.1"},{"introduced":"0.4.0"},{"fixed":"0.4.2"},{"introduced":"0.3.6"},{"last_affected":"0.3.6"}],"source":["CPE_RANGE","CPE_STRING"]}}],"versions":["0.3.6","v0.3.5","v0.3.6","v0.4.2.beta2","v0.4.2.beta1","v0.4.1","v0.4.0","v0.3.4","v0.3.3","v0.3.2","v0.3.1","v0.2.0","v0.1.0","v0.3.0"],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-27220.json"}}],"references":[{"type":"WEB","url":"https://hackerone.com/reports/2890322"},{"type":"WEB","url":"https://lists.debian.org/debian-lts-announce/2025/03/msg00008.html"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/27xxx/CVE-2025-27220.json"},{"type":"ADVISORY","url":"https://github.com/rubysec/ruby-advisory-db/blob/master/gems/cgi/CVE-2025-27220.yml"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-27220"}],"database_specific":{"cna_assigner":"mitre","cwe_ids":["CWE-1333"],"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/27xxx/CVE-2025-27220.json","unresolved_ranges":[{"extracted_events":[{"fixed":"0.3.5.1"},{"introduced":"0.3.6"},{"fixed":"0.3.7"},{"introduced":"0.4.0"},{"fixed":"0.4.2"}],"source":"AFFECTED_FIELD"},{"extracted_events":[{"fixed":"0.3.5.1"},{"introduced":"0.3.6"},{"fixed":"0.3.7"},{"introduced":"0.4.0"},{"fixed":"0.4.2"}],"source":"CPE_FIELD"},{"extracted_events":[{"fixed":"0.4.2"}],"source":"DESCRIPTION"}]},"severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:N/I:N/A:L"}]}