CVE Vulnerabilities

CVE-2021-21305

Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection')

Published: Feb 08, 2021 | Modified: Nov 21, 2024
CVSS 3.x
8.8
HIGH
Source:
NVD
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
CVSS 2.x
7.5 HIGH
AV:N/AC:L/Au:N/C:P/I:P/A:P
RedHat/V2
RedHat/V3
Ubuntu
MEDIUM

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.

Weakness

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.

Affected Software

Name Vendor Start Version End Version
Carrierwave Carrierwave_project * 1.3.2 (excluding)
Carrierwave Carrierwave_project 2.0.1 (including) 2.1.1 (excluding)
Ruby-carrierwave Ubuntu bionic *
Ruby-carrierwave Ubuntu groovy *
Ruby-carrierwave Ubuntu hirsute *
Ruby-carrierwave Ubuntu impish *
Ruby-carrierwave Ubuntu kinetic *
Ruby-carrierwave Ubuntu lunar *
Ruby-carrierwave Ubuntu mantic *
Ruby-carrierwave Ubuntu trusty *
Ruby-carrierwave Ubuntu xenial *

Potential Mitigations

References