Vulnerability in carrierwave (CVE-2026-44587)
Summary
Vulnerability in carrierwave (CVE-2026-44587). Risk of unauthorized operations or information disclosure. Exploitable via Regexp.quote. Mitigation: upgrade to 2.2.7 or later.
Original description
The description as published by the source.
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.
Source: GitHub Security Advisories (Global) NVD GitHub Advisory
Auto-generated summary
Assembled by SecPulse from the source data (CVSS, CWE, affected versions) using templates — no AI involved. Check the original description and references below for exact details.
A vulnerability tracked as CVE-2026-44587 has been found in carrierwave.
Attackers can target a specific entry point like Regexp.quote over the network to misuse the product.
Risk of unauthorized operations or information disclosure. CVSS score: 4.7/10.
What to do: upgrade carrierwave to 2.2.7 or later.
If unsure, ask your IT team or search "carrierwave CVE-2026-44587" on the vendor's site.
CVE-2026-44587 (carrierwave) — CWE-116 / CVSS v3 4.7
Attack vector: remote (network-reachable) / unauthenticated
Attack surface: Regexp.quote
Patched: 2.2.7 — apply immediately
Plan: 1) Audit SBOM/dependencies, 2) Stage→prod upgrade, 3) Add WAF/proxy monitoring on affected endpoints, 4) Hunt IOCs in logs.
Refs: see the GHSA / vendor advisory / patched release linked on this page.
A vulnerability (CWE-116) exists in carrierwave. Attackers reach the vulnerable code path via Regexp.quote without authentication.
Check the vendor advisory for the affected versions of carrierwave. Attack surface: Regexp.quote.
Severity: Medium (CVSS 4.7/10). Risk of unauthorized operations or information disclosure.
Update to 2.2.7.
Until the patch is applied: disable the affected feature, apply WAF rules, or restrict access via network ACLs.
Search webserver/proxy logs for unusual request patterns matching this CVE's known IOCs. Run grep -r 'carrierwave' . against your dependency files (package-lock.json, requirements.txt, go.sum) to find affected services.
Response actions
Concrete steps and command examples for SOC/SRE teams to execute in order
-
1Identify exposure identify
grep -r 'carrierwave' . | grep -v node_modulesリポジトリと本番環境の依存ファイル (package-lock.json / requirements.txt / go.sum / Gemfile.lock 等) で
carrierwaveを grep し、稼働しているサービス・バージョンを把握する。 -
2Apply patch patch
Upgrade carrierwave to 2.2.7ステージング環境で 2.2.7 に上げて回帰テスト → 本番反映。回帰テストはアプリの主要ハッピーパスを含めること。
-
3Post-deployment verification verify
Confirm patched version is live in productionパッチ適用後、ステージングで PoC または同等の悪用パターンを再現して脆弱性が閉じたことを確認。本番ではアクセスログ・WAF でアラート再発が無いか継続監視。
Affected packages
Fix status by distribution
Fixed packages published by each distribution for this CVE
- Debian DEBIAN-CVE-2026-44587 ruby-carrierwave
- Ubuntu UBUNTU-CVE-2026-44587 ruby-carrierwave
References
- advisory github.com
- advisory nvd.nist.gov
- advisory github.com
- package github.com
- patch github.com
- patch github.com
- web github.com
- web github.com
- web cve.org