CVE-2021-41819
HIGH 7.5CVSS 3.1Cookie Prefix Spoofing in CGI::Cookie.parse
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.
- Published
- 1 Jan 2022
- Last modified
- 17 Jun 2026
- Assigned by
- cve@mitre.org
- NVD status
- Modified
- Weakness
- CWE-565
- Also known as
- BIT-ruby-2021-41819BIT-ruby-min-2021-41819GHSA-4vf4-qmvg-mh7h
- Sources
- NVDJSONOSV GHSA-4vf4-qmvg-mh7hJSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | nvd@nist.gov (Primary) | CVSS 3.1 | HIGH 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N |
| NVD | 134c704f-9b21-4f2e-91b3-4a467353bcc0 (Secondary) | CVSS 3.1 | HIGH 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N |
| OSV | GitHub | CVSS 3.1 | HIGH 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N |
| NVD | nvd@nist.gov (Primary) | CVSS 2.0 | MEDIUM 5.0 | AV:N/AC:L/Au:N/C:N/I:P/A:N |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | ruby-lang | cgicpe:2.3:a:ruby-lang:cgi:0.1.0:*:*:*:*:ruby:*:* |
= 0.1.0 | |
| NVD | ruby-lang | cgicpe:2.3:a:ruby-lang:cgi:0.2.0:*:*:*:*:ruby:*:* |
= 0.2.0 | |
| NVD | ruby-lang | cgicpe:2.3:a:ruby-lang:cgi:0.3.0:*:*:*:*:ruby:*:* |
= 0.3.0 | |
| NVD | ruby-lang | rubycpe:2.3:a:ruby-lang:ruby:*:*:*:*:*:*:*:* |
<= 2.6.8 | |
| NVD | ruby-lang | rubycpe:2.3:a:ruby-lang:ruby:*:*:*:*:*:*:*:* |
>= 2.7.0, < 2.7.5 | 2.7.5 |
| NVD | ruby-lang | rubycpe:2.3:a:ruby-lang:ruby:*:*:*:*:*:*:*:* |
>= 3.0.0, < 3.0.3 | 3.0.3 |
| NVD | redhat | software_collectionscpe:2.3:a:redhat:software_collections:-:*:*:*:*:*:*:* |
(no version) | |
| NVD | redhat | enterprise_linuxcpe:2.3:o:redhat:enterprise_linux:8.0:*:*:*:*:*:*:* |
= 8.0 | |
| NVD | debian | debian_linuxcpe:2.3:o:debian:debian_linux:9.0:*:*:*:*:*:*:* |
= 9.0 | |
| NVD | debian | debian_linuxcpe:2.3:o:debian:debian_linux:10.0:*:*:*:*:*:*:* |
= 10.0 | |
| NVD | debian | debian_linuxcpe:2.3:o:debian:debian_linux:11.0:*:*:*:*:*:*:* |
= 11.0 | |
| NVD | suse | linux_enterprisecpe:2.3:o:suse:linux_enterprise:11.0:sp1:*:*:*:*:*:* |
= 11.0 | |
| NVD | suse | linux_enterprisecpe:2.3:o:suse:linux_enterprise:12.0:*:*:*:*:*:*:* |
= 12.0 | |
| NVD | suse | linux_enterprisecpe:2.3:o:suse:linux_enterprise:15.0:*:*:*:*:*:*:* |
= 15.0 | |
| NVD | opensuse | factorycpe:2.3:a:opensuse:factory:-:*:*:*:*:*:*:* |
(no version) | |
| NVD | opensuse | leapcpe:2.3:o:opensuse:leap:15.2:*:*:*:*:*:*:* |
= 15.2 | |
| NVD | fedoraproject | fedoracpe:2.3:o:fedoraproject:fedora:34:*:*:*:*:*:*:* |
= 34 | |
| NVD | fedoraproject | fedoracpe:2.3:o:fedoraproject:fedora:35:*:*:*:*:*:*:* |
= 35 | |
| OSV | RubyGems | cgi | >= 0.3.0, < 0.3.1 | 0.3.1 |
| OSV | RubyGems | cgi | >= 0.2.0, < 0.2.1 | 0.2.1 |
| OSV | RubyGems | cgi | < 0.1.0.1 | 0.1.0.1 |
References
- https://hackerone.com/reports/910552 · Permissions Required, Third Party Advisory, WEB
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/IUXQCH6FRKANCVZO2Q7D2SQX33FP3KWN/ · WEB
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/UTOJGS5IEFDK3UOO7IY4OTTFGHGLSWZF/ · WEB
- https://security.gentoo.org/glsa/202401-27 · WEB
- https://security.netapp.com/advisory/ntap-20220121-0003/ · Third Party Advisory, WEB
- https://www.ruby-lang.org/en/news/2021/11/24/cookie-prefix-spoofing-in-cgi-cookie-parse-cve-2021-41819/ · Exploit, Vendor Advisory, WEB
- https://nvd.nist.gov/vuln/detail/CVE-2021-41819 · ADVISORY
- https://github.com/ruby/cgi · PACKAGE
- https://github.com/rubysec/ruby-advisory-db/blob/master/gems/cgi/CVE-2021-41819.yml · WEB
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/IUXQCH6FRKANCVZO2Q7D2SQX33FP3KWN · WEB
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/UTOJGS5IEFDK3UOO7IY4OTTFGHGLSWZF · WEB
History
- 25 Nov 2026 20:33 UTC · NVD: first stored (published 1 Jan 2022)
- 25 Nov 2026 20:14 UTC · OSV: first stored (published 21 Jan 2022)