CarrierWave has a content-type allowlist bypass vulnerability, possibly leading to XSS
Key facts
- Attack vector
- Network
- Privileges required
- Low
- User interaction
- Required
- Attack complexity
- Low
- Impact type
- Cross-site scripting
- Confidentiality · integrity · availability
- High · None · None
- Fix status
- Fixed
Attack profile from CVSS 3.1 · CNA. Fix status from CNA and GitHub. Impact type from CWE-79.
Summary
CarrierWave is a solution for file uploads for Rails, Sinatra and other Ruby web frameworks. CarrierWave has a Content-Type allowlist bypass vulnerability, possibly leading to XSS. The validation in `allowlisted_content_type?` determines Content-Type permissions by performing a partial match. If the `content_type` argument of `allowlisted_content_type?` is passed a value crafted by the attacker, Content-Types not included in the `content_type_allowlist` will be allowed. This issue has been patched in versions 2.2.5 and 3.0.5.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- None
- Automatable
- No
- Technical impact
- Partial
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| carrierwaveuploader | carrierwave | 2.2.0 to before 2.2.5; 3.0.0 to before 3.0.5 | 2.2.5, 3.0.5 | Patch available | CNA |
| — | carrierwave (RubyGems) | 3.0.0 to before 3.0.5 | 3.0.5 | Patch available | GHSA-gxhx-g4fq-49hj |
| — | carrierwave (RubyGems) | before 2.2.5 | 2.2.5 | Patch available | GHSA-gxhx-g4fq-49hj |
- carrierwave Vendorcarrierwaveuploader Affected 2.2.0 to before 2.2.5; 3.0.0 to before 3.0.5 Fixed in 2.2.5, 3.0.5 Patch available CNA
- carrierwave (RubyGems) Vendor— Affected 3.0.0 to before 3.0.5 Fixed in 3.0.5 Patch available GHSA-gxhx-g4fq-49hj
- carrierwave (RubyGems) Vendor— Affected before 2.2.5 Fixed in 2.2.5 Patch available GHSA-gxhx-g4fq-49hj
CPE configurations NVD · 1
| CPE | Versions | Role | Vendor |
|---|---|---|---|
| cpe:2.3:a:carrierwave_project:carrierwave:*:*:*:*:*:ruby:*:* | before 2.2.5; 3.0.0 to before 3.0.5 | Vulnerable | carrierwaveuploader |
- cpe:2.3:a:carrierwave_project:carrierwave:*:*:*:*:*:ruby:*:* Versions before 2.2.5; 3.0.0 to before 3.0.5 Vulnerable ·carrierwaveuploader
Remediation
- Fix · CNA carrierwave (carrierwaveuploader) Fixed in 2.2.5, 3.0.5
- Fix · GHSA-gxhx-g4fq-49hj carrierwave (RubyGems) Fixed in 3.0.5 Advisory →
- Fix · GHSA-gxhx-g4fq-49hj carrierwave (RubyGems) Fixed in 2.2.5 Advisory →
Timeline
- 2026-10-02 Threatist record created from CVE-2023-49090
- 2026-10-03 Alias added: GHSA-gxhx-g4fq-49hj
References
Patch 2
Advisory 2
Other 5
- https://github.com/carrierwaveuploader/carrierwave
- https://github.com/carrierwaveuploader/carrierwave/blob/master/lib/carrierwave/uploader/content_type_allowlist.rb
- https://github.com/rubysec/ruby-advisory-db/blob/master/gems/carrierwave/CVE-2023-49090.yml
- https://rubygems.org/gems/carrierwave/versions/2.2.5
- https://rubygems.org/gems/carrierwave/versions/3.0.5
More carrierwaveuploader Carrierwave vulnerabilities
- TI-2026-32499 CarrierWave has a denylisted_content_type bypass via Unescaped Regex Metacharacters CVSS 3.1MEDIUM 6.1
- TI-2021-04405 Code Injection vulnerability in CarrierWave CVSS 3.1HIGH 8.8
- TI-2024-19216 CarrierWave's Content-Type allowlist bypass vulnerability which possibly leads to XSS remained CVSS 3.1MEDIUM 6.8
- TI-2021-04388 Server-side request forgery in CarrierWave CVSS 3.1MEDIUM 4.3
Sources
- CVE-2023-49090 · CVE Program
- CVE-2023-49090 · NVD
- FIRST EPSS
- GHSA-gxhx-g4fq-49hj · GitHub Advisory Database · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences