CVE-2021-33621
HTTP response splitting in CGI
Also known as BIT-ruby-2021-33621, BIT-ruby-min-2021-33621, GHSA-vc47-6rqg-c7f5
Mitigation
- Upgrade cgi to one of 0.3.5, 0.2.2, 0.1.0.2 (or later in the same release line).
Who should check
- Projects that depend on RubyGems package cgi (>= 0.3.0, < 0.3.5)
- Anyone running n/a (versions: see the vendor advisory)
Vulnerability facts
- Affected
- cgi >= 0.3.0, < 0.3.5
- Fixed in
- 0.3.5, 0.2.2, 0.1.0.2
- Exploited in the wild
- Not in CISA KEV
- Public exploit / PoC
- Yes: see the exploit references below
- Remote exploitation
- Remote, login needed
- CVSS
- 8.8 (v3.1, NVD)CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:HOpen in CVSS calculator
Show all 8 CVSS metrics
- Attack vector: Network
- Attack complexity: Low
- Privileges required: Low
- User interaction: None
- Scope: Unchanged
- Confidentiality impact: High
- Integrity impact: High
- Availability impact: High
- EPSS
- 3.06% chance of exploitation in 30 days (percentile 88, 2026-11-26)
- CWE
- CWE-74
- Modified
Description
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. This is relevant to applications that use untrusted user input either to generate an HTTP response or to create a CGI::Cookie object.
Affected and fixed versions
| Package / product | Affected | Fixed | Source |
|---|---|---|---|
| RubyGems cgi | >= 0.3.0, < 0.3.5 | 0.3.5, 0.2.2, 0.1.0.2 | osv |
| n/a | — | — | nvd |
Check your systems with an agent
Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.
Check whether anything I run is affected by CVE-2021-33621. Work read-only: do not install, upgrade, delete or change anything. Details: https://flawdb.com/CVE-2021-33621.md Affected: cgi >= 0.3.0, < 0.3.5 Fixed in: 0.3.5, 0.2.2, 0.1.0.2 Steps: 1. Search this machine and project for cgi (RubyGems), n/a: dependency manifests and lockfiles, installed packages, container images and running services. 2. For each match, note the installed version and whether it is inside the affected range. 3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
References
Vendor advisories
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/DQR7LWED6VAPD5ATYOBZIGJQPCUBRJBX/
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/YACE6ORF2QBXXBK2V2CM36D7TZMEJVAS/
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/THVTYHHEOVLQFCFHWURZYO7PVUPBHRZD/
- https://security.gentoo.org/glsa/202401-27
- https://nvd.nist.gov/vuln/detail/CVE-2021-33621
Exploits and PoCs
Other
- https://security.netapp.com/advisory/ntap-20221228-0004/
- https://lists.debian.org/debian-lts-announce/2023/06/msg00012.html
- https://lists.debian.org/debian-lts-announce/2024/09/msg00000.html
- https://hackerone.com/reports/1204695
- https://github.com/rubysec/ruby-advisory-db/blob/master/gems/cgi/CVE-2021-33621.yml
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/DQR7LWED6VAPD5ATYOBZIGJQPCUBRJBX
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/THVTYHHEOVLQFCFHWURZYO7PVUPBHRZD
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/YACE6ORF2QBXXBK2V2CM36D7TZMEJVAS
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/DQR7LWED6VAPD5ATYOBZIGJQPCUBRJBX
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/THVTYHHEOVLQFCFHWURZYO7PVUPBHRZD
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/YACE6ORF2QBXXBK2V2CM36D7TZMEJVAS
- https://security.netapp.com/advisory/ntap-20221228-0004
- https://www.ruby-lang.org/en/news/2022/11/22/http-response-splitting-in-cgi-cve-2021-33621
FAQ
Is CVE-2021-33621 being exploited?
There is no confirmed exploitation: CVE-2021-33621 is not in the CISA Known Exploited Vulnerabilities catalog. Public exploit code or a proof of concept is available. EPSS estimates a 3.06% chance of exploitation in the next 30 days (as of 2026-11-26).
How serious is CVE-2021-33621?
High: CVSS 8.8 (v3.1, scored by NVD). Remote, login needed.
Which versions are affected by CVE-2021-33621?
cgi >= 0.3.0, < 0.3.5.
Is there a fix for CVE-2021-33621?
Yes. Fixed in 0.3.5, 0.2.2, 0.1.0.2. Upgrade cgi to one of 0.3.5, 0.2.2, 0.1.0.2 (or later in the same release line).
How do I check if I'm affected by CVE-2021-33621?
Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.