NIST deprecates RSA-2048 from 2030. Find every one of them before attackers do.
💎
💎 RubyGems
Not in CISA KEV
HIGH severity

CVE-2021-33621 — cgi

HIGH

CVE-2021-33621 is a high-severity (CVSS 8.8) CWE-74 vulnerability in cgi. 1 public exploit or proof-of-concept reference is indexed, so weaponization risk is real. A fix is available for cgi — see the affected versions and patch details below.

HTTP response splitting in CGI

Also known asBIT-ruby-2021-33621BIT-ruby-min-2021-33621GHSA-vc47-6rqg-c7f5
Published
Updated
Affected
3 pkgs
Patched
3 / 3
Exploits
1 known
Exploitation data as of Nov 5, 2026 · OSV.dev, NVD, FIRST.org (EPSS)

EPSS Exploitation Probability

via FIRST.org ↗
2.5%probability of exploitation in next 30 days
Lower Risk0.00%
Lower risk than most CVEs84th percentile — riskier than 84% of all scored CVEsHighest risk
0.84%1.54%2.25%2.95%1.3%2.5%May 26Sep 26Nov 26

Probability of exploitation in the next 30 days, from FIRST.org EPSS.

How urgent is this, really

Where this sits among everything scored

Real-World Exposure

3 pkgs affected
💎cgi💎cgi💎cgi

Real-time download stats are indexed for npm and PyPI packages. This vulnerability affects RubyGems packages — download data is not available via public APIs for these ecosystems.

Description

Ruby gem cgi.rb prior to versions 0.3.5, 0.2.2 and 0.1.0.2 allow HTTP header injection. If a CGI application using the CGI library inserts untrusted input into the HTTP response header, an attacker can exploit it to insert a newline character to split a header, and inject malicious content to deceive clients. This issue has been patched in versions 0.3.5, 0.2.2 and 0.1.0.2.

Affected Packages

3 total 3 fixed
EcosystemPackageVulnerable rangeFix
💎RubyGemscgi≥ 0.3.0&&< 0.3.50.3.5bundle update cgi --conservative
💎RubyGemscgi≥ 0.2.0&&< 0.2.20.2.2bundle update cgi --conservative
💎RubyGemscgiall versions0.1.0.2bundle update cgi --conservative

Affected Products

3 products · 9 configurations
OS
fedorafedoraproject
3 versions
353637
Application
cgiruby-lang
≥ 0.3.0 && < 0.3.5
range
Application
rubyruby-lang
≥ 3.1.0 && < 3.1.3
range
Exploits & PoCs
1

Research use only. For defensive security, authorized penetration testing, and academic research only. Never execute exploit code against systems without explicit written authorization.

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for cgi, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.

  2. Fix

    Update cgi to 0.3.5 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2021-33621 is resolved across your whole dependency graph.

  3. Workarounds

    If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.

Fixing This On Your OS

If you run this on a Linux distribution, patch through your package manager against the distro's own security advisory below — it tracks the exact backported fix for your release, which can ship on a different timeline (and sometimes a different severity) than the upstream project.

Red HatModerate

This vulnerability is marked as moderate because the flaw was more difficult to exploit but could still lead to some compromise of the confidentiality, integrity, or availability of resources under certain circumstances but are less easily exploited based on a technical evaluation of the flaw, or affect unlikely…

ProductFixed inAdvisory
Red Hat Enterprise Linux 8ruby:2.7-8080020230427102918.63b34585RHSA-2023:3821
Red Hat Enterprise Linux 8ruby:2.5-8090020230627084142.b46abd14RHSA-2023:7025
Red Hat Enterprise Linux 8ruby:3.1-8090020240311122605.a75119d5RHSA-2024:1431
Red Hat Enterprise Linux 8ruby:3.0-8100020240522072634.489197e6RHSA-2024:3500
Red Hat Enterprise Linux 9ruby:3.1-9030020240320163942.9RHSA-2024:1576
Red Hat Enterprise Linux 9ruby-0:3.0.7-162.el9_4RHSA-2024:3838
Red Hat Enterprise Linux 9.2 Extended Update Supportruby-0:3.0.4-161.el9_2.1RHSA-2024:4542
Red Hat Software Collections for Red Hat Enterprise Linux 7rh-ruby27-ruby-0:2.7.8-132.el7RHSA-2023:3291

Frequently Asked Questions

Ruby gem cgi.rb prior to versions 0.3.5, 0.2.2 and 0.1.0.2 allow HTTP header injection. If a CGI application using the CGI library inserts untrusted input into the HTTP response header, an attacker can exploit it to insert a newline character to split a header, and inject malicious content to deceive clients. This issue has been patched in versions 0.3.5, 0.2.2 and 0.1.0.2.
O3 Security · Impact-Aware SCA

Is CVE-2021-33621 in your dependencies?

Find it across RubyGems, including transitive dependencies.

CVE-2021-33621: cgi — Fixed in 0.3.5