Read the docs
TI-2025-20076 Aliases CVE-2025-27219GHSA-gh9q-2xrm-x6qv

Resource allocation without limits in ruby CGI

Priority LOW 34CWE-770Published · Updated

Key facts

Attack vector
Network
Privileges required
None
User interaction
None
Attack complexity
Low
Impact type
Denial of service
Confidentiality · integrity · availability
None · None · High
Fix status
Partial Red Hat: 5 fixed, 3 without a fix

Attack profile from CVSS 3.1 · NVD. Fix status from CNA, GitHub and Red Hat. Impact type from CWE-770.

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.

Why it matters now

Exploitation None reported CISA SSVC · not in CISA KEV
EPSS 0.00849 58th percentileScored 2026-11-07
Fix Partial CGI (ruby-lang): 0.3.5.1, 0.3.7, 0.4.2cgi (RubyGems): 0.3.5.1, 0.3.7, 0.4.2Red Hat: 6 advisoriesRed Hat: 5 fixed, 3 without a fix

SSVC decision points

CISA ADP · SSVC 2.0.3

Exploitation
None
Automatable
No
Technical impact
Partial

The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.

Affected products

VendorProductAffected versionsFixed inStatusSource
rubyCGIbefore 0.3.5.1; 0.3.6 to before 0.3.7; 0.4.0 to before 0.4.20.3.5.1, 0.3.7, 0.4.2Patch availableCNA
—cgi (RubyGems)before 0.3.5.10.3.5.1Patch availableGHSA-gh9q-2xrm-x6qv
—cgi (RubyGems)0.3.6 to before 0.3.70.3.7Patch availableGHSA-gh9q-2xrm-x6qv
—cgi (RubyGems)0.4.0 to before 0.4.20.4.2Patch availableGHSA-gh9q-2xrm-x6qv
  • CGI Vendorruby Affected before 0.3.5.1; 0.3.6 to before 0.3.7; 0.4.0 to before 0.4.2 Fixed in 0.3.5.1, 0.3.7, 0.4.2 Patch available CNA
  • cgi (RubyGems) Vendor— Affected before 0.3.5.1 Fixed in 0.3.5.1 Patch available GHSA-gh9q-2xrm-x6qv
  • cgi (RubyGems) Vendor— Affected 0.3.6 to before 0.3.7 Fixed in 0.3.7 Patch available GHSA-gh9q-2xrm-x6qv
  • cgi (RubyGems) Vendor— Affected 0.4.0 to before 0.4.2 Fixed in 0.4.2 Patch available GHSA-gh9q-2xrm-x6qv

CPE configurations NVD · 2

CPEVersionsRoleVendor
cpe:2.3:a:ruby-lang:cgi:*:*:*:*:*:ruby:*:*before 0.3.5.1; 0.4.0 to before 0.4.2Vulnerableruby
cpe:2.3:a:ruby-lang:cgi:0.3.6:*:*:*:*:ruby:*:*0.3.6Vulnerableruby
  • cpe:2.3:a:ruby-lang:cgi:*:*:*:*:*:ruby:*:* Versions before 0.3.5.1; 0.4.0 to before 0.4.2 Vulnerable ·ruby
  • cpe:2.3:a:ruby-lang:cgi:0.3.6:*:*:*:*:ruby:*:* Versions 0.3.6 Vulnerable ·ruby

Remediation

  • Fix · CNA CGI (ruby-lang) Fixed in 0.3.5.1, 0.3.7, 0.4.2
  • Fix · GHSA-gh9q-2xrm-x6qv cgi (RubyGems) Fixed in 0.3.5.1 Advisory →
  • Fix · GHSA-gh9q-2xrm-x6qv cgi (RubyGems) Fixed in 0.3.7 Advisory →
  • Fix · GHSA-gh9q-2xrm-x6qv cgi (RubyGems) Fixed in 0.4.2 Advisory →

Red Hat 6 advisories

  • RHSA-2025:10217 Released 2025-07-02 · Red Hat rating Moderate
    ruby:3.3 security update
    • Red Hat Enterprise Linux AppStream (v. 8) ruby-3.3.8-4.module+el8.10.0+23024+a87ba659.aarch64::ruby:3.3, ruby-3.3.8-4.module+el8.10.0+23024+a87ba659.i686::ruby:3.3, ruby-3.3.8-4.module+el8.10.0+23024+a87ba659.ppc64le::ruby:3.3 +47
  • RHSA-2025:8131 Released 2025-05-26 · Red Hat rating Moderate
    ruby security update
    • Red Hat Enterprise Linux AppStream (v. 10) ruby-3.3.8-10.el10_0, ruby-bundled-gems-3.3.8-10.el10_0, ruby-default-gems-3.3.8-10.el10_0 +20
    • Red Hat Enterprise Linux CodeReady Linux Builder (v. 10) ruby-doc-3.3.8-10.el10_0
  • RHSA-2025:4493 Released 2025-05-06 · Red Hat rating Moderate
    ruby:3.3 security update
    • Red Hat Enterprise Linux AppStream (v. 9) ruby-3.3.8-4.module+el9.5.0+23030+26c9b8e1.aarch64::ruby:3.3, ruby-3.3.8-4.module+el9.5.0+23030+26c9b8e1.i686::ruby:3.3, ruby-3.3.8-4.module+el9.5.0+23030+26c9b8e1.ppc64le::ruby:3.3 +47
Show 3 more Red Hat advisories
  • RHSA-2025:4488 Released 2025-05-06 · Red Hat rating Moderate
    ruby:3.1 security update
    • Red Hat Enterprise Linux AppStream (v. 9) ruby-3.1.7-146.module+el9.5.0+23003+a4c328ce.aarch64::ruby:3.1, ruby-3.1.7-146.module+el9.5.0+23003+a4c328ce.i686::ruby:3.1, ruby-3.1.7-146.module+el9.5.0+23003+a4c328ce.ppc64le::ruby:3.1 +47
  • RHSA-2025:4487 Released 2025-05-06 · Red Hat rating Moderate
    ruby security update
    • Red Hat CodeReady Linux Builder (v. 9) ruby-doc-3.0.7-165.el9_5
    • Red Hat Enterprise Linux AppStream (v. 9) ruby-3.0.7-165.el9_5, ruby-default-gems-3.0.7-165.el9_5, ruby-devel-3.0.7-165.el9_5 +18
  • RHSA-2025:4063 Released 2025-04-23 · Red Hat rating Moderate
    ruby:3.1 security update
    • Red Hat Enterprise Linux AppStream (v. 8) ruby-3.1.7-145.module+el8.10.0+23011+f9d508f8.aarch64::ruby:3.1, ruby-3.1.7-145.module+el8.10.0+23011+f9d508f8.i686::ruby:3.1, ruby-3.1.7-145.module+el8.10.0+23011+f9d508f8.ppc64le::ruby:3.1 +47

Fixed in the same release

Records fixed by the same vendor advisory or release, as the CNA lists them.

  • Release ·

    ruby-lang CGI 0.3.5.1, 0.3.7, 0.4.2

    2 records Highest priority Priority LOW 2 LOW

    Other records, highest priority first

    • TI-2025-20077 Regular expression denial of service in ruby CGIPriority LOW 34

Vendor assessments

Red Hat

Red Hat rating: Moderate. Red Hat's page for this CVE →

ProductStatusPlan or fix
Red Hat Enterprise Linux 6AffectedNo fix planned: Out of support scope
Red Hat Enterprise Linux 7AffectedNo fix planned: Out of support scope
Red Hat Enterprise Linux 8AffectedNo fix planned: Out of support scope
Red Hat CodeReady Linux Builder (v. 9)Fixed RHSA-2025:4487
Red Hat Enterprise Linux AppStream (v. 10)Fixed RHSA-2025:8131
Red Hat Enterprise Linux AppStream (v. 8)Fixed RHSA-2025:10217, RHSA-2025:4063
Red Hat Enterprise Linux AppStream (v. 9)Fixed RHSA-2025:4487, RHSA-2025:4488, RHSA-2025:4493
Red Hat Enterprise Linux CodeReady Linux Builder (v. 10)Fixed RHSA-2025:8131

Timeline

  1. 2026-10-02 Threatist record created from CVE-2025-27219
  2. 2026-10-03 Alias added: GHSA-gh9q-2xrm-x6qv

References

  • TI-2021-18442 CGI.escape_html in Ruby before 2.7.5 and 3.x before 3.0.3 has an integer overflow and… CVSS 3.1CRITICAL 9.8
  • TI-2021-12996 The cgi gem before 0.1.0.2, 0.2.x before 0.2.2, and 0.3.x before 0.3.5 for Ruby allows… CVSS 3.1HIGH 8.8
  • TI-2021-18444 CGI::Cookie.parse in Ruby through 2.6.8 mishandles security prefixes in cookie names. CVSS 3.1HIGH 7.5
  • TI-2025-20077 Regular expression denial of service in ruby CGI CVSS 3.1HIGH 7.5

Sources