Vulnerability · Published Nov 29, 2023 · Assigned by GitHub_M
CVE-2023-49090CarrierWave has a content-type allowlist bypass vulnerability, possibly leading to XSS
Medium 6.8
In plain English
A medium-severity cross-site scripting in carrierwave from carrierwaveuploader. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.6% (higher than 50% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official 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.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian:12 | ruby-carrierwave | no fix listed | DEBIAN-CVE-2023-49090 |
| RubyGems | carrierwave | 3.0.5 | GHSA-gxhx-g4fq-49hj |
| RubyGems | carrierwave | 2.2.5 | GHSA-gxhx-g4fq-49hj |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| carrierwaveuploader | carrierwave | >= 2.2.0, < 2.2.5>= 3.0.0, < 3.0.5 |
Weakness: CWE-79 · Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:N/A:N
References
- https://github.com/carrierwaveuploader/carrierwave/security/advisories/GHSA-gxhx-g4fq-49hj x_refsource_CONFIRM
- https://github.com/carrierwaveuploader/carrierwave/commit/39b282db5c1303899b3d3381ce8a837840f983b5 x_refsource_MISC
- https://github.com/carrierwaveuploader/carrierwave/commit/863d425c76eba12c3294227b39018f6b2dccbbf3 x_refsource_MISC