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).

Exploitability

The vulnerability can be exploited remotely by sending specially crafted cookie values to applications using the affected versions of the CGI gem. No authentication is required to exploit this vulnerability, making it particularly concerning for public-facing applications (NVD).

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

Linux Distribution fix status

Fix availability across major Linux distributions and their releases.

Debian

Affected

bookworm

ruby3.1

Affected

sid

ruby3.3: 3.3.7-2

Fixed

trixie

ruby3.3: 3.3.7-2

Fixed

Ubuntu

Fixed

bionic (esm-apps)

jruby

Unknown

bionic (esm-infra)

ruby2.5: 2.5.1-1ubuntu1.16+esm4

Fixed

devel

ruby3.3: 3.3.7-1ubuntu2

Fixed

focal

ruby2.7: 2.7.0-5ubuntu1.18

Fixed

focal (esm-apps)

jruby

Unknown

focal (esm-infra)

ruby2.7: 2.7.0-5ubuntu1.18

Fixed

jammy

ruby3.0: 3.0.2-7ubuntu2.10

Fixed

noble

ruby3.2: 3.2.3-1ubuntu0.24.04.5

Fixed

RHEL / CentOS

Fixed

RHEL 8

:appstream:ruby:2.5/ruby/ruby-0:3.3.8-4.module%2Bel8.10.0%2B23024%2Ba87ba659

Fixed

RHEL 9

:appstream:ruby-0:3.0.7-165.el9_5.src

Fixed

RHEL 10

ruby-0:3.3.8-10.el10_0.src

Fixed

Alpine

Fixed

v3.19

ruby-net-imap: 0.3.9-r0, 3.2.8-r0

Fixed

v3.20

ruby-net-imap: 0.4.19-r0, 3.3.8-r0

Fixed

v3.21

ruby-net-imap: 0.4.19-r0, 3.3.8-r0

Fixed

SourceThis report was generated using AI

Related Ruby vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-50276HIGH7.5
  • Ruby logoRuby
  • datadog
NoYesSep 14, 2026
CVE-2026-70658HIGH7.4
  • Ruby logoRuby
  • pay
NoNoSep 14, 2026
CVE-2026-44163MEDIUM5.3
  • Ruby logoRuby
  • fluent-plugin-opentelemetry
NoYesSep 15, 2026
CVE-2026-44282MEDIUM4.8
  • Ruby logoRuby
  • decidim-elections
NoYesSep 15, 2026
CVE-2026-44162LOW2.7
  • Ruby logoRuby
  • ruby4.0-fluent-plugin-s3
NoYesSep 14, 2026

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