VDB

CVE-2021-21305

CVE-2021-21305 PUBLISHED CVSS 7.4 HIGH

Code Injection vulnerability in CarrierWave

Reported by github_m · Published February 8, 2021

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.

Fixed versions

Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.

PackageEcosystemFixed in
ruby-carrierwaveUbuntu:Pro:18.04:LTS1.2.2-1ubuntu0.1~esm1

Risk scores

CVSS 3.1
7.4
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:L/A:L

Affected products

VendorProductVersions
carrierwaveuploadercarrierwave< 1.3.2, >= 2.0.0, < 2.1.1
carrierwaveuploadercarrierwave0, 2.0.0

Timeline

  • Feb 8, 2021 CVE Published
  • Feb 8, 2021 PoC Published (2 in total, the first dated here)
  • Apr 14, 2021 EPSS Score (30 in total, the first dated here)
  • Aug 3, 2024 CVE Updated
  • Mar 7, 2026 Distribution Patch
  • Mar 7, 2026 Security Advisory (2 in total, the first dated here)
  • Aug 26, 2026 Coalition ESS Score

Query this with the API

The same record, from the CLI:

vulnetix vdb vuln CVE-2021-21305
vulnetix vdb fixes CVE-2021-21305

Or with curl, using the org id and key from your account page:

curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
  "https://api.vdb.vulnetix.com/v2/vuln/CVE-2021-21305/fixes/registry"

The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart

References

  • x_refsource_MISC
  • x_refsource_MISC
  • x_refsource_CONFIRM
  • x_refsource_MISC
  • x_refsource_MISC
Look up in the Resolve Platform →
$ Lookup Community · 50/day Open Lookup ›