CVE-2021-21305

Code Injection vulnerability in CarrierWave

HIGH
8.8
CVSS Score
Published: February 8, 2021 at 07:20 PM UTC
Updated: June 17, 2026 at 03:35 AM UTC
2 products affected across 2 vendorsCarrierwaveProject Carrierwave

Using carrierwave by carrierwaveuploader?

Get instant alerts when new vulnerabilities affect carrierwave - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
HIGH8.8
Exploit prediction
EPSS 13%

Description

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.

Affected

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

v < 1.3.22.0.1 ≤ v < 2.1.1
Affected range stops below 1.3.2, so it looks safe — our inference, not a vendor statement
Affected range stops below 2.1.1, so it looks safe — our inference, not a vendor statement
v < 1.3.2v < 2.1.1
Affected range stops below 1.3.2, so it looks safe — our inference, not a vendor statement
Affected range stops below 2.1.1, so it looks safe — our inference, not a vendor statement

Remediation

No guide yet

No remediation guidance has been written for this CVE yet. What the record does show:

CVSS

Attack Vector
NETWORK
Complexity
LOW
Privileges
LOW
User Interaction
NONE
Scope
UNCHANGED
Confidentiality
HIGH
Integrity
HIGH
Availability
HIGH
Vector?

Quick Info

StatusMODIFIED
CWE
CWE-74CWE-94

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card