CVE-2021-21288 is a medium-severity (CVSS 4.3) Server-Side Request Forgery (SSRF) vulnerability in carrierwave. A fix is available for carrierwave — see the affected versions and patch details below.
Server-side request forgery in CarrierWave
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
Where this sits among everything scored
Real-World Exposure
carrierwave💎carrierwaveReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects RubyGems packages — download data is not available via public APIs for these ecosystems.
Description
Impact
CarrierWave download feature has an SSRF vulnerability, allowing attacks to provide DNS entries or IP addresses that are intended for internal use and gather information about the Intranet infrastructure of the platform.
Patches
Workarounds
Using proper network segmentation and applying the principle of least privilege to outbound connections from application servers can reduce the severity of SSRF vulnerabilities. Ideally the vulnerable gem should run on an isolated server without access to any internal network resources or cloud metadata access.
References
Server-Side Request Forgery Prevention Cheat Sheet
For more information
If you have any questions or comments about this advisory:
- Open an issue in CarrierWave repo
- Email me at [email protected]
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 💎RubyGems | carrierwave | all versions | 1.3.2bundle update carrierwave --conservative |
| 💎RubyGems | carrierwave | ≥ 2.0.0&&< 2.1.1 | 2.1.1bundle update carrierwave --conservative |
Affected Products
carrierwavecarrierwave_projectDetection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for carrierwave, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update carrierwave to 1.3.2 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2021-21288 is resolved across your whole dependency graph.
Workarounds
Restrict outbound requests from the affected component to an allowlist of hosts, block access to link-local and internal address ranges at the network layer, and require authentication on internal services so a forged request cannot reach them unauthenticated.
Frequently Asked Questions
Is CVE-2021-21288 in your dependencies?
Find it across RubyGems, including transitive dependencies.