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 June 9, 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/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. Learn more about Dependency Scanning →

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

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 Tue, 23 Jun 2026 12:22:43 +0000.