Read the docs
TI-2021-04405 Aliases CVE-2021-21305GHSA-cf3w-g86h-35x4

Code Injection vulnerability in CarrierWave

Priority MEDIUM 53CWE-74Published · Updated

Key facts

Attack vector
Network
Privileges required
Low
User interaction
None
Attack complexity
Low
Impact type
Code execution
Confidentiality · integrity · availability
High · High · High
Fix status
Fixed

Attack profile from CVSS 3.1 · NVD. Fix status from CNA and GitHub. Impact type from CWE-94.

Summary

CarrierWave is an open-source RubyGem which provides a simple and flexible way to upload files from Ruby applications. In CarrierWave before versions 1.3.2 and 2.1.1, there is a code injection vulnerability. The "#manipulate!" method inappropriately evals the content of mutation option(:read/:write), allowing attackers to craft a string that can be executed as a Ruby code. If an application developer supplies untrusted inputs to the option, it will lead to remote code execution(RCE). This is fixed in versions 1.3.2 and 2.1.1.

Why it matters now

EPSS 0.13208 96th percentileScored 2026-11-07
Public exploit Yes 1 exploit referenceTagged by NVD
Fix Fixed carrierwave (carrierwaveuploader): 1.3.2, 2.1.1carrierwave (RubyGems): 1.3.2, 2.1.1

SSVC decision points

Not available: CISA has not published SSVC decision points for this record.

Affected products

VendorProductAffected versionsFixed inStatusSource
carrierwaveuploadercarrierwavebefore 1.3.2; 2.0.0 to before 2.1.11.3.2, 2.1.1Patch availableCNA
—carrierwave (RubyGems)before 1.3.21.3.2Patch availableGHSA-cf3w-g86h-35x4
—carrierwave (RubyGems)2.0.0 to before 2.1.12.1.1Patch availableGHSA-cf3w-g86h-35x4
  • carrierwave Vendorcarrierwaveuploader Affected before 1.3.2; 2.0.0 to before 2.1.1 Fixed in 1.3.2, 2.1.1 Patch available CNA
  • carrierwave (RubyGems) Vendor— Affected before 1.3.2 Fixed in 1.3.2 Patch available GHSA-cf3w-g86h-35x4
  • carrierwave (RubyGems) Vendor— Affected 2.0.0 to before 2.1.1 Fixed in 2.1.1 Patch available GHSA-cf3w-g86h-35x4

CPE configurations NVD · 1

CPEVersionsRoleVendor
cpe:2.3:a:carrierwave_project:carrierwave:*:*:*:*:*:ruby:*:*before 1.3.2; 2.0.1 to before 2.1.1Vulnerablecarrierwaveuploader
  • cpe:2.3:a:carrierwave_project:carrierwave:*:*:*:*:*:ruby:*:* Versions before 1.3.2; 2.0.1 to before 2.1.1 Vulnerable ·carrierwaveuploader

Remediation

  • Fix · CNA carrierwave (carrierwaveuploader) Fixed in 1.3.2, 2.1.1
  • Fix · GHSA-cf3w-g86h-35x4 carrierwave (RubyGems) Fixed in 1.3.2 Advisory →
  • Fix · GHSA-cf3w-g86h-35x4 carrierwave (RubyGems) Fixed in 2.1.1 Advisory →

Timeline

  1. 2026-10-02 Threatist record created from CVE-2021-21305
  2. 2026-10-03 Alias added: GHSA-cf3w-g86h-35x4

References

  • TI-2026-32499 CarrierWave has a denylisted_content_type bypass via Unescaped Regex Metacharacters CVSS 3.1MEDIUM 6.1
  • TI-2023-26755 CarrierWave has a content-type allowlist bypass vulnerability, possibly leading to XSS CVSS 3.1MEDIUM 6.8
  • TI-2024-19216 CarrierWave's Content-Type allowlist bypass vulnerability which possibly leads to XSS remained CVSS 3.1MEDIUM 6.8
  • TI-2021-04388 Server-side request forgery in CarrierWave CVSS 3.1MEDIUM 4.3

Sources