# CVE-2021-41819: Cookie Prefix Spoofing in CGI::Cookie.parse

- Severity: High 7.5 (CVSS:3.1, scored by CISA-ADP) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 3.20%, higher than 88% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2022-01-01T00:00:00.000Z
- Modified: 2026-09-08T08:48:19.326Z
- Also known as: GHSA-4vf4-qmvg-mh7h, BIT-RUBY-2021-41819, BIT-RUBY-MIN-2021-41819
- Weaknesses: CWE-565
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: mitre

## Description

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.

(As written by CVE List.)

## Affected

- Unspecified product: n/a
- cgi (RubyGems): from 0.3.0 before 0.3.1; from 0.2.0 before 0.2.1; before 0.1.0.1
- ruby-lang cgi: 0.1.0; 0.2.0; 0.3.0
- ruby-lang ruby: up to 2.6.8; from 2.7.0 before 2.7.5; from 3.0.0 before 3.0.3
- redhat software_collections: no versions given
- redhat enterprise_linux: 8.0
- debian debian_linux: 9.0; 10.0; 11.0
- suse linux_enterprise: 11.0; 12.0; 15.0
- opensuse factory: no versions given
- opensuse leap: 15.2
- fedoraproject fedora: 34; 35
- ruby (Bitnami): before 2.6.9; from 2.7.0 before 2.7.5; from 3.0.0 before 3.0.3
- ruby-min (Bitnami): before 2.6.9; from 2.7.0 before 2.7.5; from 3.0.0 before 3.0.3

## Every score

- CISA-ADP: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N`
- GitHub: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N`
- NVD: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N`
- NVD: CVSS:2.0 5.0 Medium `AV:N/AC:L/Au:N/C:N/I:P/A:N`
- Bitnami Vulnerability Database: rating High

## References

- <https://www.ruby-lang.org/en/news/2021/11/24/cookie-prefix-spoofing-in-cgi-cookie-parse-cve-2021-41819/> (exploit, advisory, vendor-advisory)
- <https://hackerone.com/reports/910552> (advisory, permissions-required, third-party-advisory, web)
- <https://security.netapp.com/advisory/ntap-20220121-0003/> (advisory, third-party-advisory)
- <https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/IUXQCH6FRKANCVZO2Q7D2SQX33FP3KWN/> (vendor-advisory, web)
- <https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/UTOJGS5IEFDK3UOO7IY4OTTFGHGLSWZF/> (vendor-advisory, web)
- <https://security.gentoo.org/glsa/202401-27> (vendor-advisory, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2021-41819> (advisory, web)
- <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%40lists.fedoraproject.org/message/IUXQCH6FRKANCVZO2Q7D2SQX33FP3KWN> (web)
- <https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/UTOJGS5IEFDK3UOO7IY4OTTFGHGLSWZF> (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)
- <https://security.netapp.com/advisory/ntap-20220121-0003> (web)
- <https://www.ruby-lang.org/en/news/2021/11/24/cookie-prefix-spoofing-in-cgi-cookie-parse-cve-2021-41819> (web)

## Sources

- CVE List: [CVE-2021-41819](https://www.cve.org/CVERecord?id=CVE-2021-41819), CVE Terms of Use, modified 2025-05-22
- GitHub Advisory Database: [GHSA-4vf4-qmvg-mh7h](https://github.com/advisories/GHSA-4vf4-qmvg-mh7h), CC-BY-4.0, modified 2025-01-27
- NVD: [CVE-2021-41819](https://nvd.nist.gov/vuln/detail/CVE-2021-41819), Public domain, modified 2026-06-17
- Bitnami Vulnerability Database: [BIT-RUBY-2021-41819](https://osv.dev/vulnerability/BIT-RUBY-2021-41819), Apache-2.0, modified 2026-09-08
- Bitnami Vulnerability Database: [BIT-RUBY-MIN-2021-41819](https://osv.dev/vulnerability/BIT-RUBY-MIN-2021-41819), Apache-2.0, modified 2026-09-08

---

Page: https://cve.day/CVE-2021-41819 · Whole record: https://cve.day/CVE-2021-41819.json · Rebuilt by cve.day 2026-11-25T22:58:06.324Z
