Vulnerability

Pillow EPS Ghostscript argument injection (CVE-2026-112900)

A flaw in Pillow, the widely used Python imaging library.

CVE ID
CVE-2026-112900
CVSS
9.2 Critical (CVSS v4.0), as scored by GitHub; the Pillow maintainers rate it moderate; NVD has not added its own score
Affected product
Pillow, the Python imaging library
Exploited
Unknown
Published
17 October 2026

In short

CVE-2026-112900 is a flaw in Pillow, the widely used Python imaging library. GitHub rates it critical (CVSS 4.0 9.2); the Pillow maintainers rate it moderate. When Pillow opens an EPS image, it passes the file name to Ghostscript without making it a safe path. A name that starts with a hyphen or @ can add Ghostscript options, and in one chain this leads to command execution. Pillow 13.0.0 fixes it. The Pillow maintainers published the advisory on 17 October 2026, the CVE record appeared on 19 October, and GitHub's advisory database added it on 21 October.

Profile MapVulnerability
  1. CVECVE-2026-112900
  2. ProductPillow (python-pillow) Pillow, the Python imaging library
  3. Fix Steps5actions listedCheck your Pillow version · Upgrade to Pillow 13.0.0

What it allows

The flaw sits in how Pillow, the Python imaging library, opens EPS images. To render most EPS files, Pillow starts the Ghostscript program and passes it the file name after the -f option. Before the fix, the name went through as it was. Ghostscript reads a name that starts with a hyphen as an option, and a name that starts with @ as a list of more options stored in a file.

An attacker who picks the file name can therefore add Ghostscript options. The advisory says this works with Pillow's default -dSAFER setting. NVD adds two conditions for command execution (remote code execution). The name must start with @, and the attacker must control the text file it points to, which holds the extra Ghostscript arguments. The reporter's proof of concept ran the id command this way.

Several conditions must all hold, so the risk is not the same for every Python project. First, Ghostscript must be installed on the server. Without it, Pillow cannot render EPS files this way. Second, Pillow must get a path, or a file object whose name points to a file on disk. Third, an outsider must decide or influence that file name, for example through an upload feature that keeps the name it was sent with. Fourth, the file must be read as EPS and loaded, which is when Ghostscript runs.

Upwind's security team notes that code paths which never call Ghostscript are not affected. Apps that store uploads under names the server makes up, or that limit Image.open() to the formats they need, are not exposed by this bug. Pillow picks the format from the file content, not the name, so an app that expects PNG can still open EPS content unless you limit the formats. The flaw does not depend on anything inside the image, so a harmless EPS file with a bad name is enough.

Our checks on 23 October 2026 showed the following. GitHub: the reporter's proof of concept, a Dockerfile plus two short scripts, is public inside the advisory itself. Checkmarx Zero wrote on X on 20 October that "PoCs are included in public advisories".

X: 17 posts matched our searches from 19 October, and 11 of them were about this flaw. They repeat the advisory, add upgrade advice or link to news.

Dark web monitoring through THANOS: 3 posts carry the CVE id, all on Telegram, all from news and CVE feed channels, on 20 and 23 October. These are aggregate counts. We did not run or link any code.

The CISA coordinator entry from 20 October rates exploitation as "none" and the flaw as automatable with total technical impact. CISA had not listed the CVE in its Known Exploited Vulnerabilities catalog in the file released on 21 October. That can change, so treat it as a flaw to fix in your next patch cycle, not as an emergency for every Python shop. GitHub rates it critical and the Pillow maintainers rate it moderate, which fits the narrow conditions above.

Pillow is often pulled in as a dependency of other packages. It can sit in your software bill of materials (SBOM) without anyone having chosen it.

Who is affected

Pillow from 2.6.0 up to, but not including, 13.0.0. Pillow 13.0.0 fixes it. The reporter says the vulnerable code is long standing. The reporter tested Pillow 12.3.0 with Ghostscript 10.02.1 and also confirmed command execution with Ghostscript 10.07.1.

The fix is one change in Pillow's EPS plugin. It turns the file name into an absolute path before Ghostscript sees it, so a leading hyphen or @ can no longer be read as an option. A test in the same change opens a file named -h and checks that it loads as a normal image.

Pillow 13.0.0 drops support for Python 3.10, which reached end of life in October 2026. If a service still runs 3.10, pip will not install the fixed release there. Plan the move to a newer Python, and use the workarounds below until then.

The 13.0.0 release is a large security release. GitHub also rates other Pillow flaws fixed in 13.0.0 as critical. They include CVE-2026-112393, a heap overflow when saving a TIFF to memory, and CVE-2026-112403, a heap overflow in the JPEG decoder. A third is CVE-2026-96639, reuse of stale image storage after mode changes. One upgrade covers them all.

Timeline

  1. 1 Oct 2026

    A change dated this day makes the EPS plugin turn the file name into an absolute path before it calls Ghostscript.

  2. 16 Oct 2026

    Pillow 13.0.0 is released on GitHub with the fix.

  3. 17 Oct 2026

    The Pillow maintainers publish advisory GHSA-w889-685w-c8fh on GitHub and rate it moderate.

  4. 19 Oct 2026

    The CVE record is published in the National Vulnerability Database, with GitHub as the source.

  5. 20 Oct 2026

    Checkmarx Zero posts about the flaw on X. The CISA coordinator entry rates exploitation as none, automatable as yes and technical impact as total.

  6. 21 Oct 2026

    GitHub's advisory database reviews the entry and rates it critical, CVSS 4.0 9.2.

What to do

  1. Check your Pillow version

    Run pip show pillow in each Python environment, or search your lock files (requirements.txt, poetry.lock, Pipfile.lock, uv.lock) and container images for pillow. Anything from 2.6.0 up to 12.x is affected. Look in the dependencies of other packages too.

  2. Check whether Ghostscript is installed

    Run gs --version (on Windows, gswin64c --version) on the servers and in the images that run Pillow. If there is no Ghostscript, Pillow cannot take this path.

  3. Upgrade to Pillow 13.0.0

    Run pip install --upgrade pillow in a Python version that Pillow 13 supports, then rebuild images and lock files. Pillow 13 needs Python 3.11 or newer.

  4. If you cannot upgrade yet, cut the path

    Save every upload under a name your server generates, never the name the user sent. Pass Pillow an absolute path. Limit Image.open() to the formats you need, for example formats=["PNG", "JPEG"]. If you never need EPS files, set EpsImagePlugin.gs_binary = False, which Pillow documents as preventing Ghostscript use, or remove Ghostscript from the image.

  5. Review what uploads can reach

    Look for places where a user-chosen file name reaches Image.open() as a path. Also check that a user cannot write a file whose content they control next to it.

Questions

Is CVE-2026-112900 being exploited?

The CISA coordinator entry of 20 October rates exploitation as none, and the CVE was not in the CISA Known Exploited Vulnerabilities file released on 21 October. A proof of concept is public in the advisory, so attacks are possible.

Does every app that uses Pillow have this flaw?

No. The app needs Ghostscript installed, must give Pillow a path or a named file, and an outsider must be able to choose or influence the file name. Apps that rename uploads, or that limit Image.open() to the formats they need, are not exposed through this bug.

Can an attacker run commands with just an uploaded image?

Only in a specific chain. NVD says command execution needs a file name that starts with @ and control of the text file it refers to. A name that starts with a hyphen alone adds a Ghostscript option but not commands.

How do I check which Pillow version I have?

Run pip show pillow in the environment, or open the lock file and look for the pillow entry. In a container, run the same command inside the image.

Which version fixes it?

Pillow 13.0.0. It drops Python 3.10, so services on Python 3.10 must move to a newer Python first.

Does the Pillow fix cover the other critical Pillow flaws?

Yes. Pillow 13.0.0 fixes about 40 security advisories, including CVE-2026-112393, CVE-2026-112403 and CVE-2026-96639, which GitHub also rates critical. One upgrade covers them all.

In our research

  1. eMudhra CA Key Compromise: What Python, uv and Container Teams Must Update Now October 2026
  2. Tarfile: The 15 Years Old Critical Python Vulnerability Affects More Than 350,000 Projects September 2022

Sources

  1. Pillow: Argument Injection in Ghostscript call, potentially leading into RCE (GHSA-w889-685w-c8fh) GitHub
  2. CVE-2026-112900 NVD
  3. Transform EPS file name to an absolute path before invoking Ghostscript Pillow
  4. Pillow 13.0.0 release Pillow
  5. 13.0.0 release notes Pillow documentation
  6. Image file formats: EPS Pillow documentation
  7. GHSA-332p-7hrc-92wf (CVE-2026-112393) GitHub
  8. GHSA-8g5g-8vmr-9782 (CVE-2026-112403) GitHub
  9. Known Exploited Vulnerabilities catalog CISA
  10. CWE-88: Improper Neutralization of Argument Delimiters in a Command MITRE