Advisory Database
  • Advisories
  • Dependency Scanning
  1. gem
  2. ›
  3. carrierwave
  4. ›
  5. CVE-2026-44587

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

May 27, 2026 (updated July 8, 2026)

CarrierWave’s 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.

Note: CarrierWave is aware #content_type_denylist is deprecated for the security reason, but it still used by developers, and the problem here isn’t denylist allows any filetype, and thats not a vulnerability in carrierwave, its an implementation problem in developers using CarrierWave, the problem is its denylist entries are interpolated directly into a regex without Regexp.quote or anchoring. The denylist is still useful when developers want to ban specific content types but allow everything else.

References

  • github.com/advisories/GHSA-7g26-2qgj-chfg
  • github.com/carrierwaveuploader/carrierwave/commit/21221cc6e260633f7da78c6133a88666a5529d27
  • github.com/carrierwaveuploader/carrierwave/commit/4c4a005775a436c5165df014dc9b1874c227d86c
  • github.com/carrierwaveuploader/carrierwave/security/advisories/GHSA-7g26-2qgj-chfg
  • github.com/rubysec/ruby-advisory-db/blob/master/gems/carrierwave/CVE-2026-44587.yml
  • nvd.nist.gov/vuln/detail/CVE-2026-44587
  • www.cve.org/CVERecord?id=CVE-2026-44587

Code Behaviors & Features

Detect and mitigate CVE-2026-44587 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Dependency Scanning using SBOM also detects vulnerabilities from proprietary advisories that this site does not include. Learn more about Dependency Scanning using SBOM →

Affected versions

All versions before 2.2.7, all versions starting from 3.0.0-beta before 3.1.3

Fixed versions

  • 2.2.7
  • 3.1.3

Solution

Upgrade to versions 2.2.7, 3.1.3 or above.

Impact 4.7 MEDIUM

CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:N/A:N

Learn more about CVSS

Weakness

  • CWE-116: Improper Encoding or Escaping of Output
  • CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')

Source file

gem/carrierwave/CVE-2026-44587.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sun, 08 Nov 2026 00:15:44 +0000.