Your RSA-2048 keys break in 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 reference exists, 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
Nov 18, 2022
Updated
Sep 16, 2026
Affected
3 pkgs
Patched
3 / 3
Exploits
1 known
Exploitation data as of Sep 21, 2026 · OSV.dev, NVD, FIRST.org (EPSS)

EPSS Exploitation Probability

via FIRST.org ↗
2.4%probability of exploitation in next 30 days
Lower Risk0.00%
Lower risk than most CVEs83th percentile — riskier than 83% of all scored CVEsHighest risk

EPSS (Exploit Prediction Scoring System) is a daily probability model maintained by FIRST.org. It estimates the likelihood a CVE will be exploited in production environments within the next 30 days, derived from real-world threat intelligence signals.

How urgent is this, really

CVE-2021-33621 plotted by exploitation likelihood (EPSS) against impact (CVSS). The shaded corner — EPSS 50%+ and CVSS 7.0+ — is where this CVE doesn't sit, though severity or exploitability alone can still warrant action.

Where this sits among everything scored

Of 377,333 CVEs with a current EPSS score, this one falls in the < 10% band (highlighted). Real counts from FIRST.org, not a sample — log-scaled since the landscape is heavily right-skewed.

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
💎RubyGemscgi0.3.0&&< 0.3.50.3.5bundle update cgi --conservative
💎RubyGemscgi0.2.0&&< 0.2.20.2.2bundle update cgi --conservative
💎RubyGemscgiall versions0.1.0.2bundle update cgi --conservative
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.

  4. How O3 protects you

    O3 Security's impact-aware SCA analyses which vulnerable code paths your application actually calls, so a match like CVE-2021-33621 can be triaged on real exposure rather than presence alone.

Tailored to CVE-2021-33621. Runtime protection reduces exposure until a permanent patch is applied and verified — it complements patching, it doesn't replace it.

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?

O3 Security finds CVE-2021-33621 across RubyGems dependencies, including transitive ones, and its impact-aware SCA ranks findings by whether your code actually calls the vulnerable path.

CVE-2021-33621: cgi (High 8.8) | O3 Security