CVE-2021-21305
HIGH 8.8CVSS 3.1Code Injection vulnerability in CarrierWave::RMagick
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.
- Published
- 8 Feb 2021
- Last modified
- 8 Jul 2026
- Assigned by
- security-advisories@github.com
- NVD status
- Modified
- Weakness
- CWE-74CWE-94
- Also known as
- GHSA-cf3w-g86h-35x4
- Sources
- NVDJSONOSV GHSA-cf3w-g86h-35x4JSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | nvd@nist.gov (Primary) | CVSS 3.1 | HIGH 8.8 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
| NVD | security-advisories@github.com (Secondary) | CVSS 3.1 | HIGH 7.4 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:L/A:L |
| OSV | GitHub | CVSS 3.1 | HIGH 7.4 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:L/A:L |
| NVD | nvd@nist.gov (Primary) | CVSS 2.0 | HIGH 7.5 | AV:N/AC:L/Au:N/C:P/I:P/A:P |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | carrierwave_project | carrierwavecpe:2.3:a:carrierwave_project:carrierwave:*:*:*:*:*:ruby:*:* |
< 1.3.2 | 1.3.2 |
| NVD | carrierwave_project | carrierwavecpe:2.3:a:carrierwave_project:carrierwave:*:*:*:*:*:ruby:*:* |
>= 2.0.1, < 2.1.1 | 2.1.1 |
| OSV | RubyGems | carrierwave | < 1.3.2 | 1.3.2 |
| OSV | RubyGems | carrierwave | >= 2.0.0, < 2.1.1 | 2.1.1 |
References
- https://github.com/carrierwaveuploader/carrierwave/blob/master/CHANGELOG.md#132---2021-02-08 · Release Notes, Third Party Advisory, WEB
- https://github.com/carrierwaveuploader/carrierwave/blob/master/CHANGELOG.md#211---2021-02-08 · Release Notes, Third Party Advisory, WEB
- https://github.com/carrierwaveuploader/carrierwave/commit/387116f5c72efa42bc3938d946b4c8d2f22181b7 · Patch, Third Party Advisory, WEB
- https://github.com/carrierwaveuploader/carrierwave/security/advisories/GHSA-cf3w-g86h-35x4 · Exploit, Third Party Advisory, WEB
- https://rubygems.org/gems/carrierwave · Product, Third Party Advisory, WEB
- https://nvd.nist.gov/vuln/detail/CVE-2021-21305 · ADVISORY
- https://github.com/carrierwaveuploader/carrierwave · PACKAGE
- https://github.com/rubysec/ruby-advisory-db/blob/master/gems/carrierwave/CVE-2021-21305.yml · WEB
History
- 25 Nov 2026 20:32 UTC · NVD: first stored (published 8 Feb 2021)
- 25 Nov 2026 20:14 UTC · OSV: first stored (published 8 Feb 2021)