Vulnerability Details : CVE-2021-21305
Potential exploit
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.
Vulnerability category: Execute code
Products affected by CVE-2021-21305
- cpe:2.3:a:carrierwave_project:carrierwave:*:*:*:*:*:ruby:*:*
- Carrierwave Project » Carrierwave » For RubyVersions from including (>=) 2.0.1 and before (<) 2.1.1cpe:2.3:a:carrierwave_project:carrierwave:*:*:*:*:*:ruby:*:*
Exploit prediction scoring system (EPSS) score for CVE-2021-21305
3.65%
Probability of exploitation activity in the next 30 days
EPSS Score History
~ 87 %
Percentile, the proportion of vulnerabilities that are scored at or less
CVSS scores for CVE-2021-21305
Base Score | Base Severity | CVSS Vector | Exploitability Score | Impact Score | Score Source | First Seen |
---|---|---|---|---|---|---|
7.5
|
HIGH | AV:N/AC:L/Au:N/C:P/I:P/A:P |
10.0
|
6.4
|
NIST | |
8.8
|
HIGH | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
2.8
|
5.9
|
NIST | |
7.4
|
HIGH | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:L/A:L |
3.1
|
3.7
|
GitHub, Inc. |
CWE ids for CVE-2021-21305
-
The product constructs all or part of a command, data structure, or record using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify how it is parsed or interpreted when it is sent to a downstream component.Assigned by: security-advisories@github.com (Secondary)
-
The product constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment.Assigned by: nvd@nist.gov (Primary)
References for CVE-2021-21305
-
https://rubygems.org/gems/carrierwave
carrierwave | RubyGems.org | your community gem hostProduct;Third Party Advisory
-
https://github.com/carrierwaveuploader/carrierwave/security/advisories/GHSA-cf3w-g86h-35x4
Code Injection vulnerability in CarrierWave::RMagick · Advisory · carrierwaveuploader/carrierwave · GitHubExploit;Third Party Advisory
-
https://github.com/carrierwaveuploader/carrierwave/blob/master/CHANGELOG.md#132---2021-02-08
carrierwave/CHANGELOG.md at master · carrierwaveuploader/carrierwave · GitHubRelease Notes;Third Party Advisory
-
https://github.com/carrierwaveuploader/carrierwave/blob/master/CHANGELOG.md#211---2021-02-08
carrierwave/CHANGELOG.md at master · carrierwaveuploader/carrierwave · GitHubRelease Notes;Third Party Advisory
-
https://github.com/carrierwaveuploader/carrierwave/commit/387116f5c72efa42bc3938d946b4c8d2f22181b7
Fix Code Injection vulnerability in CarrierWave::RMagick · carrierwaveuploader/carrierwave@387116f · GitHubPatch;Third Party Advisory
Jump to