CVE-2021-33621
JSON

8.8high

HTTP response splitting in CGI

Severity
8.8high CVSS:3.1 by NVD
Exploit likelihood
3.06% (higher than 87% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
mitre
Also known as
GHSA-vc47-6rqg-c7f5BIT-RUBY-2021-33621BIT-RUBY-MIN-2021-33621

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

Product or packageVersionsReported by
Unspecified productn/aCVE List
cgi (RubyGems)from 0.3.0 before 0.3.5, from 0.2.0 before 0.2.2, before 0.1.0.2GitHub Advisory Database
ruby-lang cgibefore 0.1.0.2, from 0.2.0 before 0.2.2, from 0.3.0 before 0.3.5NVD
fedoraproject fedora35, 36, 37NVD
ruby-lang rubyfrom 2.7.0 before 2.7.7, from 3.0.0 before 3.0.5, from 3.1.0 before 3.1.3NVD
ruby (Bitnami)from 2.7.0 before 2.7.7, from 3.0.0 before 3.0.5, from 3.1.0 before 3.1.3Bitnami Vulnerability Database
ruby-min (Bitnami)from 2.7.0 before 2.7.7, from 3.0.0 before 3.0.5, from 3.1.0 before 3.1.3Bitnami Vulnerability Database

All scores

GitHub8.8high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
NVD8.8high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Bitnami Vulnerability Databasehigh rating

Classification

What each source says

CVE List

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.

GitHub Advisory Database

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.

NVD (es)

La gema cgi anterior a 0.1.0.2, 0.2.x anterior a 0.2.2 y 0.3.x anterior a 0.3.5 para Ruby permite la división de respuestas HTTP. Esto es relevante para aplicaciones que utilizan entradas de usuarios que no son de confianza, ya sea para generar una respuesta HTTP o para crear un objeto CGI::Cookie.

References

https://www.ruby-lang.org/en/news/2022/11/22/http-response-splitting-in-cgi-cve-2021-33621/advisory, exploit, third-party-advisory
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/DQR7LWED6VAPD5ATYOBZIGJQPCUBRJBX/vendor-advisory, web
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/YACE6ORF2QBXXBK2V2CM36D7TZMEJVAS/vendor-advisory, web
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/THVTYHHEOVLQFCFHWURZYO7PVUPBHRZD/vendor-advisory, web
https://security.netapp.com/advisory/ntap-20221228-0004/advisory, third-party-advisory
https://lists.debian.org/debian-lts-announce/2023/06/msg00012.htmlmailing-list, web
https://security.gentoo.org/glsa/202401-27vendor-advisory, web
https://lists.debian.org/debian-lts-announce/2024/09/msg00000.htmlweb
https://nvd.nist.gov/vuln/detail/CVE-2021-33621advisory, web
https://hackerone.com/reports/1204695web
https://github.com/rubysec/ruby-advisory-db/blob/master/gems/cgi/CVE-2021-33621.ymlweb
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/DQR7LWED6VAPD5ATYOBZIGJQPCUBRJBXweb

Sources

SourceRecordLicence
CVE ListCVE-2021-33621 changed 2025-11-04CVE Terms of Use
GitHub Advisory DatabaseGHSA-vc47-6rqg-c7f5 changed 2026-08-13CC-BY-4.0
NVDCVE-2021-33621 changed 2026-06-17Public domain
Bitnami Vulnerability DatabaseBIT-RUBY-2021-33621 changed 2026-09-08Apache-2.0
Bitnami Vulnerability DatabaseBIT-RUBY-MIN-2021-33621 changed 2026-09-08Apache-2.0