NIST deprecates RSA-2048 from 2030. Find every one of them before attackers do.
💎
💎 RubyGems
Not in CISA KEV
MEDIUM severity

CVE-2025-27219 — cgi

MEDIUMFix: ruby/cgi#52

CVE-2025-27219 is a medium-severity (CVSS 5.8) CWE-770 vulnerability in cgi. A fix is available for cgi — see the affected versions and patch details below.

CGI has Denial of Service (DoS) potential in Cookie.parse

Also known asGHSA-gh9q-2xrm-x6qv
Published
Updated
Affected
3 pkgs
Patched
3 / 3
Exploits
None indexed
Exploitation data as of Nov 6, 2026 · OSV.dev, NVD, FIRST.org (EPSS)

Exploitation Status

No confirmed exploitation observed yet

  • CISA’s own triage has not observed active exploitation or public proof-of-concept code for this CVE as of its last assessment.

Exploitation and automatability from CISA’s SSVC triage for CVE-2025-27219.

EPSS Exploitation Probability

via FIRST.org ↗
0.8%probability of exploitation in next 30 days
Lower Risk0.00%
Lower risk than most CVEs58th percentile — riskier than 58% of all scored CVEsHighest risk
0.00%0.45%0.90%1.35%0.3%0.8%May 26Sep 26Nov 26

Probability of exploitation in the next 30 days, from FIRST.org EPSS.

How urgent is this, really

Where this sits among everything scored

Real-World Exposure

3 pkgs affected
💎cgi💎cgi💎cgi

Real-time download stats are indexed for npm and PyPI packages. This vulnerability affects RubyGems packages — download data is not available via public APIs for these ecosystems.

Description

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.

Affected Packages

3 total 3 fixed
EcosystemPackageVulnerable rangeFix
💎RubyGemscgiall versions0.3.5.1bundle update cgi --conservative
💎RubyGemscgi≥ 0.3.6&&< 0.3.70.3.7bundle update cgi --conservative
💎RubyGemscgi≥ 0.4.0&&< 0.4.20.4.2bundle update cgi --conservative

Affected Products

1 product · 3 configurations
Application
cgiruby-lang
≥ 0.4.0 && < 0.4.2
1 version
0.3.6

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for cgi, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.

  2. Fix

    Update cgi to 0.3.5.1 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2025-27219 is resolved across your whole dependency graph.

  3. Workarounds

    Cap what an attacker can consume: apply request size, rate and timeout limits in front of the affected component, and run it with memory and CPU limits so exhaustion degrades one worker rather than the whole service.

Fixing This On Your OS

If you run this on a Linux distribution, patch through your package manager against the distro's own security advisory below — it tracks the exact backported fix for your release, which can ship on a different timeline (and sometimes a different severity) than the upstream project.

Red HatModerate

This issue will cause an excessive resource consumption, potentially resulting in a bad application performance. However, an attacker does have the ability to completely deny service to legitimate users. For this reason, this vulnerability has been rated with a moderate severity.

Workaround published by Red Hat
Do not process large cookies or strings with the CGI::Cookie.parse method from the CGI library. Adding a check to verify and limit the length of the cookie or string before processing it will mitigate this vulnerability.
Source: Red Hat security advisory for CVE-2025-27219 (CC BY 4.0)
ProductFixed inAdvisory
Red Hat Enterprise Linux 10ruby-0:3.3.8-10.el10_0RHSA-2025:8131
Red Hat Enterprise Linux 8ruby:3.3-8100020250414172630.489197e6RHSA-2025:10217
Red Hat Enterprise Linux 8ruby:3.1-8100020250407112943.489197e6RHSA-2025:4063
Red Hat Enterprise Linux 9ruby-0:3.0.7-165.el9_5RHSA-2025:4487
Red Hat Enterprise Linux 9ruby:3.1-9050020250404144903.9RHSA-2025:4488
Red Hat Enterprise Linux 9ruby:3.3-9050020250415095239.9RHSA-2025:4493

Frequently Asked Questions

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.
O3 Security · Impact-Aware SCA

Is CVE-2025-27219 in your dependencies?

Find it across RubyGems, including transitive dependencies.

CVE-2025-27219: cgi DoS — Fixed in 0.3.5.1