CVE-2025-27219
Ruby vulnerability analysis and mitigation

Overview

The CGI gem for Ruby, prior to version 0.4.2, contains a Denial of Service (DoS) vulnerability identified as CVE-2025-27219. The vulnerability exists in the CGI::Cookie.parse method of the CGI library, which fails to implement limits on the length of raw cookie values during processing. This vulnerability was discovered on February 26, 2025, affecting multiple versions of the CGI gem including versions <= 0.3.5, 0.3.6, 0.4.0, and 0.4.1 (Ruby Advisory DB, NVD).

Technical details

The vulnerability stems from the CGI::Cookie.parse method taking super-linear time to parse cookie strings in certain cases. The method's implementation lacks proper validation for the length of raw cookie values it processes, which can lead to excessive resource consumption. The vulnerability has been assigned a CVSS v3.1 base score of 7.5 (HIGH) by NIST and 5.8 (MEDIUM) by MITRE, with the vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H. The vulnerability is classified under CWE-770 (Allocation of Resources Without Limits or Throttling) (NVD).

Impact

When exploited, this vulnerability can lead to Denial of Service conditions through excessive resource consumption. By feeding maliciously crafted cookie strings into the affected method, attackers can cause the application to consume excessive resources, potentially impacting system availability (Ruby Advisory DB).

Mitigation and workarounds

Users are recommended to upgrade to CGI gem version 0.3.5.1, 0.3.7, 0.4.2 or later, which contain patches for this vulnerability. The fix has been implemented to address the super-linear time complexity issue in cookie string parsing (Ruby Advisory DB).

Additional resources


SourceThis report was generated using AI

Related Ruby vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2025-68271CRITICAL10
  • RubyRuby
  • openc3
NoYesJan 13, 2026
CVE-2026-22589HIGH7.5
  • RubyRuby
  • spree_core
NoYesJan 10, 2026
GHSA-96qw-h329-v5rgHIGH7.5
  • JavaScriptJavaScript
  • shakapacker
NoYesJan 08, 2026
CVE-2026-22588MEDIUM6.5
  • RubyRuby
  • spree_api
NoYesJan 08, 2026
GHSA-g9jg-w8vm-g96vMEDIUM4.6
  • JavaScriptJavaScript
  • trix
NoYesDec 31, 2025

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management