Pillow: Argument injection in Ghostscript call for EPS files
Summary
Pillow, a Python imaging library, passes the input filename unchecked to Ghostscript when rendering EPS files. A filename starting with a hyphen or @ can be read by Ghostscript as an option or as an argument file. An attacker who controls the filename can inject Ghostscript arguments, and command execution additionally requires a crafted argument file. The risk applies to applications that open EPS files under attacker-chosen names on systems with Ghostscript installed.
Affected
- Pillow 2.6.0 up to and including 12.3.0 (the advisory range); the CNA record states versions below 13.0.0
- Python environments, containers and vendored copies that include these Pillow versions
Fixed in
- Pillow 13.0.0 (fix via os.path.abspath() on the input filename)
- Distribution packages may lag behind; verify the package version of your operating system
Workaround
- Remove Ghostscript where EPS files are not needed
- Do not pass attacker-chosen filenames to Image.open(); use generated names or BytesIO streams
- Restrict accepted image formats so that EPS is not processed
- These are temporary measures only; the root cause is in Pillow
Exploitation
- No confirmed exploitation in the wild known to us.
- CISA SSVC: exploitation none, automatable yes, technical impact total.
- Public proof-of-concept code exists.
Our recommendation
- Inventory all Pillow installations, including containers and bundled copies.
- Upgrade Pillow to 13.0.0 or later; Python 3.10 must be upgraded to 3.11 or newer first.
- Where Pillow is 12.3.0 or older and Ghostscript is present, remove Ghostscript if EPS is not needed and prevent user-controlled filenames.
- Review upload and conversion services that use Pillow and treat them as priority.
Public exploits
Links to third-party sites, not checked by us – exploit code can contain malware. Only use it in isolated test environments.
- Proof of concept on GitHub (3 repositories)
techupdate24/python-pillow-rce-cve-2026-112900 · moprius/CVE-2026-112900-Pillow-PoC · kavin-jindal/CVE-2026-112900-PoC
Research sources
- GitHub Security Advisory GHSA-w889-685w-c8fh github.com
- Pillow 13.0.0 release github.com
- Fix commit a2c3631 github.com
- Pillow 13.0.0 release notes github.com
- OSV entry GHSA-w889-685w-c8fh osv.dev
- GitLab: Pillow CVE find and fix about.gitlab.com
Researched and written up in English and German by an AI (Claude by Anthropic) based on NVD, CISA, EPSS and the sources listed. The vendor information is authoritative. Researched on 31 Oct 2026, 04:14.
Original description (NVD)
Pillow is a Python imaging library. From 2.6.0 until 13.0.0, Pillow is vulnerable to argument injection when invoking Ghostscript for EPS input. EpsImagePlugin.Ghostscript passes a caller-controlled input filename after -f without converting it to a safe absolute path, so a name beginning with a hyphen can be interpreted as a Ghostscript option. An attacker who controls the filename can inject Ghostscript arguments. Arbitrary command execution specifically requires a leading @ argument-file filename and control of the referenced text file containing additional Ghostscript arguments; the reported chain reproduces with the default -dSAFER invocation. This issue is fixed in version 13.0.0.
Sources
The tracker combines official, freely usable data sources – updated continuously:
- NVD (NIST) – CVEs, rating (CVSS), affected products
- CISA KEV – vulnerabilities confirmed by CISA as actively exploited
- CISA Vulnrichment – CISA assessment (SSVC) in the official CVE record
- FIRST EPSS – probability of exploitation
- Microsoft MSRC – Patch Tuesday: vulnerabilities, severity, updates
- PoC-in-GitHub – public proof-of-concept repositories
- Metasploit (Rapid7) – modules of the Metasploit Framework
- Exploit-DB (OffSec) – archive of public exploits (links only)
- Patch days: official vendor pages (linked per vendor) (Vendor patch days)
This product uses data from the NVD API but is not endorsed or certified by the NVD. EPSS data © FIRST.org.
Affected? We can help.
We check whether your systems are affected, install updates and close the gap – continuously with the System Health Checker if you wish.
