CVE-2021-33621: High severity ruby vulnerability
A vulnerability was found in Ruby that allows HTTP header injection. A CGI application using the CGI library may insert untrusted input into the HTTP response header. This issue can allow an attacker to insert a newline character to split a header and inject malicious content to deceive clients.
Other sources
cgi.rb in Ruby through 2.6.x, through 3.0x, and through 3.1.x allows 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.
References: https://www.ruby-lang.org/en/security/ https://www.ruby-lang.org/en/news/2022/11/22/http-response-splitting-in-cgi-cve-2021-33621/ https://github.com/rubysec/ruby-advisory-db/blob/master/gems/cgi/CVE-2021-33621.yml https://github.com/ruby/cgi/compare/v0.1.0.1...v0.1.0.2
— Red Hat
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.
— GitHub
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 Software
Remediation
Event History
Parent advisories
This vulnerability appears in the following advisories.
Frequently Asked Questions
What is the vulnerability ID for the Ruby gem cgi.rb vulnerability?
The vulnerability ID for the Ruby gem cgi.rb vulnerability is CVE-2021-33621.
What is the severity of CVE-2021-33621?
CVE-2021-33621 has a severity rating of 8.8 (High).
Which software versions are affected by CVE-2021-33621?
Ruby gem cgi.rb versions 0.1.0.2, 0.2.x (up to 0.2.2), and 0.3.x (up to 0.3.5) are affected by CVE-2021-33621.
How can an attacker exploit CVE-2021-33621?
An attacker can exploit CVE-2021-33621 by inserting untrusted input into the HTTP response header of a CGI application using the CGI library, causing header injection and potentially injecting malicious content.
Are there any remediation steps available for CVE-2021-33621?
Yes, remediation steps are available for CVE-2021-33621. Please refer to the references provided for more information.