Live threats

All CVEs / Ruby-lang

CVE-2021-41819Ruby-lang Cgi

High 7.5 No auth needed

Priority
60
CVSS 3.1
7.5
EPSS
3.2%
probability of exploitation in 30 days · percentile 89
Auth required
No
Published
Jan 1, 2022
Updated
Jun 17, 2026
Category
Application · Cross-platform
Weakness (CWE)
CWE-565
SSVC (CISA)
Exploitation: none · Automatable: no · Technical impact: partial
Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N

What happens

CGI::Cookie.parse in Ruby through 2.6.8 mishandles security prefixes in cookie names. This also affects the CGI gem through 0.3.0 for Ruby.

Original NVD text.

What to do

  1. Apply the vendor's security update for Cgi.
  2. It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.

Affected packages

EcosystemPackageAffected versionsFixed inHow to upgrade
RubyGems cgi ≥ 0.3.0 < 0.3.1 0.3.1 gem "cgi", ">= 0.3.1"
RubyGems cgi ≥ 0.2.0 < 0.2.1 0.2.1 gem "cgi", ">= 0.2.1"
RubyGems cgi < 0.1.0.1 0.1.0.1 gem "cgi", ">= 0.1.0.1"

Per OSV / GitHub Advisories (GHSA-4vf4-qmvg-mh7h). Check the version in your lockfile before upgrading.

Affected products (CPE)

VendorProductVersions
ruby-langcgi0.1.0
ruby-langcgi0.2.0
ruby-langcgi0.3.0
ruby-langruby≤ 2.6.8
ruby-langruby≥ 2.7.0 < 2.7.5
ruby-langruby≥ 3.0.0 < 3.0.3
redhatsoftware_collectionsall
redhatenterprise_linux8.0
debiandebian_linux9.0
debiandebian_linux10.0
debiandebian_linux11.0
suselinux_enterprise11.0
suselinux_enterprise12.0
suselinux_enterprise15.0
opensusefactoryall
opensuseleap15.2
fedoraprojectfedora34
fedoraprojectfedora35

Official advisories

Vendor, CERT and distribution advisories that name this CVE. Original titles.

Official sources

References

Links published by the sources. Open them with care.