CVE-2023-49090: CarrierWave Content-Type allowlist bypass vulnerability, possibly leading to XSS
6.8
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.34822%
CWE
Published
11/29/2023
Updated
11/30/2023
KEV Status
No
Technology
Ruby
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:N/A:N
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
carrierwave | rubygems | >= 3.0.0, < 3.0.5 | 3.0.5 |
carrierwave | rubygems | < 2.2.5 | 2.2.5 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The core vulnerability stems from the regex implementation in content type validation functions. The commit diff shows the critical fix was adding \A regex anchors to enforce start-of-string matching in both allowlist/whitelist variants. The vulnerability description explicitly calls out partial matching in allowlisted_content_type? as the root cause, and the added test cases demonstrate crafted Content-Type bypass scenarios that this function's flawed implementation allowed.