{"id":"CVE-2021-21305","published":"2021-02-08T19:20:14Z","modified":"2024-08-03T18:09:15Z","title":"Code Injection vulnerability in CarrierWave","vendor":"carrierwaveuploader","product":"carrierwave","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":7.4,"severity":"HIGH","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:L/A:L","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.13208,"percentile":0.96466,"provenance":"source"},"cwes":[{"id":"CWE-74","name":"Improper Neutralization of Special Elements in Output Used by a Downstream Component"}],"references":[{"url":"https://github.com/carrierwaveuploader/carrierwave/blob/master/CHANGELOG.md#132---2021-02-08","tags":["x_refsource_MISC"]},{"url":"https://github.com/carrierwaveuploader/carrierwave/blob/master/CHANGELOG.md#211---2021-02-08","tags":["x_refsource_MISC"]},{"url":"https://github.com/carrierwaveuploader/carrierwave/security/advisories/GHSA-cf3w-g86h-35x4","tags":["x_refsource_CONFIRM"]},{"url":"https://rubygems.org/gems/carrierwave","tags":["x_refsource_MISC"]},{"url":"https://github.com/carrierwaveuploader/carrierwave/commit/387116f5c72efa42bc3938d946b4c8d2f22181b7","tags":["x_refsource_MISC"]}],"priority":{"score":24.5,"factors":[{"name":"EPSS percentile","points":19.29},{"name":"CVSS severity","points":5.18}]},"vendorSlug":"carrierwaveuploader","affectedVersions":[{"vendor":"carrierwaveuploader","product":"carrierwave","versions":["< 1.3.2",">= 2.0.0, < 2.1.1"]}],"affected":[{"ecosystem":"RubyGems","package":"carrierwave","vulnerableRanges":["<1.3.2",">=2.0.0, <2.1.1"],"patched":["1.3.2","2.1.1"],"from":["GHSA-cf3w-g86h-35x4"],"provenance":"source"}],"summary":{"text":"CarrierWave, an open-source Ruby gem for file uploads, contains a code injection flaw in its \"#manipulate!\" method, which evaluates the contents of the mutation option (:read/:write) as Ruby code. An attacker who can supply a crafted string to that option, which happens when an application developer passes untrusted input into it, can achieve remote code execution, requiring low privileges and no user interaction over the network.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-21T15:02:26Z"},"euvd":{"id":"EUVD-2021-0545","exploited":false,"provenance":"source"}}