Intel

AIKIDO-2026-10930

carrierwave is vulnerable to Content-Type Denylist Bypass

Content-Type Denylist BypassCVE-2026-44587 Published 2 days ago

47

Medium Risk

This Affects:

RUBYcarrierwave
0.0.1 - 2.2.6
Fixed in 2.2.7
3.0.0 - 3.1.2
Fixed in 3.1.3
Are you affected? Scan for Free

TL;DR

CarrierWave checks content_type_denylist (and the legacy content_type_blacklist alias on older branches) by building a Ruby regex from each string denylist entry without escaping metacharacters. MIME types such as image/svg+xml use + literally, but the unquoted pattern treats + as a quantifier so the denylist never matches and uploads that developers expect to block are accepted. An attacker can upload SVG or other denied types and, when those files are served to browsers, achieve stored cross-site scripting. The patch quotes string entries with Regexp.quote before matching, consistent with the allowlist implementation.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range.

Background info

carrierwave is vulnerable to Content-Type Denylist Bypass in versions 0.0.1 - 2.2.6 and 3.0.0 - 3.1.2.

How to fix this

Upgrade the carrierwave library to the patch version.