Read the docs
TI-2026-32499 Aliases CVE-2026-44587GHSA-7g26-2qgj-chfg

CarrierWave has a denylisted_content_type bypass via Unescaped Regex Metacharacters

Priority MEDIUM 60CWE-184Published · Updated

Key facts

Attack vector
Network
Privileges required
None
User interaction
Required
Attack complexity
Low
Impact type
Cross-site scripting
Confidentiality · integrity · availability
Low · Low · None
Fix status
Fixed

Attack profile from CVSS 3.1 · NVD. Fix status from CNA and GitHub. Impact type from CWE-79.

Summary

CarrierWave is a framework to upload files from Ruby applications. In versions prior to 2.2.7 and 3.1.3, the content_type_denylist check fails to escape regex metacharacters in string entries, causing the denylist to silently not match the content types it is intended to block. In lib/carrierwave/uploader/content_type_denylist.rb:57, denylist entries are interpolated directly into a regex without Regexp.quote or anchoring, so an entry such as image/svg+xml becomes the pattern /image\/svg+xml/, in which + is treated as a quantifier rather than a literal character and therefore never matches the real MIME type image/svg+xml. This is inconsistent with the allowlist implementation, which correctly applies both Regexp.quote and a \A anchor. Other content types containing regex metacharacters, such as application/xhtml+xml, are affected as well. As a result, any application that relies on content_type_denylist to block image/svg+xml, most commonly to prevent stored XSS, is silently unprotected. An attacker can upload an SVG file containing arbitrary JavaScript; if the application serves that SVG inline from its own origin, the script executes in the victim's browser, resulting in stored XSS. This issue has been fixed in versions 2.2.7 and 3.1.3.

Why it matters now

Exploitation Proof of concept CISA SSVC · not in CISA KEV
EPSS 0.00223 13th percentileScored 2026-11-07
Public exploit Yes 1 exploit referenceTagged by NVD
Fix Fixed carrierwave (carrierwaveuploader): 2.2.7, 3.1.3carrierwave (RubyGems): 3.1.3, 2.2.7

SSVC decision points

CISA ADP · SSVC 2.0.3

Exploitation
Poc
Automatable
No
Technical impact
Partial

The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.

Affected products

VendorProductAffected versionsFixed inStatusSource
carrierwaveuploadercarrierwavebefore 2.2.7; 3.0.0.rc to before 3.1.32.2.7, 3.1.3Patch availableCNA
—carrierwave (RubyGems)3.0.0.beta to before 3.1.33.1.3Patch availableGHSA-7g26-2qgj-chfg
—carrierwave (RubyGems)before 2.2.72.2.7Patch availableGHSA-7g26-2qgj-chfg
  • carrierwave Vendorcarrierwaveuploader Affected before 2.2.7; 3.0.0.rc to before 3.1.3 Fixed in 2.2.7, 3.1.3 Patch available CNA
  • carrierwave (RubyGems) Vendor— Affected 3.0.0.beta to before 3.1.3 Fixed in 3.1.3 Patch available GHSA-7g26-2qgj-chfg
  • carrierwave (RubyGems) Vendor— Affected before 2.2.7 Fixed in 2.2.7 Patch available GHSA-7g26-2qgj-chfg

CPE configurations NVD · 1

CPEVersionsRoleVendor
cpe:2.3:a:carrierwave_project:carrierwave:*:*:*:*:*:ruby:*:*before 2.2.7; 3.0.0 to before 3.1.3Vulnerablecarrierwaveuploader
  • cpe:2.3:a:carrierwave_project:carrierwave:*:*:*:*:*:ruby:*:* Versions before 2.2.7; 3.0.0 to before 3.1.3 Vulnerable ·carrierwaveuploader

Remediation

  • Fix · CNA carrierwave (carrierwaveuploader) Fixed in 2.2.7, 3.1.3
  • Fix · GHSA-7g26-2qgj-chfg carrierwave (RubyGems) Fixed in 3.1.3 Advisory →
  • Fix · GHSA-7g26-2qgj-chfg carrierwave (RubyGems) Fixed in 2.2.7 Advisory →

Timeline

  1. 2026-10-02 Threatist record created from CVE-2026-44587
  2. 2026-10-03 Alias added: GHSA-7g26-2qgj-chfg

References

  • TI-2021-04405 Code Injection vulnerability in CarrierWave CVSS 3.1HIGH 8.8
  • TI-2023-26755 CarrierWave has a content-type allowlist bypass vulnerability, possibly leading to XSS CVSS 3.1MEDIUM 6.8
  • TI-2024-19216 CarrierWave's Content-Type allowlist bypass vulnerability which possibly leads to XSS remained CVSS 3.1MEDIUM 6.8
  • TI-2021-04388 Server-side request forgery in CarrierWave CVSS 3.1MEDIUM 4.3

Sources