Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessUpload/supply EPS file with crafted name
-
DeliveryName begins with @ argument-file token
-
ExploitPillow passes it unmodified after -f
-
ExecutionGhostscript parses it as argument file
-
PersistInjected Ghostscript args execute
-
ImpactArbitrary command execution on host
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization OS command sanitization, avoid shell exec
MITRE ATT&CK
2 techniques across 1 tactic: Execution The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Requires the host application to pass an attacker-controlled filename into Pillow's EPS code path (EpsImagePlugin.Ghostscript) with Ghostscript installed. Argument injection requires only a filename beginning with '-' (interpreted as a Ghostscript option). Escalation to arbitrary command execution specifically requires a filename beginning with '@' (a Ghostscript argument-file token) AND attacker control of the contents of that referenced text file; the reported chain works even with the default -dSAFER invocation. Limiting factors: the application must not sanitize or re-root the filename before handing it to Pillow, Ghostscript must be present, and full RCE needs the secondary attacker-controlled argument file - plain argument injection is easier but the command-execution outcome is gated by these preconditions. Not exploitable in versions >=13.0.0 (filename is made absolute). |
| Impact | This is a genuine high-priority issue for applications that feed untrusted filenames into Pillow's EPS handling, but its real-world risk is more nuanced than the 9.2 CVSS 4.0 score suggests. The CVSS 4.0 vector (AV:N/AC:L/AT:P/PR:N/UI:N, VC:H/VI:H/VA:H) models network reach, no privileges, and no user interaction, but the AT:P (Attack Requirements: Present) flag is doing heavy lifting - it reflects that full command execution is NOT a simple one-shot: per the description, arbitrary command execution additionally requires a leading @ argument-file filename AND attacker control of the referenced text file's contents. Mere argument injection (hyphen-leading filename) is easy; weaponized RCE is conditional. No EPSS score was provided, so exploitation probability cannot be quantified. The vulnerability is NOT in CISA KEV and no POC flag was supplied, so there is no evidence of active exploitation; however, the upstream advisory and commit include a regression test demonstrating the argument-injection primitive, indicating the mechanism is well-understood and reproducible. Net: a real, fixable defect warranting prompt patching where Pillow processes attacker-influenced EPS filenames, but not a drop-everything internet-wide worm candidate given the AT:P preconditions and absence of KEV/EPSS signals. |
| Exploit ScenarioDerived | A web application lets users upload images and passes the uploaded file's attacker-controlled name directly to Pillow to open EPS input; Ghostscript is installed on the server. The attacker supplies a filename beginning with '@' that points to a text file they also control (e.g. another uploaded file), whose contents are injected as additional Ghostscript arguments, achieving command execution even under the default -dSAFER invocation. No public weaponized exploit was identified at time of analysis, though the vendor advisory documents a reproducing chain. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Oct 19, 2026
Argument injection in Pillow's EPS decoding path (EpsImagePlugin.Ghostscript) lets a caller-controlled input filename be parsed as a Ghostscript option, and in the worst case escalates to arbitrary command execution. All Pillow releases from 2.6.0 up to but not including 13.0.0 are affected when Ghostscript is installed and the host application passes an unsanitized, attacker-influenced filename into Image.open() for EPS input; no authentication is required per the CVSS vector (PR:N), though exploitation depends on that application-level precondition. Making the path absolute before it is placed after Ghostscript's -f flag closes the issue, and the vendor shipped that change in 13.0.0 (commit a2c3631); no public exploit code or confirmed active exploitation was identified at time of analysis.
RemediationAI
Vendor-released patch: Pillow 13.0.0, which makes the EPS input path absolute (os.path.abspath) before it is passed to Ghostscript after -f; upgrade with 'pip install --upgrade Pillow>=13.0.0' and confirm the resolved version, since distro packages and pinned requirements frequently lag. If upgrading is blocked, add a pre-flight guard in the calling code: call os.path.realpath()/os.path.abspath() on any untrusted filename before opening it with Pillow, and reject or rename any basename starting with '-' or '@'. The cleanest compensating control is to copy untrusted uploads into a temporary directory under a server-generated name (for example a UUID plus a fixed extension) and open only that path, which removes the attacker's control over the leading character entirely at the cost of one extra file copy and temporary disk usage. Where EPS input is not a business requirement, deregister the plugin (PIL.EpsImagePlugin, and remove 'eps'/'ps' from the registered extensions) so Image.open() refuses EPS files outright, trading away EPS support for the attack surface. Removing or restricting Ghostscript from the application's PATH also breaks the chain but will cause EPS and PostScript loads to fail with an IOError, so audit callers first. Do not rely on -dSAFER as a mitigation: the reported exploit chain reproduces under the default safe invocation, and Ghostscript option processing happens before the sandbox takes effect. Note that plain argument injection only needs a filename starting with '-', while command execution additionally needs an '@' argument file whose contents the attacker controls, so review logging for EPS filenames beginning with '-' or '@' as a hunting signal. Advisory: https://github.com/python-pillow/Pillow/security/advisories/GHSA-w889-685w-c8fh.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in pypi
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
Pillow's EPS support shells out to Ghostscript: EpsImagePlugin.Ghostscript() builds a subprocess command line ending in '-f' followed by fp.name, the raw filename string supplied by the caller. Because the value was passed through unchanged, a filename beginning with '-' was consumed by Ghostscript's own argument parser as an option rather than as a file operand, and a filename beginning with '@' was treated as an argument-file token, causing Ghostscript to read further options from an attacker-supplied text file. That is the classic CWE-78 pattern of untrusted data crossing into a command interpreter's option space; the practical consequence ranges from option injection (the regression test added alongside the fix uses the filename '-h' to confirm the help flag is no longer triggered) up to arbitrary command execution once an '@' argument file is under attacker control, and the reporter's chain works even against Ghostscript's default -dSAFER sandbox because the injected options are processed before the sandbox restricts file operations. The upstream fix is a single-line change wrapping the filename in os.path.abspath(), which guarantees the token begins with '/' and can never be read as an option or an @-file reference; the accompanying test test_filename_not_parsed_as_ghostscript_argument verifies the behavior. CPE data (cpe:2.3:a:python-pillow:pillow:*:*:*:*:*:*:*:*) covers the full 2.6.0 to 12.x range.
Know when Pillow gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
AC:H because weaponized command execution requires an attacker-controlled @ argument-file and its contents; PR:N/UI:N as no auth or interaction is needed, and injected Ghostscript commands yield full C/I/A impact.
Primary rating from Vendor (GitHub_M).
CVSS VectorVendor: GitHub_M
Lifecycle Timeline
2DescriptionCVE.org
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.
Articles & Coverage 1
Technical POC Analysis
The flaw is CWE-88 argument injection in PIL.EpsImagePlugin.Ghostscript in src/PIL/EpsImagePlugin.py, with an optional chain to CWE-78 OS command injection.
Full technical POC analysis - root cause, step-by-step exploitation and patch breakdown - is part of the Pro and Business plans.
Executive ViewAI
Pillow, the widely used Python imaging library, carries a critical argument-injection flaw (CVE-2026-112900) in its EPS decoding path that can escalate to arbitrary command execution on any host where Ghostscript is installed and an application passes an attacker-influenced filename into Image.open(). Products and internal services that accept user-supplied EPS images - customer upload endpoints, document-conversion pipelines, and CI/build jobs that render untrusted images - are the exposed surface, and successful exploitation yields code execution under the service account, meaning data theft, lateral movement, and service disruption. Leadership should care because remediation requires coordinated library upgrades across many teams plus verification that Ghostscript is present on those hosts, and the precondition (application-level filename handling) makes exposure hard to assess without a full dependency inventory.
Apply vendor patch.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
OS command injection occurs when an application passes unsanitized user input directly into system shell commands.
libImaging/TgaRleDecode.c in Pillow 9.1.0 has a heap buffer overflow in the processing of invalid TGA image files. Rated
Denial of service in Python Pillow (versions 8.2.0 through 12.2.0) allows remote attackers to exhaust memory during JPEG
Out-of-bounds memory disclosure in Python Pillow before 12.3.0 lets an attacker who supplies a crafted McIdas AREA image
Heap out-of-bounds write in Python Pillow prior to 12.3.0 lets an attacker who controls the rank-filter size parameter c
Uncontrolled memory consumption in Python Pillow (PIL) versions 5.1.0 through 12.2.x allows a remote attacker to cause d
The package pillow 5.2.0 and before 8.3.2 are vulnerable to Regular Expression Denial of Service (ReDoS) via the getrgb
Pillow is a Python imaging library. In versions 11.2.0 to before 11.3.0, there is a heap buffer overflow when writing a
Integer overflow in the ImagingResampleHorizontal function in libImaging/Resample.c in Pillow before 3.1.1 allows remote
Python Image Library (PIL) 1.1.7 and earlier and Pillow 2.3 might allow remote attackers to execute arbitrary commands v
Pillow versions 11.0.0 through 12.x (fixed in 13.0.0) can reuse a stale native ImagingCore buffer when a multi-frame ima
Pillow through 8.2.0 and PIL (aka Python Imaging Library) through 1.1.7 allow an attacker to pass controlled parameters
An issue was discovered in Pillow before 8.1.1. Rated critical severity (CVSS 9.8), this vulnerability is remotely explo
EUVD-2026-104661
GHSA-w889-685w-c8fh
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB