CVE-2019-13574 OS Command Injection in MiniMagick
Attackers can execute arbitrary commands by providing a malicious filename to the MiniMagick library's image opening function.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Local or same network only
- Victim action needed
- A user has to click or open something
- Fix
- Available
What is CVE-2019-13574?
CVE-2019-13574 is a high-severity command injection vulnerability in Debian Debian Linux, published on 12 Jul 2019. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.
Official description
In lib/mini_magick/image.rb in MiniMagick before 4.9.4, a fetched remote image filename could cause remote command execution because Image.open input is directly passed to Kernel#open, which accepts a '|' character followed by a command.
Weakness: CWE-78
Which versions are affected by CVE-2019-13574?
2 open source packages ship an affected version, including mini_magick. It affects 2 products.
| Package | Affected | Fixed in |
|---|---|---|
mini_magick RubyGems | All versions | 4.9.4 |
mini_magick RubyGems | All versions | 4.9.4 |
Products include Debian Debian Linux, Minimagick Project Minimagick.
How do I fix CVE-2019-13574?
Upgrade mini_magick to 4.9.4 or later.
Upgrade, and pass arguments to programs as a list instead of through a shell. More about Command injection.
Is CVE-2019-13574 being exploited?
There is no known exploitation of CVE-2019-13574 in the wild and no public exploit code.
Public exploit code: 1 proofs of concept on GitHub.
Other vulnerabilities in Debian Debian Linux
Sources
Also known as DEBIAN-CVE-2019-13574, DLA-1948-1, DSA-4481-1, GHSA-r7j3-vvh2-xrpj, OESA-2021-1150, UBUNTU-CVE-2019-13574.