CVE-2021-41819: Cookie Prefix Spoofing in CGI::Cookie.parse
7.5
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.7046%
CWE
Published
1/21/2022
Updated
1/24/2024
KEV Status
No
Technology
Ruby
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
cgi | rubygems | = 0.3.0 | 0.3.1 |
cgi | rubygems | = 0.2.0 | 0.2.1 |
cgi | rubygems | < 0.1.0.1 | 0.1.0.1 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems directly from CGI::Cookie.parse
's handling of cookie names. The function was decoding cookie names before processing()
, which allowed manipulation of security prefixes through URL encoding. This matches the CWE-565 pattern of insufficient cookie validation
. Multiple sources including Ruby's security advisory explicitly identify CGI::Cookie.parse
as the vulnerable component. The patch corrected this by removing URL decoding from cookie name processing()
.