CVEfocus › CVE database › CVE-2021-21305

CVE-2021-21305Code Injection vulnerability in CarrierWave

CVSS 7.4 HighEPSS 13.2% (higher than 97% of CVEs)Published 2021-02-08Updated 2024-08-03Assigner: GitHub_M

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.

CWE-74

What to do

Likely to be exploited: EPSS gives a 13% chance of exploitation in the next 30 days. Treat it as urgent if you run an affected version.

Fixed builds are available from Debian, RubyGems: see the table below for the fixed version per release.

Ubuntu has not shipped a fix for every release yet.

Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.

curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \
  -H "Content-Type: text/plain" --data-binary @inventory.txt

Vendor status at a glance

2Fixed
4Fix pending

Status by vendor and release

From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.

ReleasePackageStatusFixed versionAdvisory
Ubuntu 20.04ruby-carrierwaveFix pending1.3.1-2ubuntu0.1~esm1 (Ubuntu Pro)UBUNTU-CVE-2021-21305
Ubuntu 18.04ruby-carrierwaveFix pending1.2.2-1ubuntu0.1~esm1 (Ubuntu Pro)UBUNTU-CVE-2021-21305
Ubuntu 16.04ruby-carrierwaveFix pendingUBUNTU-CVE-2021-21305
Ubuntu 14.04ruby-carrierwaveFix pending
Debian 12ruby-carrierwaveFixed1.3.2-1DEBIAN-CVE-2021-21305
RubyGems librarycarrierwaveFixed2.1.1GHSA-cf3w-g86h-35x4

What the vendor says

As published in the CVE record by GitHub_M, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.

References

About this page

Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.