{"id":"CVE-2021-21305","details":"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.","aliases":["GHSA-cf3w-g86h-35x4"],"modified":"2026-04-10T04:29:35.953469Z","published":"2021-02-08T20:15:12.527Z","related":["GHSA-cf3w-g86h-35x4"],"references":[{"type":"ADVISORY","url":"https://github.com/carrierwaveuploader/carrierwave/blob/master/CHANGELOG.md#132---2021-02-08"},{"type":"ADVISORY","url":"https://github.com/carrierwaveuploader/carrierwave/blob/master/CHANGELOG.md#211---2021-02-08"},{"type":"ADVISORY","url":"https://rubygems.org/gems/carrierwave"},{"type":"FIX","url":"https://github.com/carrierwaveuploader/carrierwave/commit/387116f5c72efa42bc3938d946b4c8d2f22181b7"},{"type":"EVIDENCE","url":"https://github.com/carrierwaveuploader/carrierwave/security/advisories/GHSA-cf3w-g86h-35x4"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://github.com/carrierwaveuploader/carrierwave","events":[{"introduced":"0"},{"fixed":"56f39b23d16431a79faf8e361d4ee08238db2f66"},{"introduced":"e1c3eea981ad3963bf5bf5af586286abd1252caa"},{"fixed":"003e2ceeaa856f2605cf8096b401e76168ffc8ba"},{"fixed":"387116f5c72efa42bc3938d946b4c8d2f22181b7"}],"database_specific":{"versions":[{"introduced":"0"},{"fixed":"1.3.2"},{"introduced":"2.0.1"},{"fixed":"2.1.1"}]}}],"versions":["v0.1.0","v0.3.2","v0.3.3","v0.3.4","v0.3.5","v0.4.2","v0.4.3","v0.4.5","v0.5.0","v0.5.0.beta2","v0.5.1","v0.5.3","v0.5.5","v0.5.6","v0.5.8","v0.6.0","v0.6.1","v0.6.2","v0.7.0","v0.7.1","v0.8.0","v1.0.0","v1.0.0.beta","v1.0.0.rc","v1.1.0","v1.2.0","v1.2.1","v1.2.2","v1.2.3","v1.3.0","v1.3.1","v2.0.1","v2.0.2","v2.1.0"],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2021-21305.json"}}],"schema_version":"1.7.5","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"}]}