Description
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.
Published: 2026-10-19
Score: 9.2 Critical
EPSS: 1.3% Low
KEV: No
Impact: Remote Code Execution
Action: Patch Immediately
AI Analysis

Impact

Pillow, a widely used Python imaging library, is vulnerable to argument injection when it processes EPS files from version 2.6.0 until 13.0.0. The EpsImagePlugin calls Ghostscript, passing a caller-controlled filename directly after the -f option without sanitizing the value. If the filename begins with a hyphen, Ghostscript interprets it as an option and can execute arbitrary switches. By providing a filename that starts with a leading @ and a text file containing additional Ghostscript arguments, an attacker can cause Ghostscript to run arbitrary commands. The exploit chain works even under the default -dSAFER invocation, which normally restricts Ghostscript from opening files. The result is a full remote code execution on the system that runs Pillow.

Affected Systems

The vulnerability affects all Pillow versions from 2.6.0 through 13.0.0, inclusive. Any Python project that imports Pillow and processes EPS images with the EpsImagePlugin is impacted. The issue was resolved in Pillow 13.0.0 and newer; upgrades to that version or later provide the necessary filename sanitization.

Risk and Exploitability

The CVSS score of 9.2 classifies the issue as critical. The EPSS score is not available, so the realistic exploitation probability is unclear. The vulnerability is not listed in the CISA KEV catalog. Based on the description the likely attack vector is the submission or upload of a malicious EPS file containing a specially crafted filename and an @ argument file to the application. The attacker must have write access to the file system where Pillow is executed or be able to supply files to the application, so exploitation is expected to be limited to scenarios handling untrusted file uploads or inputs. Nevertheless, since the exploit succeeds under Ghostscript's default safe mode, any application that uses Pillow for EPS processing remains at significant risk until patched.

Generated by OpenCVE AI on October 20, 2026 at 06:52 UTC.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Update Pillow to version 13.0.0 or newer to apply the built‑in filename sanitization.
  • If an immediate update is not possible, reject or reject filenames that begin with a hyphen, strip user‑supplied names, or enforce that the file passed to Ghostscript is an absolute, safe path before invocation.
  • Disable Ghostscript support for EPS files in applications that do not require it, or process all untrusted EPS files through a separate sandboxed environment.

Generated by OpenCVE AI on October 20, 2026 at 06:52 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Github GHSA Github GHSA GHSA-w889-685w-c8fh Pillow: Argument Injection in Ghostscript call, potentially leading into RCE
History

Tue, 27 Oct 2026 15:15:00 +0000

Type Values Removed Values Added
First Time appeared Python
Python pillow
CPEs cpe:2.3:a:python:pillow:*:*:*:*:*:*:*:*
Vendors & Products Python
Python pillow
Metrics cvssV3_1

{'score': 9.8, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H'}


Tue, 20 Oct 2026 15:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'none', 'Technical Impact': 'total'}, 'version': '2.0.3'}


Tue, 20 Oct 2026 00:00:00 +0000

Type Values Removed Values Added
First Time appeared Python-pillow
Python-pillow pillow
Vendors & Products Python-pillow
Python-pillow pillow

Mon, 19 Oct 2026 22:15:00 +0000

Type Values Removed Values Added
Description 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.
Title Pillow: Argument Injection in Ghostscript call, potentially leading into RCE
Weaknesses CWE-78
CWE-88
References
Metrics cvssV4_0

{'score': 9.2, 'vector': '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'}


Subscriptions

Python Pillow
Python-pillow Pillow
cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-10-20T14:43:44.563Z

Reserved: 2026-10-19T20:16:09.857Z

Link: CVE-2026-112900

cve-icon Vulnrichment

Updated: 2026-10-20T14:43:36.768Z

cve-icon NVD

Status : Analyzed

Published: 2026-10-19T22:17:10.160

Modified: 2026-10-27T14:55:00.937

Link: CVE-2026-112900

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-10-20T07:00:13Z

Weaknesses
  • CWE-78

    Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')

  • CWE-88

    Improper Neutralization of Argument Delimiters in a Command ('Argument Injection')