{"cve":"CVE-2021-21305","nvd":{"published":"2021-02-08T20:15:12.527","modified":"2026-06-17T03:35:15.433","status":"Modified","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.","cvss_v4":null,"cvss_v3":{"version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":8.8},"cwes":["CWE-94","CWE-74"],"references":["https://github.com/carrierwaveuploader/carrierwave/blob/master/CHANGELOG.md#132---2021-02-08","https://github.com/carrierwaveuploader/carrierwave/blob/master/CHANGELOG.md#211---2021-02-08","https://github.com/carrierwaveuploader/carrierwave/commit/387116f5c72efa42bc3938d946b4c8d2f22181b7","https://github.com/carrierwaveuploader/carrierwave/security/advisories/GHSA-cf3w-g86h-35x4","https://rubygems.org/gems/carrierwave"],"products":["carrierwave_project:carrierwave"],"source":"nvd","synced_at":"2026-10-19T21:14:10.479542811+00:00"},"epss":{"cve":"CVE-2021-21305","score":0.12678,"percentile":0.96258,"date":"2026-11-01"},"kev":null,"osv":[{"id":"GHSA-cf3w-g86h-35x4","url":"https://osv.dev/vulnerability/GHSA-cf3w-g86h-35x4","summary":"Code Injection vulnerability in CarrierWave::RMagick","modified":"2026-07-08T06:28:16.049382966Z","packages":[{"ecosystem":"RubyGems","name":"carrierwave","purl":"pkg:gem/carrierwave","ranges":["<1.3.2"],"fixed":["1.3.2"]},{"ecosystem":"RubyGems","name":"carrierwave","purl":"pkg:gem/carrierwave","ranges":[">=2.0.0 <2.1.1"],"fixed":["2.1.1"]}]}],"attribution":["This product uses the NVD API but is not endorsed or certified by the NVD.","EPSS scores: FIRST Exploit Prediction Scoring System, https://www.first.org/epss","Known exploited vulnerabilities: CISA Known Exploited Vulnerabilities Catalog, https://www.cisa.gov/known-exploited-vulnerabilities-catalog","Package advisories: OSV (https://osv.dev), from the GitHub Advisory Database, PyPA, Go, RustSec and other ecosystem databases, under CC-BY 4.0 or CC0","CVE records: the CVE Program's CVE List (https://www.cve.org), under its terms of use (https://www.cve.org/Legal/TermsOfUse). CVE is a registered trademark of The MITRE Corporation; this product is not affiliated with the CVE Program."]}