CVE-2021-21305
CVE-2021-21305 — Code Injection vulnerability in CarrierWave
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 Updated Sources: cvelistV5, GitHub_M
Triage
Is it exploited, how likely is exploitation, what does it touch, and how severe do the scoring sources call it.
Exploitation
Unreported
no source claims exploitation
EPSS
13%
chance of exploitation in 30 days
CVSS base
7.4
HIGH
Affected scope
The catalog records vendors and products as separate lists, not pairs, so which product belongs to which vendor is not something this page can say.
Vendors (1)
Products (1)
Every base score collected
Sources score independently and disagree; each row says who scored it and under which version.
| Score | Version | Severity | Expl. | Impact | Source |
|---|---|---|---|---|---|
| 7.4 | CVSS 3.1 | HIGH | n/a | n/a | cvelistV5 |
Weakness & attack patterns
- CWE-74
Attack patterns reported against this CVE. The ATT&CK techniques below are inferred from its weakness class.
- T1562.003Impair Defenses: Impair Command History Logging
- T1574.006Hijack Execution Flow: Dynamic Linker Hijacking
- T1574.007Hijack Execution Flow: Path Interception by PATH Environment Variable
Detection
Read off the CVSS vector and the weakness class. Starting points, not rules we have tested.
- Search application, proxy, and WAF logs for requests touching /:write).
References
5 on the record
- github.com/carrierwaveuploader/carrierwave/blob/master/CHANGELOG.md#132---2021-02-08
x_refsource_MISC
- github.com/carrierwaveuploader/carrierwave/blob/master/CHANGELOG.md#211---2021-02-08
x_refsource_MISC
- github.com/carrierwaveuploader/carrierwave/security/advisories/GHSA-cf3w-g86h-35x4
x_refsource_CONFIRM
- rubygems.org/gems/carrierwave
x_refsource_MISC
- github.com/carrierwaveuploader/carrierwave/commit/387116f5c72efa42bc3938d946b4c8d2f22181b7
x_refsource_MISC
Related CVEs
Same product first, then the same weakness or threat actor.
- CVE-2025-20337 Cisco ISE API Unauthenticated Remote Code Execution VulnerabilityCVSS 10.0 · CISA KEV
- CVE-2025-20281 Cisco ISE API Unauthenticated Remote Code Execution VulnerabilityCVSS 10.0 · CISA KEV
- CVE-2023-22527 Atlassian Confluence Data Center and Server Template Injection VulnerabilityCVSS 9.8 · CISA KEV
- CVE-2022-46169 Unauthenticated Command InjectionCVSS 9.8 · CISA KEV
- CVE-2022-35914 Teclib GLPI Remote Code Execution VulnerabilityCVSS 9.8 · CISA KEV
- CVE-2022-26134 Atlassian Confluence Server and Data Center Remote Code Execution VulnerabilityCVSS 9.8 · CISA KEV
Elsewhere on this site
- Carrierwaveuploaderevery CVE for this vendor
- CWE-74other pages naming this weakness
Not in any source we poll
Listed rather than left blank: an empty field and an unmeasured one look identical on screen, and only one is a reason to look elsewhere.
- No confirmed IOCs, IP addresses, domains, file hashes, or malware artifacts supplied.
- No organization-specific asset inventory, compensating-control status, or patch deployment evidence supplied.
- No exploit packet captures, log samples, or incident case IDs supplied.