Pillow EPS handling lets a crafted filename reach Ghostscript options

A reported flaw in Pillow's EPS plugin passes a caller-controlled filename to Ghostscript without making it a safe absolute path, so a name starting with a hyphen can be read as an option.

Past-week coverage · Original source published .

Pillow, the widely used Python imaging library, has a reported argument injection flaw in how it handles EPS images, according to The Hacker News. The library opens EPS files by handing the filename to Ghostscript, a separate program that renders the image, without checking the name first.

The advisory text says EpsImagePlugin.Ghostscript passes a caller-controlled filename after -f without converting it to a safe absolute path. A name beginning with a hyphen can therefore be interpreted as a Ghostscript option. The advisory adds that arbitrary command execution specifically requires a leading @ argument-file filename plus control of the referenced text file holding further Ghostscript arguments, and that the reported chain reproduces with the default -dSAFER invocation.

The affected range is given as 2.6.0 until 13.0.0, and the project says the issue is fixed in 13.0.0. The GitHub-assigned CVSS 4.0 base score is 9.2, rated critical.

For defenders, the practical question is whether untrusted users can influence filenames that reach EPS processing. Upgrading to the fixed release is the direct step the advisory supports; where that isn't possible yet, treat EPS input from untrusted sources as risky and review how filenames are generated before they reach the library.

CVE references

CVE-2026-112900

Sources

  1. Critical Flaw in Python’s Popular Pillow Image Library Allows Code Execution via a Crafted ImagePrimarythehackernews.com

If something here is wrong, tell us. Every correction is listed on the corrections page.

Don’t Just Read About Cyberattacks. Learn How They Work.

Go beyond the headlines. Explore hands-on cybersecurity labs, understand real-world vulnerabilities, and build practical security skills with HackZoneLabs.

Start Learning