CVE-2021-33564 Dragonfly contains remote code execution vulnerability

Critical 9.8 Published Updated

Remote attackers can execute arbitrary code or read/write files via argument injection in the Dragonfly gem when URL verification is disabled.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2021-33564?

CVE-2021-33564 is a critical command injection vulnerability in n/a, published on 29 May 2021. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

An argument injection vulnerability in the Dragonfly gem before 1.4.0 for Ruby allows remote attackers to read and write to arbitrary files via a crafted URL when the verify_url option is disabled. This may lead to code execution. The problem occurs because the generate and process features mishandle use of the ImageMagick convert utility.

Weakness: CWE-88

Which versions are affected by CVE-2021-33564?

2 open source packages ship an affected version, including dragonfly. It affects 1 product.

PackageAffectedFixed in
dragonfly RubyGemsAll versions1.4.0
dragonfly RubyGemsAll versions1.4.0

Products include Dragonfly Project Dragonfly.

How do I fix CVE-2021-33564?

Upgrade dragonfly to 1.4.0 or later.

Upgrade, and pass arguments to programs as a list instead of through a shell. More about Command injection.

Is CVE-2021-33564 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2021-33564 exists.

Public exploit code: 1 Nuclei template and 2 proofs of concept on GitHub.

Sources

Also known as GHSA-j858-xp5v-f8xx.

Is CVE-2021-33564 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free