# CVE-2023-49090: CarrierWave has a content-type allowlist bypass vulnerability, possibly leading to XSS

- Severity: Medium 6.8 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:N/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.76%, higher than 51% of CVEs (2026-11-30)
- Published: 2023-11-29T14:38:52.195Z
- Modified: 2026-06-17T06:35:20.703Z
- Also known as: GHSA-gxhx-g4fq-49hj
- Weaknesses: CWE-79
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: GitHub_M

## Description

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.

(As written by CVE List.)

## Affected

- carrierwaveuploader carrierwave: >= 2.2.0, < 2.2.5; >= 3.0.0, < 3.0.5
- carrierwave (RubyGems): from 3.0.0 before 3.0.5; before 2.2.5
- carrierwave_project carrierwave: before 2.2.5; from 3.0.0 before 3.0.5

## Every score

- GitHub_M: 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`
- GitHub: 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`
- NVD: 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`

## References

- <https://github.com/carrierwaveuploader/carrierwave/security/advisories/GHSA-gxhx-g4fq-49hj> (vendor-advisory, web)
- <https://github.com/carrierwaveuploader/carrierwave/commit/39b282db5c1303899b3d3381ce8a837840f983b5> (patch, web)
- <https://github.com/carrierwaveuploader/carrierwave/commit/863d425c76eba12c3294227b39018f6b2dccbbf3> (patch, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2023-49090> (advisory)
- <https://github.com/carrierwaveuploader/carrierwave> (package)
- <https://github.com/carrierwaveuploader/carrierwave/blob/master/lib/carrierwave/uploader/content_type_allowlist.rb> (web)
- <https://github.com/rubysec/ruby-advisory-db/blob/master/gems/carrierwave/CVE-2023-49090.yml> (web)
- <https://rubygems.org/gems/carrierwave/versions/2.2.5> (web)
- <https://rubygems.org/gems/carrierwave/versions/3.0.5> (web)

## Sources

- CVE List: [CVE-2023-49090](https://www.cve.org/CVERecord?id=CVE-2023-49090), CVE Terms of Use, modified 2024-10-11
- GitHub Advisory Database: [GHSA-gxhx-g4fq-49hj](https://github.com/advisories/GHSA-gxhx-g4fq-49hj), CC-BY-4.0, modified 2023-11-29
- NVD: [CVE-2023-49090](https://nvd.nist.gov/vuln/detail/CVE-2023-49090), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2023-49090 · Whole record: https://cve.day/CVE-2023-49090.json · Rebuilt by cve.day 2026-11-25T22:58:30.784Z
