CVE Catalog

CVE-2023-49090

MediumCVSS 6.8
Published: Updated: Translated: NVD NIST

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 is crafted by an attacker, Content-Types not included in the allowlist will be allowed. This issue has been patched in versions 2.2.5 and 3.0.5.

Risk Assessment

An attacker can upload a file with a dangerous content type, potentially leading to XSS and execution of malicious script in the user's browser. This may result in session or data theft.

Recommendation

Update CarrierWave to version 2.2.5 or 3.0.5 (or later). Ensure content type validation is strict.

Other vulnerabilities in CarrierWave

See all
Original NVD description (English source)

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.

Vulnerability data from NVD (NIST) · CISA KEV · EPSS