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.
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 14 | ruby-mini-magick | 4.9.2-1.1 | — |
| Debian 13 | ruby-mini-magick | 4.9.2-1.1 | — |
| Debian 12 | ruby-mini-magick | 4.9.2-1.1 | — |
| Debian 10 | ruby-mini-magick | 4.9.2-1+deb10u1 | DSA-4481-1 |
| Debian 9 | ruby-mini-magick | 4.5.1-1+deb9u1 | DSA-4481-1 |
Show 1 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 8 | ruby-mini-magick | 3.8.1-1+deb8u1 | DLA-1948-1 |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 18.04 LTS | ruby-mini-magick | No fix yet | — |
| Ubuntu 16.04 LTS | ruby-mini-magick | No fix yet | — |
Public exploits
Exploit or proof-of-concept code for this vulnerability is publicly available, which lowers the bar for attackers. Treat it as a reason to patch sooner.
GitHub 1 repository
-
masahiro331/CVE-2019-13574 ★ 1 · Jul 16, 2019
Sources: PoC-in-GitHub, Metasploit Framework, Exploit-DB — updated daily. Only links are listed; no exploit code is hosted here.
Affected packages
| Ecosystem | Package | Affected | Fixed | Record |
|---|---|---|---|---|
| RubyGems | mini_magick | < 4.9.4 | 4.9.4 | GHSA-r7j3-vvh2-xrpj |
Advisories 2
- DSA-4481-1 ruby-mini-magick - security update Debian Security (DSA / DLA) · Mar 9, 2026
- DLA-1948-1 ruby-mini-magick - security update Debian Security (DSA / DLA) · Mar 9, 2026
References
- https://github.com/minimagick/minimagick/releases/tag/v4.9.4
- https://github.com/minimagick/minimagick/commit/4cd5081e58810d3394d27a67219e8e4e0445d851
- https://github.com/minimagick/minimagick/compare/d484786...293f9bb
- https://benjamin-bouchet.com/blog/vulnerabilite-dans-la-gem-mini_magick-version-4-9-4/
- DSA-4481 vendor-advisory
- 20190715 [SECURITY] [DSA 4481-1] ruby-mini-magick security update mailing-list
- [debian-lts-announce] 20191007 [SECURITY] [DLA 1948-1] ruby-mini-magick security update mailing-list