CVEfocus › CVE database › CVE-2026-44587

CVE-2026-44587CarrierWave has a denylisted_content_type bypass via Unescaped Regex Metacharacters

CVSS 4.7 MediumEPSS 0.2% (higher than 13% of CVEs)Published 2026-06-16Updated 2026-06-17Assigner: GitHub_M

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.

CWE-184CWE-625CWE-79

What to do

Fixed builds are available from RubyGems: see the table below for the fixed version per release.

Debian, Ubuntu have not shipped a fix for every release yet.

Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.

curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \
  -H "Content-Type: text/plain" --data-binary @inventory.txt

Vendor status at a glance

1Fixed
6Fix pending

Status by vendor and release

From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.

ReleasePackageStatusFixed versionAdvisory
Ubuntu 24.04ruby-carrierwaveFix pendingUBUNTU-CVE-2026-44587
Ubuntu 22.04ruby-carrierwaveFix pendingUBUNTU-CVE-2026-44587
Ubuntu 20.04ruby-carrierwaveFix pendingUBUNTU-CVE-2026-44587
Ubuntu 18.04ruby-carrierwaveFix pendingUBUNTU-CVE-2026-44587
Ubuntu 16.04ruby-carrierwaveFix pendingUBUNTU-CVE-2026-44587
Debian 12ruby-carrierwaveFix pendingDEBIAN-CVE-2026-44587
RubyGems librarycarrierwaveFixed2.2.7GHSA-7g26-2qgj-chfg

What the vendor says

As published in the CVE record by GitHub_M, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.

References

About this page

Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.