Hash: SHA256

             AUSCERT External Security Bulletin Redistribution

                Cookie Prefix Spoofing in CGI::Cookie.parse
                             25 November 2021


        AusCERT Security Bulletin Summary

Product:           Ruby
Publisher:         Ruby
Operating System:  UNIX variants (UNIX, Linux, OSX)
Impact/Access:     Provide Misleading Information -- Remote/Unauthenticated
                   Reduced Security               -- Remote/Unauthenticated
Resolution:        Patch/Upgrade
CVE Names:         CVE-2021-41819 CVE-2020-8184 

Reference:         ESB-2021.2515

Original Bulletin: 

- --------------------------BEGIN INCLUDED TEXT--------------------

CVE-2021-41819: Cookie Prefix Spoofing in CGI::Cookie.parse

Posted by mame on 24 Nov 2021

A cookie prefix spoofing vulnerability was discovered in CGI::Cookie.parse.
This vulnerability has been assigned the CVE identifier CVE-2021-41819 . We
strongly recommend upgrading 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 .

If you are using Ruby 2.7 or 3.0:

  o Please update the cgi gem to version 0.3.1, 0.2,1, and 0.1,1 or later. You
    can use gem update cgi to update it. If you are using bundler, please add
    gem "cgi", ">= 0.3.1" to your Gemfile .
  o Alternatively, please update Ruby to 2.7.5 or 3.0.3.

If you are using Ruby 2.6:

  o Please update Ruby to 2.6.9. You cannot use gem update cgi for Ruby 2.6 or

Affected versions

  o ruby 2.6.8 or prior (You can not use gem update cgi for this version.)
  o cgi gem 0.1.0 or prior (which are bundled versions with Ruby 2.7 series
    prior to Ruby 2.7.5)
  o cgi gem 0.2.0 or prior (which are bundled versions with Ruby 3.0 series
    prior to Ruby 3.0.3)
  o cgi gem 0.3.0 or prior


Thanks to ooooooo_q for discovering this issue.


  o Originally published at 2021-11-24 12:00:00 (UTC)

- --------------------------END INCLUDED TEXT--------------------

You have received this e-mail bulletin as a result of your organisation's
registration with AusCERT. The mailing list you are subscribed to is
maintained within your organisation, so if you do not wish to continue
receiving these bulletins you should contact your local IT manager. If
you do not know who that is, please send an email to auscert@auscert.org.au
and we will forward your request to the appropriate person.

NOTE: Third Party Rights
This security bulletin is provided as a service to AusCERT's members.  As
AusCERT did not write the document quoted above, AusCERT has had no control
over its content. The decision to follow or act on information or advice
contained in this security bulletin is the responsibility of each user or
organisation, and should be considered in accordance with your organisation's
site policies and procedures. AusCERT takes no responsibility for consequences
which may arise from following or acting on information or advice contained in
this security bulletin.

NOTE: This is only the original release of the security bulletin.  It may
not be updated when updates to the original are made.  If downloading at
a later date, it is recommended that the bulletin is retrieved directly
from the author's website to ensure that the information is still current.

Contact information for the authors of the original document is included
in the Security Bulletin above.  If you have any questions or need further
information, please contact them directly.

Previous advisories and external security bulletins can be retrieved from:


Australian Computer Emergency Response Team
The University of Queensland
Qld 4072

Internet Email: auscert@auscert.org.au
Facsimile:      (07) 3365 7031
Telephone:      (07) 3365 4417 (International: +61 7 3365 4417)
                AusCERT personnel answer during Queensland business hours
                which are GMT+10:00 (AEST).
                On call after hours for member emergencies only.
Comment: http://www.auscert.org.au/render.html?it=1967