{"api_version":"1","generated_at":"2026-07-13T21:23:55+00:00","cve":"CVE-2021-21305","urls":{"html":"https://cve.report/CVE-2021-21305","api":"https://cve.report/api/cve/CVE-2021-21305.json","docs":"https://cve.report/api","cve_org":"https://www.cve.org/CVERecord?id=CVE-2021-21305","nvd":"https://nvd.nist.gov/vuln/detail/CVE-2021-21305"},"summary":{"title":"CVE-2021-21305","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.","state":"PUBLIC","assigner":"security-advisories@github.com","published_at":"2021-02-08 20:15:00","updated_at":"2022-04-26 15:59:00"},"problem_types":["CWE-94"],"metrics":[],"references":[{"url":"https://rubygems.org/gems/carrierwave","name":"https://rubygems.org/gems/carrierwave","refsource":"MISC","tags":["Product","Third Party Advisory"],"title":"carrierwave | RubyGems.org | your community gem host","mime":"text/html","httpstatus":"200","archivestatus":"200"},{"url":"https://github.com/carrierwaveuploader/carrierwave/blob/master/CHANGELOG.md#211---2021-02-08","name":"https://github.com/carrierwaveuploader/carrierwave/blob/master/CHANGELOG.md#211---2021-02-08","refsource":"MISC","tags":["Release Notes","Third Party Advisory"],"title":"carrierwave/CHANGELOG.md at master · carrierwaveuploader/carrierwave · GitHub","mime":"text/html","httpstatus":"200","archivestatus":"404"},{"url":"https://github.com/carrierwaveuploader/carrierwave/commit/387116f5c72efa42bc3938d946b4c8d2f22181b7","name":"https://github.com/carrierwaveuploader/carrierwave/commit/387116f5c72efa42bc3938d946b4c8d2f22181b7","refsource":"MISC","tags":["Patch","Third Party Advisory"],"title":"Fix Code Injection vulnerability in CarrierWave::RMagick · carrierwaveuploader/carrierwave@387116f · GitHub","mime":"text/html","httpstatus":"200","archivestatus":"200"},{"url":"https://github.com/carrierwaveuploader/carrierwave/security/advisories/GHSA-cf3w-g86h-35x4","name":"https://github.com/carrierwaveuploader/carrierwave/security/advisories/GHSA-cf3w-g86h-35x4","refsource":"CONFIRM","tags":["Exploit","Third Party Advisory"],"title":"Code Injection vulnerability in CarrierWave::RMagick · Advisory · carrierwaveuploader/carrierwave · GitHub","mime":"text/html","httpstatus":"200","archivestatus":"200"},{"url":"https://github.com/carrierwaveuploader/carrierwave/blob/master/CHANGELOG.md#132---2021-02-08","name":"https://github.com/carrierwaveuploader/carrierwave/blob/master/CHANGELOG.md#132---2021-02-08","refsource":"MISC","tags":["Release Notes","Third Party Advisory"],"title":"carrierwave/CHANGELOG.md at master · carrierwaveuploader/carrierwave · GitHub","mime":"text/html","httpstatus":"200","archivestatus":"404"},{"url":"https://www.cve.org/CVERecord?id=CVE-2021-21305","name":"CVE Program record","refsource":"CVE.ORG","tags":["canonical"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-21305","name":"NVD vulnerability detail","refsource":"NVD","tags":["canonical","analysis"]}],"affected":[],"timeline":[],"solutions":[],"workarounds":[],"exploits":[],"credits":[],"nvd_cpes":[{"cve_year":"2021","cve_id":"21305","vulnerable":"1","versionEndIncluding":"","cpe1":"cpe","cpe2":"2.3","cpe3":"a","cpe4":"carrierwave_project","cpe5":"carrierwave","cpe6":"*","cpe7":"*","cpe8":"*","cpe9":"*","cpe10":"*","cpe11":"ruby","cpe12":"*","cpe13":"*"},{"cve_year":"2021","cve_id":"21305","vulnerable":"1","versionEndIncluding":"1","cpe1":"cpe","cpe2":"2.3","cpe3":"a","cpe4":"carrierwave_project","cpe5":"carrierwave","cpe6":"*","cpe7":"*","cpe8":"*","cpe9":"*","cpe10":"*","cpe11":"ruby","cpe12":"*","cpe13":"*"}],"vendor_comments":[],"enrichments":{"kev":null,"epss":null,"legacy_qids":[{"cve":"CVE-2021-21305","qid":"184893","title":"Debian Security Update for ruby-carrierwave (CVE-2021-21305)"},{"cve":"CVE-2021-21305","qid":"690156","title":"Free Berkeley Software Distribution (FreeBSD) Security Update for carrierwave (76a07f31-a860-11eb-8ddb-001b217b3468)"}]},"source_records":{"cve_program":{"CVE_data_meta":{"ASSIGNER":"security-advisories@github.com","ID":"CVE-2021-21305","STATE":"PUBLIC","TITLE":"Code Injection vulnerability in CarrierWave"},"affects":{"vendor":{"vendor_data":[{"product":{"product_data":[{"product_name":"carrierwave","version":{"version_data":[{"version_value":"< 1.3.2"},{"version_value":">= 2.0.0, < 2.1.1"}]}}]},"vendor_name":"carrierwaveuploader"}]}},"data_format":"MITRE","data_type":"CVE","data_version":"4.0","description":{"description_data":[{"lang":"eng","value":"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."}]},"impact":{"cvss":{"attackComplexity":"LOW","attackVector":"NETWORK","availabilityImpact":"LOW","baseScore":7.4,"baseSeverity":"HIGH","confidentialityImpact":"LOW","integrityImpact":"LOW","privilegesRequired":"LOW","scope":"CHANGED","userInteraction":"NONE","vectorString":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:L/A:L","version":"3.1"}},"problemtype":{"problemtype_data":[{"description":[{"lang":"eng","value":"CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection')"}]}]},"references":{"reference_data":[{"name":"https://github.com/carrierwaveuploader/carrierwave/blob/master/CHANGELOG.md#132---2021-02-08","refsource":"MISC","url":"https://github.com/carrierwaveuploader/carrierwave/blob/master/CHANGELOG.md#132---2021-02-08"},{"name":"https://github.com/carrierwaveuploader/carrierwave/blob/master/CHANGELOG.md#211---2021-02-08","refsource":"MISC","url":"https://github.com/carrierwaveuploader/carrierwave/blob/master/CHANGELOG.md#211---2021-02-08"},{"name":"https://github.com/carrierwaveuploader/carrierwave/security/advisories/GHSA-cf3w-g86h-35x4","refsource":"CONFIRM","url":"https://github.com/carrierwaveuploader/carrierwave/security/advisories/GHSA-cf3w-g86h-35x4"},{"name":"https://rubygems.org/gems/carrierwave","refsource":"MISC","url":"https://rubygems.org/gems/carrierwave"},{"name":"https://github.com/carrierwaveuploader/carrierwave/commit/387116f5c72efa42bc3938d946b4c8d2f22181b7","refsource":"MISC","url":"https://github.com/carrierwaveuploader/carrierwave/commit/387116f5c72efa42bc3938d946b4c8d2f22181b7"}]},"source":{"advisory":"GHSA-cf3w-g86h-35x4","discovery":"UNKNOWN"}},"nvd":{"publishedDate":"2021-02-08 20:15:00","lastModifiedDate":"2022-04-26 15:59:00","problem_types":["CWE-94"],"metrics":{"baseMetricV3":{"cvssV3":{"version":"3.1","vectorString":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","attackVector":"NETWORK","attackComplexity":"LOW","privilegesRequired":"LOW","userInteraction":"NONE","scope":"UNCHANGED","confidentialityImpact":"HIGH","integrityImpact":"HIGH","availabilityImpact":"HIGH","baseScore":8.8,"baseSeverity":"HIGH"},"exploitabilityScore":2.8,"impactScore":5.9},"baseMetricV2":{"cvssV2":{"version":"2.0","vectorString":"AV:N/AC:L/Au:N/C:P/I:P/A:P","accessVector":"NETWORK","accessComplexity":"LOW","authentication":"NONE","confidentialityImpact":"PARTIAL","integrityImpact":"PARTIAL","availabilityImpact":"PARTIAL","baseScore":7.5},"severity":"HIGH","exploitabilityScore":10,"impactScore":6.4,"acInsufInfo":false,"obtainAllPrivilege":false,"obtainUserPrivilege":false,"obtainOtherPrivilege":false,"userInteractionRequired":false}},"configurations":{"CVE_data_version":"4.0","nodes":[{"operator":"OR","children":[],"cpe_match":[{"vulnerable":true,"cpe23Uri":"cpe:2.3:a:carrierwave_project:carrierwave:*:*:*:*:*:ruby:*:*","versionStartIncluding":"2.0.1","versionEndExcluding":"2.1.1","cpe_name":[]},{"vulnerable":true,"cpe23Uri":"cpe:2.3:a:carrierwave_project:carrierwave:*:*:*:*:*:ruby:*:*","versionEndExcluding":"1.3.2","cpe_name":[]}]}]}},"legacy_mitre":{"record":{"CveYear":"2021","CveId":"21305","Ordinal":"195431","Title":"CVE-2021-21305","CVE":"CVE-2021-21305","Year":"2021"},"notes":[{"CveYear":"2021","CveId":"21305","Ordinal":"1","NoteData":"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.","Type":"Description","Title":null},{"CveYear":"2021","CveId":"21305","Ordinal":"2","NoteData":"2021-02-08","Type":"Other","Title":"Published"},{"CveYear":"2021","CveId":"21305","Ordinal":"3","NoteData":"2021-02-08","Type":"Other","Title":"Modified"}]}}}