Skip to content
KitploitKITPLOIT
ToolsExploitsBlog
Log in
Submit
ToolsExploitsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

FeedsContactPrivacy© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
CVE-2026-112900-Pillow-PoC — Non-destructive proof of concept for CVE-2026-112900, demonstrating Ghostscript argument injection in Pillow's EPS rendering path with isolated Docker/Podman vulnerable-vs-patched comparison. | Kitploit
Tools/GitHubGitHub/moprius/cve-2026-112900-pillow-poc
Container SecurityVulnerability AnalysisExploitationWeb Application ExploitationPapers & ResearchLearning & Education
GitHubmoprius/cve-2026-112900-pillow-poc

CVE-2026-112900-Pillow-PoC

Share

Non-destructive proof of concept for CVE-2026-112900, demonstrating Ghostscript argument injection in Pillow's EPS rendering path with isolated Docker/Podman vulnerable-vs-patched comparison.

View Repository
28 days agoNot yet reviewed

CVE-2026-112900: Pillow / Ghostscript Argument Injection — Safe PoC

Unit tests Python License: MIT Demonstration

Language: English · Leia em Português (Brasil)

A reproducible, non-destructive proof of concept for the argument-injection vulnerability (CWE-88) in Pillow's EPS rendering path when invoking Ghostscript. The project compares a vulnerable Pillow release with the first fixed release, supplies an isolated Docker/Podman environment, and includes automated unit tests and technical documentation.

Important scope limitation: This PoC passes only Ghostscript's -h (help) option as a specially named EPS file. It demonstrates argument injection, not arbitrary command execution (RCE). It does not include an RCE payload, an @ argument-file payload, any network exploit, or code to attack a remote application. The upstream advisory discusses additional conditions under which RCE is possible.

At a glance

ItemDetails
CVECVE-2026-112900
GitHub Security AdvisoryGHSA-w889-685w-c8fh
Affected softwarePillow (Python Imaging Library fork)
Affected versions>= 2.6.0 and < 13.0.0
First fixed version13.0.0
Relevant functionPIL.EpsImagePlugin.Ghostscript()
WeaknessCWE-88 (argument injection); the advisory also describes a conditional CWE-78 chain
Safe demonstrationRelative EPS filename -h triggers Ghostscript help on affected versions
Default container imageUbuntu 24.04 + Ghostscript + selected Pillow version

Sources: Pillow's official security advisory and the GitHub Advisory Database.

Why this happens

Pillow supports reading EPS (Encapsulated PostScript) files using PIL.EpsImagePlugin. When an EPS image is rendered, Pillow calls Ghostscript to process the image.

In affected versions, the file name is passed to Ghostscript as an argument following -f, without first making the file path unambiguously a path. If the relative file name begins with -, Ghostscript may interpret it as an option instead of the intended EPS input filename.

This demo creates a valid EPS file literally named -h, opens it with Pillow using that relative name, and invokes load(). If Ghostscript prints its help text, that is observable evidence that the name was processed as a command-line option.

Application calls Image.open("-h") and image.load()
               |
               v
Pillow 12.3.0 forwards the relative filename to Ghostscript
               |
               v
Ghostscript parses "-h" as the help option
               |
               v
Result: VULNERABLE  (argument injection observed, NOT RCE)

The fixed version normalizes the relevant file path before passing it to Ghostscript. See technical analysis for the affected code path, prerequisites, and mitigation guidance.

Requirements

  • Preferred: Docker or Podman (Fedora users can use rootless Podman).
  • Internet connectivity during the image build only, to download the Ubuntu packages and the specified Pillow release.
  • A disposable environment under your control or with explicit authorization.
  • If running without a container: a compatible Python 3 environment, Ghostscript installed, and Pillow installed in a dedicated virtual environment, not the host's system Python.

This repository intentionally provides a build argument that installs Pillow 12.3.0, a known vulnerable version. Do not use the vulnerable image for production, public services, or processing untrusted files.

Quick start — Fedora with Podman

Run these commands from the repository root (the directory containing Dockerfile). First build the intentionally vulnerable image:

podman build -t pillow-ghsa:vulnerable \
  --build-arg PILLOW_VERSION=12.3.0 .

Run the safe demonstration with networking disabled, a read-only root filesystem, dropped capabilities, and a private writable temporary directory:

podman run --rm --network none \
  --read-only --cap-drop all \
  --security-opt no-new-privileges \
  --tmpfs /tmp:rw,nosuid,nodev,noexec,size=32m \
  pillow-ghsa:vulnerable

You should see Result: VULNERABLE when the help-option injection is reproduced.

Now build Pillow 13.0.0, the first fixed release:

podman build -t pillow-ghsa:patched \
  --build-arg PILLOW_VERSION=13.0.0 .

And run the same test under the same container restrictions:

podman run --rm --network none \
  --read-only --cap-drop all \
  --security-opt no-new-privileges \
  --tmpfs /tmp:rw,nosuid,nodev,noexec,size=32m \
  pillow-ghsa:patched

You should see Result: NOT_REPRODUCED if the EPS renders without Ghostscript treating -h as an option.

Why compare two versions? The version contrast makes the observation more meaningful: the same benign file, tool invocation, and runtime configuration are used, while the Pillow version changes. It still does not constitute a security audit of your host or web service.

Docker equivalent

Replace podman with docker in the four commands above. The syntax of the build arguments and most isolation flags is the same.

Verbose and machine-readable output

Pass the following flags after the image name:

podman run --rm --network none \
  --read-only --cap-drop all \
  --security-opt no-new-privileges \
  --tmpfs /tmp:rw,nosuid,nodev,noexec,size=32m \
  pillow-ghsa:vulnerable python /app/poc.py --verbose
podman run --rm --network none \
  --read-only --cap-drop all \
  --security-opt no-new-privileges \
  --tmpfs /tmp:rw,nosuid,nodev,noexec,size=32m \
  pillow-ghsa:vulnerable python /app/poc.py --json

--verbose displays a truncated copy of captured Ghostscript output. --json provides structured data, including the detection status, runtime versions, and observed subprocess output.

How to recognize a successful test

Expected example on a vulnerable Pillow version:

Pillow / Ghostscript argument-injection laboratory
Advisory: GHSA-w889-685w-c8fh | CVE: CVE-2026-112900
Pillow: 12.3.0
Ghostscript: 10.x.x
Payload: -h (Ghostscript help; harmless argument injection)
Result: VULNERABLE
Details: Ghostscript interpreted '-h' as its help option: argument injection was reproduced. This does NOT demonstrate RCE.

Expected example with the fixed Pillow version:

Pillow / Ghostscript argument-injection laboratory
Advisory: GHSA-w889-685w-c8fh | CVE: CVE-2026-112900
Pillow: 13.0.0
Ghostscript: 10.x.x
Payload: -h (Ghostscript help; harmless argument injection)
Result: NOT_REPRODUCED
Details: EPS loaded without triggering Ghostscript help. This is consistent with a patched implementation; it is not a complete security audit.

The Ghostscript version will depend on the image build and may differ from the examples.

Download Tool

Most Popular

View all →

Discover the most used tools by our community.

  • 1

    OsintHunter

    letox4/osinthunter

    🎯 The ultimate OSINT toolkit: investigation graph, confidence scoring, alias families, map, timeline and reports. 49 modules, 400+ sites, no API keys required.

    1.0k
  • 2

    ghostlock-app

    yukonga/ghostlock-app

    GhostLock One-Tap Execution App (CVE-2026-43499)

    647
  • 3

    looking-glass

    anonghosty/looking-glass

    CSIRT platform that ingests Shadowserver reports into MongoDB and replays them as interactive maps, analysis, findings, advisories and executive dashboards.

    421
  • 4

    jumpserver

    jumpserver/jumpserver

    JumpServer is an open-source Privileged Access Management (PAM) platform that provides DevOps and IT teams with on-demand and secure access to SSH, RDP, Kubernetes, Database and RemoteApp endpoints through a web browser.

    389
  • 5

    ARTEX

    baarai/artex

    LLM multi-agent autonomous penetration testing platform with planner/worker agents, asset and exploration graphs, MITM traffic recording, and vulnerability retesting.

    333
  • 6

    SafeLine

    chaitin/safeline

    Self-hosted WAF and reverse proxy that filters malicious HTTP traffic, blocks SQL injection, XSS, and bot attacks, with rate limiting and dynamic HTML/JS encryption.

    331

Explore all tools

Browse our collection of tools

View all tools →