{"id":"CVE-2025-27219","aliases":["CVE-2025-27219","GHSA-gh9q-2xrm-x6qv"],"related":[],"kind":"vulnerability","state":"published","title":"CGI has Denial of Service (DoS) potential in Cookie.parse","summary":"In the CGI gem before 0.4.2 for Ruby, the CGI::Cookie.parse method in the CGI library contains a potential Denial of Service (DoS) vulnerability. The method does not impose any limit on the length of the raw cookie value it processes. This oversight can lead to excessive resource consumption when parsing extremely large cookies.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the CGI gem before 0.4.2 for Ruby, the CGI::Cookie.parse method in the CGI library contains a potential Denial of Service (DoS) vulnerability. The method does not impose any limit on the length of the raw cookie value it processes. This oversight can lead to excessive resource consumption when parsing extremely large cookies.","source":"cvelist"},{"lang":"en","text":"There is a possibility for DoS by in the cgi gem.\nThis vulnerability has been assigned the CVE identifier CVE-2025-27219. We recommend upgrading the cgi gem.\n\n## Details\n\nCGI::Cookie.parse took super-linear time to parse a cookie string in some cases. Feeding a maliciously crafted cookie string into the method could lead to a Denial of Service.\n\nPlease update CGI gem to version 0.3.5.1, 0.3.7, 0.4.2 or later.\n\n## Affected versions\n\ncgi gem versions <= 0.3.5, 0.3.6, 0.4.0 and 0.4.1.\n\n## Credits\n\nThanks to lio346 for discovering this issue.\nAlso thanks to mame for fixing this vulnerability.","format":"markdown","source":"ghsa"},{"lang":"es","text":"En la gema CGI anterior a la versión 0.4.2 para Ruby, el método CGI::Cookie.parse de la librería CGI contiene una posible vulnerabilidad de denegación de servicio (DoS). El método no impone ningún límite en la longitud del valor de cookie sin procesar que procesa. Este descuido puede provocar un consumo excesivo de recursos al analizar cookies extremadamente grandes.","source":"nvd"}],"published":"2025-03-03T00:00:00.000Z","modified":"2026-09-10T03:49:48.446Z","severity":{"scorer":"mitre","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:N/I:N/A:L","score":5.8,"rating":"MEDIUM"},"severities":[{"scorer":"mitre","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:N/I:N/A:L","score":5.8,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:N/I:N/A:L","score":5.8,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N","rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5,"rating":"HIGH"}],"cwes":["CWE-400","CWE-770"],"affected":[{"ranges":[{"type":"custom","introduced":"0","fixed":"0.3.5.1","status":"affected"},{"type":"custom","introduced":"0.3.6","fixed":"0.3.7","status":"affected"},{"type":"custom","introduced":"0.4.0","fixed":"0.4.2","status":"affected"}],"vendor":"ruby-lang","product":"CGI","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"0.3.5.1"}],"ecosystem":"RubyGems","package":"cgi","purl":"pkg:gem/cgi","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"0.3.6","status":"affected","fixed":"0.3.7"}],"ecosystem":"RubyGems","package":"cgi","purl":"pkg:gem/cgi","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"0.4.0","status":"affected","fixed":"0.4.2"}],"ecosystem":"RubyGems","package":"cgi","purl":"pkg:gem/cgi","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"0.3.5.1"},{"status":"affected","introduced":"0.4.0","fixed":"0.4.2"},{"status":"affected","version":"0.3.6"}],"vendor":"ruby-lang","product":"cgi","cpe":"cpe:2.3:a:ruby-lang:cgi:*:*:*:*:*:ruby:*:*","source":"nvd"}],"references":[{"url":"https://hackerone.com/reports/2936778","tags":["permissions-required","web"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/rubysec/ruby-advisory-db/blob/master/gems/cgi/CVE-2025-27219.yml","tags":["third-party-advisory","web"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://lists.debian.org/debian-lts-announce/2025/03/msg00008.html","tags":["web"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2025-27219","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/ruby/cgi/pull/52","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/ruby/cgi/pull/53","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/ruby/cgi/pull/54","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/ruby/cgi","tags":["package"],"sources":["ghsa"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2025-27219","tags":["web"],"sources":["ghsa"]}],"credits":[],"assigner":"mitre","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2025-03-04T16:41:05.727Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2025-27219","url":"https://www.cve.org/CVERecord?id=CVE-2025-27219","licence":"CVE Terms of Use","modified":"2025-11-03T21:13:23.842Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-gh9q-2xrm-x6qv","url":"https://github.com/advisories/GHSA-gh9q-2xrm-x6qv","licence":"CC-BY-4.0","modified":"2026-09-10T03:49:48.446Z"},{"source":"nvd","name":"NVD","id":"CVE-2025-27219","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-27219","licence":"Public domain","modified":"2026-06-17T09:03:14.137Z"}],"updatedAt":"2026-11-25T22:58:54.934Z","epss":{"score":0.00849,"percentile":0.59287,"date":"2026-12-02T12:00:21.000Z"}}