Low Severity CVE-2026-125396
Published: Nov 23, 2026

[GitHub] upload2shell-poc-generator

Other
Type
N/A
CVSS Score
6
Views
Anonymous
Author

Description

OOB payload generator for CVE-2026-125396 (Ghostscript -dSAFER escape): Collaborator callback payloads for Ghostscript 9.26–10.07.1; inert on fixed builds.

# upload2shell-poc-generator

## About

A one-command payload generator for **CVE-2026-125396** — the Ghostscript Type 1
font-loader `.forceput` recovery chain that escapes `-dSAFER` on every Ghostscript release
from 9.26 through 10.07.1 and executes a command as the renderer's account. Pass it a
Collaborator (or any OOB canary) domain and it emits ready-to-upload PostScript payloads
(HTTP+DNS callback, DNS-only exfiltration, and a signature-evasion variant) with
PDF/PNG/JPG-named copies. On patched Ghostscript (10.08.0+) the payloads detect the fix
and send nothing, so they double as a safe presence probe. Based on the research published
by Paulos Yibelo / pwn.ai ("How We Hacked the Pipes — Upload2Shell"); use only on systems
you are authorized to test.


Payload generator for **CVE-2026-125396** ("Upload2Shell") — a Ghostscript font-loader
error-path `.forceput` recovery leading to a save/restore use-after-free, a `-dSAFER`
escape, and command execution. Fixed in Ghostscript **10.08.0**.

Original research (the vulnerability, the chain, and the disclosure):
**"How We Hacked the Pipes — Upload2Shell"**, Paulos Yibelo, pwn.ai —
https://pwn.ai/upload2shell/research.html

References:
- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-125396 (CVSS 4.0: 8.5)
- Artifex fixes: `1484854e0c8ddfda1baa4ad4cd965b8a9790aa81` (operand validation),
`e0421767e13627e75055bb44cb01486887c2f9e8` (helper moved to C)

## What this is

`generate_upload2shell_payloads.py` takes a Collaborator (or any OOB canary) domain and
emits a self-contained PostScript payload per variant, with `.pdf`/`.png`/`.jpg`-named
copies for upload forms:

| File | Callback |
|---|---|
| `upload2shell_collab.ps/.pdf/.png/.jpg` | HTTP `GET /UPLOAD2SHELL_CURL_OK` + DNS `upload2shell-probe.<CO>` |
| `upload2shell_dns.ps` | DNS only: `up2s-<uid>-<hostname>.<CO>` (no curl dependency) |
| `upload2shell_collab_obs.ps/.pdf` | same as collab, signature-evasion variant (no `%!` header, hex-encoded tokens) |

The c

Community Rating
0

Login to rate this exploit

Quick Actions