CVE-2023-49090 json
CarrierWave has a content-type allowlist bypass vulnerability, possibly leading to XSS
published 2023-11-29 2 y ago modified 2026-06-17 4 mo ago also GHSA-gxhx-g4fq-49hj , EUVD-2023-2969
- cvss
- 6.8
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 0.6%
- EPSS 0.6% chance of exploitation in 30 days, percentile 49%
- public exploits
- 0
- none known
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.
Patch / fix
- rubygems carrierwave 2.2.5, 3.0.5
- carrierwave_project carrierwave 2.2.5, 3.0.5
- ruby-carrierwave Ubuntu Pro 18.04 LTS 1.2.2-1ubuntu0.1~esm1
- ruby-carrierwave Ubuntu Pro 20.04 LTS 1.3.1-2ubuntu0.1~esm1
- ruby-carrierwave Ubuntu Pro 22.04 LTS 1.3.2-2ubuntu0.22.04.1~esm1
- ruby-carrierwave Ubuntu Pro 24.04 LTS 1.3.2-2ubuntu0.24.04.1~esm1
ubuntu advisories UBUNTU-CVE-2023-49090
Ubuntu security data © Canonical Ltd., from https://github.com/canonical/ubuntu-security-notices via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0
CISA SSVC
- Exploitation
- none
- Automatable
- no
- Technical impact
- partial
- Assessed
- 2 y ago
Exploit prediction
0.61% chance of exploitation in the next 30 days, higher than 49% of all scored CVEs (FIRST EPSS, 2026-11-08).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 3.1 | 6.8 | CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:N/A:N |
| NVD | 3.1 | 6.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N |
| GitHub | 3.1 | 6.8 | CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:N/A:N |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| rubygems | carrierwave | >=3.0.0, <3.0.5 <2.2.5 |
3.0.5 2.2.5 |
Affected products
- carrierwaveuploader carrierwave
Classification
- Weakness
-
- CWE-79 Improper Neutralization of Input During Web Page Generation
References
-
github.com
/carrierwaveuploader/carrierwave/commit/39b282db5c1303899b3d3381ce8a837840f983b5
web, patch
-
github.com
/carrierwaveuploader/carrierwave/commit/863d425c76eba12c3294227b39018f6b2dccbbf3
web, patch
-
github.com
/carrierwaveuploader/carrierwave/security/advisories/GHSA-gxhx-g4fq-49hj
web, vendor-advisory
-
nvd.nist.gov
/vuln/detail/CVE-2023-49090
advisory
-
github.com
/carrierwaveuploader/carrierwave
package
-
github.com
/carrierwaveuploader/carrierwave/blob/master/lib/carrierwave/uploader/content_type_allowlist.rb
web
-
github.com
/rubysec/ruby-advisory-db/blob/master/gems/carrierwave/CVE-2023-49090.yml
web
-
rubygems.org
/gems/carrierwave/versions/2.2.5
web
-
rubygems.org
/gems/carrierwave/versions/3.0.5
web
Sources
- CVE List CVE-2023-49090
- GitHub Advisory GHSA-gxhx-g4fq-49hj
- NVD CVE-2023-49090
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.