CVE-2021-21305 — Code Injection vulnerability in carrierwave — CVE...
Code Injection vulnerability in CarrierWave::RMagick
Summary
Advisory Timeline
- First published February 8, 2021 (2072 days ago).
- Last revised July 8, 2026 — 1975 days after initial publication.
Remediation
Upgrade to the fixed version using your package manager.
gem install carrierwave -v 1.3.2
gem install carrierwave -v 2.1.1
After upgrading, run your dependency scanner again to confirm the vulnerability is resolved.
Affected Packages (2)
Affects 1 ecosystem: rubygems (1).
| Package | Ecosystem | Affected | Fixed In |
|---|---|---|---|
| carrierwave | rubygems | 0.1, 0.10.0, 0.11.0, 0.11.1 (+51 more) | 1.3.2 |
| carrierwave | rubygems | 2.0.0, 2.0.1, 2.0.2, 2.1.0 | 2.1.1 |
Vulnerability Classification
Common Weakness Enumeration (CWE) identifiers for this vulnerability type.
- CWE-74
- CWE-94Code InjectionMITRE
CVSS Score Breakdown
What the CVSS (Common Vulnerability Scoring System) 7.4 score means for each attack dimension.
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:L/A:L
References
- https://github.com/carrierwaveuploader/carrierwave/security/advisories/GHSA-cf3w-g86h-35x4WEB
- https://nvd.nist.gov/vuln/detail/CVE-2021-21305ADVISORY
- https://github.com/carrierwaveuploader/carrierwave/commit/387116f5c72efa42bc3938d946b4c8d2f22181b7WEB
- https://github.com/carrierwaveuploader/carrierwavePACKAGE
- https://github.com/carrierwaveuploader/carrierwave/blob/master/CHANGELOG.md#132---2021-02-08WEB
- https://github.com/carrierwaveuploader/carrierwave/blob/master/CHANGELOG.md#211---2021-02-08WEB
- https://github.com/rubysec/ruby-advisory-db/blob/master/gems/carrierwave/CVE-2021-21305.ymlWEB
- https://rubygems.org/gems/carrierwaveWEB
Frequently Asked Questions
- What is CVE-2021-21305?
- Code Injection vulnerability in CarrierWave::RMagick This vulnerability has been assigned a severity rating of HIGH (CVSS score: 7.4/10).
- How do I check if my project is affected by CVE-2021-21305?
- CVE-2021-21305 affects carrierwave. Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2021-21305 and 200,000+ other known vulnerabilities.
Severity & Exploitability
High exploitability or significant impact. Prioritize remediation within days.
Also Known As
Related CVEs
- CVE-2026-94462HIGH
Spree: Broken Access Control in `PATCH /api/v3/store/carts/:id/associate` (IDOR)
- CVE-2026-77601HIGH
OpenC3 COSMOS: Authenticated OS command injection via the `pypi_url` setting
- CVE-2026-44587MEDIUM
CarrierWave has a denylisted_content_type bypass via Unescaped Regex Metacharacters
- CVE-2023-49090MEDIUM
CarrierWave Content-Type allowlist bypass vulnerability, possibly leading to XSS
- CVE-2024-29034MEDIUM
CarrierWave content-Type allowlist bypass vulnerability which possibly leads to XSS remained
Check if you're affected
Scan your dependencies to see if this vulnerability affects your projects.
Scan Your Dependencies