CVE-2026-44587
CarrierWave has a denylisted_content_type bypass via Unescaped Regex Metacharacters
Also known as GHSA-7g26-2qgj-chfg
Mitigation
- Upgrade carrierwave to one of 3.1.3, 2.2.7 (or later in the same release line).
Who should check
- Projects that depend on RubyGems package carrierwave (>= 3.0.0.beta, < 3.1.3)
- Anyone running carrierwaveuploader carrierwave < 2.2.7; >= 3.0.0.rc, < 3.1.3
Vulnerability facts
- Affected
- carrierwave >= 3.0.0.beta, < 3.1.3
- Fixed in
- 3.1.3, 2.2.7
- Exploited in the wild
- Not in CISA KEV
- Public exploit / PoC
- None known
- Remote exploitation
- Remote, no login needed
- CVSS
- 4.7 (v3.1, CNA)CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:N/A:NOpen in CVSS calculator
Show all 8 CVSS metrics
- Attack vector: Network
- Attack complexity: Low
- Privileges required: None
- User interaction: Required
- Scope: Changed (impact reaches other components)
- Confidentiality impact: Low
- Integrity impact: None
- Availability impact: None
- EPSS
- 0.34% chance of exploitation in 30 days (percentile 20, 2026-11-26)
- CWE
- CWE-625, CWE-184, CWE-79
- Modified
Description
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.
Affected and fixed versions
| Package / product | Affected | Fixed | Source |
|---|---|---|---|
| RubyGems carrierwave | >= 3.0.0.beta, < 3.1.3 | 3.1.3, 2.2.7 | osv |
| carrierwaveuploader carrierwave | < 2.2.7; >= 3.0.0.rc, < 3.1.3 | — | cvelist |
Check your systems with an agent
Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.
Check whether anything I run is affected by CVE-2026-44587. Work read-only: do not install, upgrade, delete or change anything. Details: https://flawdb.com/CVE-2026-44587.md Affected: carrierwave >= 3.0.0.beta, < 3.1.3 Fixed in: 3.1.3, 2.2.7 Steps: 1. Search this machine and project for carrierwave (RubyGems), carrierwaveuploader carrierwave: dependency manifests and lockfiles, installed packages, container images and running services. 2. For each match, note the installed version and whether it is inside the affected range. 3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
References
Vendor advisories
Patches
FAQ
Is CVE-2026-44587 being exploited?
There is no confirmed exploitation: CVE-2026-44587 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.34% chance of exploitation in the next 30 days (as of 2026-11-26).
How serious is CVE-2026-44587?
Medium: CVSS 4.7 (v3.1, scored by CNA). Remote, no login needed. A user has to take an action, such as opening a link, for the attack to work.
Which versions are affected by CVE-2026-44587?
carrierwave >= 3.0.0.beta, < 3.1.3.
Is there a fix for CVE-2026-44587?
Yes. Fixed in 3.1.3, 2.2.7. Upgrade carrierwave to one of 3.1.3, 2.2.7 (or later in the same release line).
How do I check if I'm affected by CVE-2026-44587?
Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.