Argument Injection Affecting pillow package, versions [2.6.0,13.0.0)


Severity

Recommended
0.0
high
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

Exploit Maturity
Proof of Concept
EPSS
0.43% (37th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-PYTHON-PILLOW-21277713
  • published20 Oct 2026
  • disclosed16 Oct 2026
  • creditHLe4s-kaist

Introduced: 16 Oct 2026

NewCVE-2026-112900  (opens in a new tab)
CWE-88  (opens in a new tab)

How to fix?

Upgrade pillow to version 13.0.0 or higher.

Overview

Affected versions of this package are vulnerable to Argument Injection in the Ghostscript function in src/PIL/EpsImagePlugin.py, which assigns infile = fp.name and places it after -f in the argument list without normalizing the path or rejecting the prefixes Ghostscript parses specially, namely -, --, and the @ argument-file token. An attacker can pass arbitrary options to the spawned Ghostscript process, and reach command execution by combining the @ token with a text file whose contents they also control, by arranging for a file whose name begins with one of those characters to be opened as an EPS image. This requires control of the file name reached by Image.open rather than only the file contents, along with an EPS load path that invokes Ghostscript, and the default -dSAFER sandbox does not constrain it, since the injection happens in Ghostscript's own command line parsing.

CVSS Base Scores

version 4.0
version 3.1