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

Source: https://junglewise.ai/threats/cve-2021-41819-cookie-prefix-spoofing-in-cgi-cookie-parse  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2022-01-21  
License: CC BY 4.0 with a link back

CVE-2021-41819 · Severity: low · CVSS 3.1 · Published 2022-01-21

Cookie Prefix Spoofing in CGI::Cookie.parse

Technologies: [cgi (RubyGems)](https://junglewise.ai/threats/technologies/cgi). Vendors: [RubyGems](https://junglewise.ai/threats/vendors/rubygems).

## Quick answers

**Is CVE-2021-41819 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2021-41819 being exploited in the wild.

**How severe is CVE-2021-41819?** Low severity, with a CVSS score of 3.1, published 21 January 2022.

**Which products and versions are affected?** cgi (RubyGems) ECOSYSTEM:introduced=0.3.0,fixed=0.3.1.

**Is there a fix for CVE-2021-41819?** Yes. cgi (RubyGems): upgrade to 0.3.1 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**Am I affected by CVE-2021-41819?** Check whether you run cgi (RubyGems) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- cgi (RubyGems): upgrade to 0.3.1 or later

  ```sh
  bundle update cgi
  ```


## Affected products

- cgi (RubyGems) ECOSYSTEM:introduced=0.3.0,fixed=0.3.1

## Identifiers

- CVE-2021-41819
- GHSA-4vf4-qmvg-mh7h

## Related threats

- [CGI has Regular Expression Denial of Service (ReDoS) potential in Util#escapeElement](https://junglewise.ai/threats/cve-2025-27220-cgi-has-regular-expression-denial-of-service-redos-potential-in)
- [CGI has Denial of Service (DoS) potential in Cookie.parse](https://junglewise.ai/threats/cve-2025-27219-cgi-has-denial-of-service-dos-potential-in-cookie-parse)
- [HTTP response splitting in CGI](https://junglewise.ai/threats/cve-2021-33621-http-response-splitting-in-cgi)
- [Buffer overrun in CGI.escape_html](https://junglewise.ai/threats/cve-2021-41816-buffer-overrun-in-cgi-escape-html)
