# CVE-2021-21305: ruby-carrierwave: CarrierWave is an open-source RubyGem which provides a simple and flexible way to upload files from Ruby applications

CVE-2021-21305 is fixed in ruby-carrierwave on 1 platform, first by ruby-carrierwave 1.2.2-1ubuntu0.1~esm1, released November 29, 2023. It is not reported as exploited. Patch Radar priority: Routine.

- Web page: https://patchblox.com/security/cve/CVE-2021-21305
- Priority: Routine
- CVSS: n/a (Medium)
- EPSS: 0.1321
- CISA KEV: not listed
- Exploited (vendor report): no
- Publicly disclosed: no
- Published: Feb 8, 2021

## 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.

## Where it's fixed

| Platform | Product | Fixed in | Fix | Released |
|---|---|---|---|---|
| Linux | ruby-carrierwave Ubuntu 18.04.6 LTS (bionic) | 1.2.2-1ubuntu0.1~esm1 | [ruby-carrierwave 1.2.2-1ubuntu0.1~esm1](https://patchblox.com/security/data/fix/linux/ubuntu-bionic-ruby-carrierwave-1.2.2-1ubuntu0.1-esm1.md) | Nov 29, 2023 |
| Linux | ruby-carrierwave Ubuntu 20.04 LTS (focal) | 1.3.1-2ubuntu0.1~esm1 | [ruby-carrierwave 1.3.1-2ubuntu0.1~esm1](https://patchblox.com/security/data/fix/linux/ubuntu-focal-ruby-carrierwave-1.3.1-2ubuntu0.1-esm1.md) | Nov 29, 2023 |

---

Data as of 2026-11-09T19:38:12Z UTC. Source: Patchblox Patch Radar (https://patchblox.com/security/patch-radar). Patchblox finds out-of-date software on Windows, macOS and Linux and updates it through release rings: https://patchblox.com/demo

Free to use with attribution: show "Data: Patchblox Patch Radar" with a link to https://patchblox.com/security/patch-radar. Terms, including what needs a written agreement: https://patchblox.com/security/patch-radar/use-the-data

Product names, logos and trademarks shown on Patch Radar belong to their respective owners. They are used only to identify the software each security fix applies to and to help readers find their platform. Their use does not imply any affiliation with, or endorsement by, those owners, and Patchblox is not affiliated with any of them.
