CVE-2021-41819Ruby-lang Cgi
High 7.5 No auth needed
Follow: this CVE · Ruby-lang · Ruby-lang Cgi We alert you by email or Slack (account required).
- 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.
What to do
- Apply the vendor's security update for Cgi.
- It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.
Affected packages
| Ecosystem | Package | Affected versions | Fixed in | How 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)
| Vendor | Product | Versions |
|---|---|---|
| ruby-lang | cgi | 0.1.0 |
| ruby-lang | cgi | 0.2.0 |
| ruby-lang | cgi | 0.3.0 |
| ruby-lang | ruby | ≤ 2.6.8 |
| ruby-lang | ruby | ≥ 2.7.0 < 2.7.5 |
| ruby-lang | ruby | ≥ 3.0.0 < 3.0.3 |
| redhat | software_collections | all |
| redhat | enterprise_linux | 8.0 |
| debian | debian_linux | 9.0 |
| debian | debian_linux | 10.0 |
| debian | debian_linux | 11.0 |
| suse | linux_enterprise | 11.0 |
| suse | linux_enterprise | 12.0 |
| suse | linux_enterprise | 15.0 |
| opensuse | factory | all |
| opensuse | leap | 15.2 |
| fedoraproject | fedora | 34 |
| fedoraproject | fedora | 35 |
Official advisories
- Red Hat Security Advisory: Red Hat Hardened Images RPMs bug fix and enhancement update · Red Hat · RHSA-2026:8838 · Apr 21, 2026 Critical
- Red Hat Security Advisory: Red Hat Hardened Images RPMs bug fix and enhancement update · Red Hat · RHSA-2026:7305 · Apr 21, 2026 Critical
- Red Hat Security Advisory: Red Hat Hardened Images RPMs bug fix and enhancement update · Red Hat · RHSA-2026:7307 · Apr 21, 2026 Critical
- libruby4_0-4_0-4.0.0~preview2-1.1 on GA media · SUSE · openSUSE-SU-2025:15819-1 · Dec 12, 2025 Critical
Vendor, CERT and distribution advisories that name this CVE. Original titles.
Official sources
References
Links published by the sources. Open them with care.
- hackerone.com Permissions Required Third Party Advisory
- lists.fedoraproject.org
- lists.fedoraproject.org
- security.gentoo.org
- security.netapp.com Third Party Advisory
- www.ruby-lang.org Exploit Vendor Advisory