CVE-2023-49090
CarrierWave has a content-type allowlist bypass vulnerability, possibly leading to XSS
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.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- Low
- Privileges needed
- Low
- User interaction
- Required
What an attacker can affect
- Confidentiality
- High
- Integrity
- None
- Availability
- None
Exploit likelihood
What each source reports
CVE List Score used
6.8
CarrierWave has a content-type allowlist bypass vulnerability, possibly leading to XSS
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.
- Record
CVE-2023-49090- CVSS 3.1
- 6.8 Medium
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:N/A:N - Weakness
- CWE-79
- Updated
- 2026-11-02
EUVDEUVD-2023-2969
6.8
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.
- Record
EUVD-2023-2969- CVSS 3.1
- 6.8 Medium
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:N/A:N - Updated
- 2026-11-03
GitHub AdvisoriesGHSA-gxhx-g4fq-49hj
6.8
CarrierWave Content-Type allowlist bypass vulnerability, possibly leading to XSS
Impact
CarrierWave::Uploader::ContentTypeAllowlist 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.
In addition, by setting the Content-Type configured by the attacker at the time of file delivery, it is possible to cause XSS on the user's browser when the uploaded file is opened.
Patches
Workarounds
When validating with allowlisted_content_type? in CarrierWave::Uploader::ContentTypeAllowlist , forward match(\A) the Content-Type set in content_type_allowlist, preventing unintentional permission of text/html;image/png when you want to allow only image/png in content_type_allowlist.
References
- Record
GHSA-gxhx-g4fq-49hj- CVSS 3.1
- 6.8 Medium
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:N/A:N - Weakness
- CWE-79
- Updated
- 2026-11-02
NVD
6.8
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.
- Record
CVE-2023-49090- CVSS 3.1
- 6.8 Medium
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:N/A:N - CVSS 3.1
- 6.1 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N - Weakness
- CWE-79
- Updated
- 2026-11-02
OSV
6.8
CarrierWave has a content-type allowlist bypass vulnerability, possibly leading to XSS
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.
- Record
CVE-2023-49090- CVSS 3.1
- 6.8 Medium
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:N/A:N - Weakness
- CWE-79
- Updated
- 2026-11-02
OSVDEBIAN-CVE-2023-49090
6.1
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.
- Record
DEBIAN-CVE-2023-49090- CVSS 3.1
- 6.1 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N - Updated
- 2026-11-02
OSVGHSA-gxhx-g4fq-49hj
6.8
CarrierWave Content-Type allowlist bypass vulnerability, possibly leading to XSS
Impact
CarrierWave::Uploader::ContentTypeAllowlist 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.
In addition, by setting the Content-Type configured by the attacker at the time of file delivery, it is possible to cause XSS on the user's browser when the uploaded file is opened.
Patches
Workarounds
When validating with allowlisted_content_type? in CarrierWave::Uploader::ContentTypeAllowlist , forward match(\A) the Content-Type set in content_type_allowlist, preventing unintentional permission of text/html;image/png when you want to allow only image/png in content_type_allowlist.
References
- Record
GHSA-gxhx-g4fq-49hj- CVSS 3.1
- 6.8 Medium
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:N/A:N - Weakness
- CWE-79
- Updated
- 2026-11-02
OSVUBUNTU-CVE-2023-49090
6.8
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.
- Record
UBUNTU-CVE-2023-49090- CVSS 3.1
- 6.8 Medium
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:N/A:N - CVSS 3.1
- 6.1 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N - Updated
- 2026-11-02
OSVUSN-7497-1 No score
ruby-carrierwave vulnerabilities
Rikita Ishikawa discovered that CarrierWave did not correctly sanitize certain inputs. An attacker could possibly use this issue to execute arbitrary code. This issue only affected Ubuntu 18.04 LTS and Ubuntu 20.04 LTS. (CVE-2021-21305)
Norihide Saito discovered that CarrierWave did not correctly sanitize certain inputs. An attacker could possibly use this issue to execute a cross-site scripting (XSS) attack. (CVE-2023-49090)
- Record
USN-7497-1- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
carrierwaveRubyGems |
3.0.0 up to 3.0.5 | 3.0.5 |
carrierwaveRubyGems |
before 2.2.5 | 2.2.5 |
ruby-carrierwaveDebian:12 |
All versions, plus listed versions 1.3.2-22.0.2-12.2.2-13.0.7-1 |
None known |
carrierwaveRubyGems |
3.0.0 up to 3.0.5, plus listed versions 3.0.13.0.23.0.33.0.4 |
3.0.5 |
carrierwaveRubyGems |
before 2.2.5, plus listed versions 0.10.10.00.11.00.11.10.11.2 Show 45 moreShow less0.2.00.2.10.2.30.2.40.3.00.3.10.3.20.3.30.3.40.3.50.3.5.10.3.5.20.4.00.4.10.4.100.4.20.4.30.4.40.4.50.4.60.4.70.4.80.4.90.5.00.5.0.beta20.5.10.5.20.5.30.5.40.5.50.5.60.5.70.5.80.6.00.6.10.6.20.7.00.7.10.8.00.9.01.0.01.0.0.beta1.0.0.rc1.1.01.2.0 |
2.2.5 |
ruby-carrierwaveUbuntu:Pro:18.04:LTS |
before 1.2.2-1ubuntu0.1~esm1, plus listed versions 0.10.0+gh-41.1.0-31.2.2-1 |
1.2.2-1ubuntu0.1~esm1 |
ruby-carrierwaveUbuntu:Pro:20.04:LTS |
before 1.3.1-2ubuntu0.1~esm1, plus listed versions 1.3.1-2 |
1.3.1-2ubuntu0.1~esm1 |
ruby-carrierwaveUbuntu:Pro:22.04:LTS |
before 1.3.2-2ubuntu0.22.04.1~esm1, plus listed versions 1.3.2-2 |
1.3.2-2ubuntu0.22.04.1~esm1 |
ruby-carrierwaveUbuntu:Pro:24.04:LTS |
before 1.3.2-2ubuntu0.24.04.1~esm1, plus listed versions 1.3.2-2 |
1.3.2-2ubuntu0.24.04.1~esm1 |
ruby-carrierwaveUbuntu:Pro:18.04:LTS From an advisory covering 2 CVEs |
before 1.2.2-1ubuntu0.1~esm1, plus listed versions 0.10.0+gh-41.1.0-31.2.2-1 |
1.2.2-1ubuntu0.1~esm1 |
ruby-carrierwaveUbuntu:Pro:20.04:LTS From an advisory covering 2 CVEs |
before 1.3.1-2ubuntu0.1~esm1, plus listed versions 1.3.1-2 |
1.3.1-2ubuntu0.1~esm1 |
ruby-carrierwaveUbuntu:Pro:22.04:LTS From an advisory covering 2 CVEs |
before 1.3.2-2ubuntu0.22.04.1~esm1, plus listed versions 1.3.2-2 |
1.3.2-2ubuntu0.22.04.1~esm1 |
ruby-carrierwaveUbuntu:Pro:24.04:LTS From an advisory covering 2 CVEs |
before 1.3.2-2ubuntu0.24.04.1~esm1, plus listed versions 1.3.2-2 |
1.3.2-2ubuntu0.24.04.1~esm1 |
History
| Recorded | Changed | Sources |
|---|---|---|
| affected, facts | ||
| aliases, published | EUVD | |
| first indexed | CVE List, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2023-49090 is a medium vulnerability (CVSS 6.8) in Carrierwave Project Carrierwave, published November 29, 2023. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.61%, the 49th percentile. Fixed in carrierwave 3.0.5.
References
github.com/carrierwaveuploader/carrierwave/security/advisories/GHSA-gxhx-g4fq-49hj
github.com/carrierwaveuploader/carrierwave/commit/39b282db5c1303899b3d3381ce8a837840f983b5
github.com/carrierwaveuploader/carrierwave/commit/863d425c76eba12c3294227b39018f6b2dccbbf3
nvd.nist.gov/vuln/detail/CVE-2023-49090
github.com/carrierwaveuploader/carrierwave/blob/master/lib/carrierwave/uploader/content_type_allowlist.rb
rubygems.org/gems/carrierwave/versions/2.2.5
Show 10 moreShow less
rubygems.org/gems/carrierwave/versions/3.0.5
github.com/rubysec/ruby-advisory-db/blob/master/gems/carrierwave/CVE-2023-49090.yml
github.com/advisories/GHSA-gxhx-g4fq-49hj
github.com/CVEProject/cvelistV5/tree/main/cves/2023/49xxx/CVE-2023-49090.json
security-tracker.debian.org/tracker/CVE-2023-49090
github.com/carrierwaveuploader/carrierwave
ubuntu.com/security/CVE-2023-49090
cve.org/CVERecord?id=CVE-2023-49090
ubuntu.com/security/notices/USN-7497-1
ubuntu.com/security/CVE-2021-21305
Left out here: 19 versions. The JSON record has them.