CVE-2021-41819: High severity ruby-lang Cgi Ruby vulnerability

Published Nov 24, 2021
·
Updated

A flaw was found in Ruby. RubyGems cgi gem could allow a remote attacker to conduct spoofing attacks caused by the mishandling of security prefixes in cookie names in the CGI::Cookie.parse function. By sending a specially-crafted request, an attacker could perform cookie prefix spoofing attacks.

Other sources

CGI::Cookie.parse in Ruby through 2.6.8 mishandles security prefixes in cookie names. This also affects the CGI gem prior to versions 0.3.1, 0.2.1, 0.1.1, and 0.1.0.1 for Ruby.

GitHub

CGI::Cookie.parse in Ruby through 2.6.8 mishandles security prefixes in cookie names. This also affects the CGI gem through 0.3.0 for Ruby.

The old versions of CGI::Cookie.parse applied URL decoding to cookie names. An attacker could exploit this vulnerability to spoof security prefixes in cookie names, which may be able to trick a vulnerable application. By this fix, CGI::Cookie.parse no longer decodes cookie names. Note that this is an incompatibility if cookie names that you are using include non-alphanumeric characters that are URL-encoded. This is the same issue of CVE-2020-8184.

Reference: https://www.ruby-lang.org/en/news/2021/11/24/cookie-prefix-spoofing-in-cgi-cookie-parse-cve-2021-41819/

Red Hat

Affected Software

30 affected componentsFixes available
redhat/rh-ruby26-ruby<0:2.6.9-120.el7
0:2.6.9-120.el7
redhat/rh-ruby30-ruby<0:3.0.4-149.el7
0:3.0.4-149.el7
redhat/rh-ruby27-ruby<0:2.7.6-131.el7
0:2.7.6-131.el7
redhat/cgi<0.3.1
0.3.1
redhat/cgi<0.2.1
0.2.1
redhat/cgi<0.1.1
0.1.1
redhat/ruby<3.0.3
3.0.3
redhat/ruby<2.7.5
2.7.5
redhat/ruby<2.6.9
2.6.9
rubygems/cgi<0.1.0.1
0.1.0.1
rubygems/cgi=0.2.0
0.2.1
rubygems/cgi=0.3.0
0.3.1
ruby-lang Cgi Ruby=0.1.0
ruby-lang Cgi Ruby=0.2.0
ruby-lang Cgi Ruby=0.3.0
ruby-lang Ruby<=2.6.8
ruby-lang Ruby>=2.7.0<2.7.5
ruby-lang Ruby>=3.0.0<3.0.3
redhat Software Collections
redhat Enterprise Linux=8.0
Debian Debian Linux=9.0
Debian Debian Linux=10.0
Debian Debian Linux=11.0
SUSE Linux Enterprise=11.0-sp1
SUSE Linux Enterprise=12.0
SUSE Linux Enterprise=15.0
openSUSE Factory
openSUSE Leap=15.2
Fedoraproject Fedora=34
Fedoraproject Fedora=35

Event History

Nov 24, 2021
CVE Published
12:00 AM
Nov 25, 2021
Data Sourced
via Red Hat·06:12 PM
DescriptionSeverityAffected Software
Jan 1, 2022
CVE Published
via MITRE·12:00 AM
Data Sourced
via MITRE·12:00 AM
Description
Jan 21, 2022
Advisory Published
via GitHub·11:22 PM
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is CVE-2021-41819?

CVE-2021-41819 is a vulnerability in Ruby that allows remote attackers to conduct cookie prefix spoofing attacks.

2

How does CVE-2021-41819 affect RubyGems CGI gem?

CVE-2021-41819 affects the CGI gem in RubyGems, specifically the CGI::Cookie.parse function.

3

What is the severity of CVE-2021-41819?

CVE-2021-41819 has a severity rating of high.

4

How can an attacker exploit CVE-2021-41819?

An attacker can exploit CVE-2021-41819 by sending a specially-crafted request to perform cookie prefix spoofing attacks.

5

How can I fix CVE-2021-41819?

To fix CVE-2021-41819, update to the latest version of RubyGems CGI gem that includes the necessary security patches.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203