# cgi (RubyGems) vulnerabilities

5 known vulnerabilities (1 high, 2 medium), with the versions each affects and the releases that fix them.

## At a glance

- Latest release: not known (cve.now hasn't read this package's releases)
- Newest unaffected release: not known without release data
- Registry: https://rubygems.org/gems/cgi

## Advisories (5)

### [CVE-2025-27220](https://cve.now/CVE-2025-27220): In the CGI gem before 0.4.2 for Ruby, a Regular Expression Denial of Service (ReDoS) vulnerability exists in the Util#escapeElement method.

- Severity: Medium 4.0
- Published: Mar 3, 2025
- Affected: fixed in 0.3.5.1; from 0.3.6, fixed in 0.3.7; from 0.4.0, fixed in 0.4.2.

### [CVE-2025-27219](https://cve.now/CVE-2025-27219): In the CGI gem before 0.4.2 for Ruby, the CGI::Cookie.parse method in the CGI library contains a potential Denial of Service (DoS)…

- Severity: Medium 5.8
- Published: Mar 3, 2025
- Affected: fixed in 0.3.5.1; from 0.3.6, fixed in 0.3.7; from 0.4.0, fixed in 0.4.2.

### [CVE-2021-33621](https://cve.now/CVE-2021-33621): The cgi gem before 0.1.0.2, 0.2.x before 0.2.2, and 0.3.x before 0.3.5 for Ruby allows HTTP response splitting.

- Severity: Unrated
- Published: Nov 18, 2022
- Affected: from 0.3.0, fixed in 0.3.5; from 0.2.0, fixed in 0.2.2; fixed in 0.1.0.2.

### [CVE-2021-41816](https://cve.now/CVE-2021-41816): CGI.escape\_html in Ruby before 2.7.5 and 3.x before 3.0.3 has an integer overflow and resultant buffer overflow via a long string on…

- Severity: Unrated
- Published: Feb 6, 2022
- Affected: from 0.3.0, fixed in 0.3.1; from 0.2.0, fixed in 0.2.1; fixed in 0.1.0.1.

### [CVE-2021-41819](https://cve.now/CVE-2021-41819): CGI::Cookie.parse in Ruby through 2.6.8 mishandles security prefixes in cookie names.

- Severity: High 7.5
- Published: Jan 1, 2022
- Affected: from 0.3.0, fixed in 0.3.1; from 0.2.0, fixed in 0.2.1; fixed in 0.1.0.1.

---

Source: cve.now
Built by [Sazabi](https://www.sazabi.com/?utm_source=cve-now&utm_medium=markdown), AI-native observability and security: automatic issue detection, plain-language log search and live dashboards.
Page: https://cve.now/packages/rubygems/cgi
Site guide for agents: https://cve.now/llms.txt
Uses NVD data; not endorsed by NVD.
