CVE-2021-21305Code Injection vulnerability in CarrierWave
- 7.4HighCVSS base score
- 13.2%Exploitation in 30 daysEPSS · top 3.5% of all CVEs
- NoKnown exploitednot in CISA's KEV catalog
- NonePublic exploitsnone known yet
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.
Timeline
ID reserved
By GitHub_M
- 48 days later
· 48 days later
Published
- 3 years later
· 3 years later
Record updated
Changes after publication (a new score, a public exploit, EPSS crossing 1, 10 or 50 %, leaving KEV) are kept since November 2026; earlier ones are not known.
Scores
| Scored by | CVSS | Score | Vector |
|---|---|---|---|
| GitHub_MCNA (assigner) | 3.1 | High7.4 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:L/A:L |
| NVDNVD · Modified | 3.1 | High8.8 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
- EPSS (exploitation in 30 days)
- 13.2% · top 3.5% of all CVEs (19 Nov 2026)
The list uses the assigner's score when there is one, then CISA's, then NVD's: High 7.4.
Affected products
carrierwaveuploader · carrierwave
- affected < 1.3.2
- affected >= 2.0.0, < 2.1.1
Affected packages
From reviewed advisories of the GitHub Advisory Database.
- RubyGemscarrierwaveGHSA-cf3w-g86h-35x4 (opens in a new tab)
References
References5
- https://github.com/carrierwaveuploader/carrierwave/blob/master/CHANGELOG.md#132---2021-02-08 (opens in a new tab)x_refsource_MISCx_transferred
- https://github.com/carrierwaveuploader/carrierwave/blob/master/CHANGELOG.md#211---2021-02-08 (opens in a new tab)x_refsource_MISCx_transferred
- https://github.com/carrierwaveuploader/carrierwave/security/advisories/GHSA-cf3w-g86h-35x4 (opens in a new tab)x_refsource_CONFIRMx_transferred
- https://rubygems.org/gems/carrierwave (opens in a new tab)x_refsource_MISCx_transferred
- https://github.com/carrierwaveuploader/carrierwave/commit/387116f5c72efa42bc3938d946b4c8d2f22181b7 (opens in a new tab)x_refsource_MISCx_transferred
Sources
The same CVE in the primary databases and aggregators, to check against.
- CVE.org record (opens in a new tab)
- CVE List JSON (GitHub) (opens in a new tab)
- NVD (opens in a new tab)
- FIRST EPSS (opens in a new tab)
- EUVD EUVD-2021-0545 (opens in a new tab)
- OSV.dev (opens in a new tab)
- GitHub Advisory GHSA-cf3w-g86h-35x4 (opens in a new tab)
- CIRCL Vulnerability-Lookup (opens in a new tab)
Badge for a README or a ticket
[](https://cveledger.app/cve/CVE-2021-21305)Record last updated .