Turn an anonymous IPP print job into command execution. A hands-on reproduction of CVE-2026-125396 through CUPS and Ghostscript.
# Upload2Shell: CVE-2026-125396
A local reproducer for **CVE-2026-125396**, a use-after-free in Ghostscript's
Type 1 font loader (`.putgstringcopy`). The bug hands you a write-what-where.
From there the payload turns off `-dSAFER`'s native path control and runs a
command as the CUPS filter account.
<p align="center">
<img src="assets/logo.png" alt="Upload2Shell logo: a printer printing a terminal prompt" width="65%">
</p>
Found and published by Paulos Yibelo / pwn.ai on 21 Nov 2026, fixed in
Ghostscript 10.08.0. I did not find this bug. What is in here is my own chain
for Debian 13 and Ubuntu 22.04/24.04, plus a small standalone IPP client, all
tested in a Docker lab.
- Write-up: https://pwn.ai/upload2shell/research.html
- Original PoC: https://pwn.ai/upload2shell/poc-native-write.pdf
<p align="center">
<img src="assets/banner.png" alt="Upload2Shell: a worker at an industrial printer that is printing a cyan Ghostscript portal and a uid=7(lp) shell prompt" width="100%">
</p>
<p align="center">
<img src="https://img.shields.io/badge/CVE-2026--125396-f5871f?style=flat-square&labelColor=03070b" alt="CVE-2026-125396">
<img src="https://img.shields.io/badge/CVSS-8.5%20high-f26d7e?style=flat-square&labelColor=03070b" alt="CVSS 8.5">
<img src="https://img.shields.io/badge/zero--click%20IPP%20to%20RCE-2ee6d2?style=flat-square&labelColor=03070b" alt="Zero-click">
<img src="https://img.shields.io/badge/CUPS-2.4.x-2ee6d2?style=flat-square&labelColor=03070b" alt="CUPS">
<img src="https://img.shields.io/badge/Ghostscript-10.08.0%20fix-f5871f?style=flat-square&labelColor=03070b" alt="Ghostscript">
</p>
<p align="center">
<img src="https://img.shields.io/badge/python-3.9%2B-2ee6d2?style=flat-square&labelColor=03070b&logo=python&logoColor=f3e6c8" alt="Python 3.9+">
<img src="https://img.shields.io/badge/tool%20dependencies-none-2ee6d2?style=flat-square&labelColor=03070b" alt="No dependencies">
<img src="https://img.shiel