On this page (8 sections)
Ubuntu released USN-9149-1 on 17 November 2026. It covers MiniMagick, a Ruby wrapper for ImageMagick, and references CVE-2019-13574. Ubuntu's summary is that the library could be made to run programs when it receives specially crafted input.
Anyone running Ruby applications on Ubuntu 18.04 LTS that open images based on user-supplied file names or URLs should take a look. Ubuntu's notice is the only source in our research, so details such as a severity score are not available.
What the notice says
Ubuntu reports that MiniMagick handed the file names and URLs given to Image.open directly to Kernel#open. When an application opens an image from an untrusted name or URL, Ubuntu says an attacker could possibly use that to execute arbitrary commands.
Only one release is listed: Ubuntu 18.04 LTS, package ruby-mini-magick. The fix is delivered through Ubuntu Pro's ESM Apps channel rather than the normal archive. The notice says nothing about other releases, so draw no conclusions about them from it.
Why passing input to open is risky
Ruby's Kernel#open is a general-purpose call. Given an ordinary path it reads a file, but certain argument forms make it behave differently, including running a command. That is fine when you choose the argument yourself. It turns into a problem when the string originates from a visitor: a form field, an uploaded file name, or a URL parameter.
This makes exposure depend on your code. A site that only opens images from paths it builds is in a different position from one that lets users supply an image URL for resizing or thumbnails. Ubuntu frames it the same way: the issue matters when the file name or URL is untrusted.
Who is realistically exposed
- Ruby or Rails apps on Ubuntu 18.04 LTS that use the ruby-mini-magick system package.
- Features that open an image based on user input, such as avatar-from-URL, link previews, import tools, thumbnail generators or admin tools that accept a path.
- Background jobs that process file names from uploads or third-party feeds.
- Hosts without Ubuntu Pro enabled, since the fix is listed only under ESM Apps.
How to check if you are affected
Start by confirming the release, then the package and its version. All of these are read-only.
lsb_release -adpkg -l ruby-mini-magick
apt-cache policy ruby-mini-magickMiniMagick may also come in as a Ruby gem through Bundler instead of the system package. Ubuntu's notice addresses the Ubuntu package, so check your application's own dependencies as well. This lists the gem if your bundle includes it.
bundle list | grep -i mini_magickNext, find the call Ubuntu names and trace where its argument comes from. This prints matching lines in Ruby files.
grep -rn "Image.open" --include=*.rb .What to do now
- Identify servers running Ubuntu 18.04 LTS with ruby-mini-magick installed.
- Enable Ubuntu Pro (ESM Apps) on affected machines if it is not active, since Ubuntu lists the fix there.
- Update the package to 4.8.0-2ubuntu0.1~esm1 and confirm with dpkg or apt-cache policy.
- Restart the Ruby app or app server so it loads the patched library.
- Review each Image.open call and make sure no user-controlled name or URL reaches it unchecked.
- If you use MiniMagick as a gem, check which version your bundle resolves and follow the gem's own release notes.
- Look through application and web server logs for odd image URLs or unusual file names sent to image features.
sudo apt update
sudo apt install --only-upgrade ruby-mini-magickHardening beyond the patch
The lasting fix is a habit: never give raw user input to anything that opens files or URLs. Store uploads under names your code generates. If remote images are needed, validate the URL against an allowlist of schemes and hosts, download it in a separate step, and only then hand MiniMagick a local path you control. Run image processing as a low-privilege account so any mistake has limited reach.
A web application firewall can add a layer against suspicious input, though it does not replace updating. What is a WAF? explains what that layer can and cannot do.
Detection and monitoring
Watch image endpoints for sudden errors, unexpected child processes, or parameters that resemble commands rather than paths or URLs. Keep an inventory of hosts on releases past standard support so ESM-only fixes like this one are not overlooked. If you suspect abuse, follow website hacked: what to do.
Outside-in tools help with the wider picture. A Webforta scan of a site you verify can surface exposed services and configuration issues, and monitoring tracks certificate, DNS and header changes. Neither can see which Ruby gems run on your server, so package checks on the host are still required.
What remains unknown
- No CVSS score or severity rating appears in the research.
- The research does not say whether the flaw is exploited.
- The notice covers Ubuntu 18.04 LTS only; it does not state the status of other releases or upstream gem versions.
- Only Ubuntu's notice covers this story so far, so there is no independent confirmation or further technical analysis.
Sources
This article is based on the public sources below. Details can change as vendors and researchers publish more; check the original advisories before acting on version numbers.
