CVE-2025-27219: High severity ruby vulnerability
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.
Other sources
There is a possibility for DoS by in the cgi gem. This vulnerability has been assigned the CVE identifier CVE-2025-27219. We recommend upgrading the cgi gem.
Details
CGI::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.
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 lio346 for discovering this issue. Also thanks to mame for fixing this vulnerability.
— GitHub
This CVE was automatically created from a reference found in an email or other text. If you are reading this, then this CVE entry is probably erroneous, since this text should be replaced by the official CVE description automatically.
— Launchpad
Affected Software
Event History
Frequently Asked Questions
What is the severity of CVE-2025-27219?
CVE-2025-27219 has the potential to cause a Denial of Service (DoS) due to super-linear time complexity when parsing certain cookie strings.
How do I fix CVE-2025-27219?
To resolve CVE-2025-27219, upgrade the cgi gem to version 0.4.2 or later.
Which versions of the cgi gem are affected by CVE-2025-27219?
CVE-2025-27219 affects versions of the cgi gem from 0.4.0 to 0.4.2, as well as earlier versions up to 0.3.6.
What kind of attack does CVE-2025-27219 enable?
CVE-2025-27219 enables a Denial of Service attack by allowing maliciously crafted cookie strings to be processed inefficiently.
Are there any known patches for CVE-2025-27219?
Yes, the known patch for CVE-2025-27219 is included in version 0.4.2 of the cgi gem.