world

Upload2Shell PoC Turns Ghostscript File Uploads and Print Jobs Into RCE

Public PoC code for Upload2Shell (CVE-2026-125396, CVSS 8.5) lets crafted files disguised as PNG or PDF escape Ghostscript -dSAFER and run server commands.

Upload2Shell PoC Turns Ghostscript File Uploads and Print Jobs Into RCE

Security advisories from Sophos and Equixly on November 23 warn that public proof-of-concept details are now available for Upload2Shell (CVE-2026-125396), a high-severity use-after-free vulnerability (CVSS 4.0: 8.5) in Ghostscript. Discovered by researcher Paulos Yibelo at pwn.ai, the flaw breaks out of Ghostscript's -dSAFER sandbox and turns ordinary file uploads, email previews, and print queues into remote command execution.

What Happened

Upload2Shell resides in Ghostscript's Type 1 font loader in versions prior to 10.08.0. Because PostScript is a full programming language, Ghostscript relies on -dSAFER to block arbitrary file access and shell execution—yet those checks live inside the interpreter itself rather than a kernel-enforced boundary like seccomp. By corrupting memory via a crafted PostScript, EPS, or PDF payload—including payloads disguised with .png or .jpg extensions—an attacker can disable -dSAFER and execute OS commands as the rendering user.

Key Details and Affected Pipelines

Even though Artifex patched Ghostscript 10.08.0 on September 8, 2026, downstream distribution lag leaves servers exposed:

  • 10 confirmed application paths: pwn.ai demonstrated command execution across Debian 13 CUPS print queues, Roundcube (linked to CVE-2026-114727 in Plesk), WordPress, MediaWiki, and six other apps—requiring no user account in seven of the ten paths.
  • Hidden invocation: Web apps rarely call Ghostscript directly; instead, ImageMagick, Pillow, and print filters invoke it silently during thumbnailing or document conversion.
  • Patch lag: While Ubuntu and Debian shipped fixes, AlmaLinux only pushed test packages for 8/9/10 on November 22, and container images or Amazon Linux/SUSE stacks often bundle unpatched binaries. No active in-the-wild exploitation is confirmed yet.

Context and Why Now

Two trends collide here: AI-assisted vulnerability research (which pwn.ai used to uncover Upload2Shell) is accelerating exploit discovery in aging C codebases, while modern web stacks remain blind to transitive native dependencies. Updating a PHP or Python web app does nothing if the underlying gs binary inside a base container image stays below 10.08.0.

Macro and Micro Consequences

At the macro level, Upload2Shell revives pressure to strip PostScript/EPS delegates out of default ImageMagick policy.xml configs and wrap document renderers in OS-level sandboxes (seccomp, AppArmor, or ephemeral microVMs).

At the micro level, DevOps and hosting teams have immediate verification tasks:

  • Audit every gs binary: Check gs --version inside production hosts, Plesk panels, and Docker images (>= 10.08.0 or distro-backported fix).
  • Disable unneeded delegates: Block PS, EPS, and PDF coders in ImageMagick if your upload pipeline only expects raster images.

Winners and Losers

Winners are memory-safe document parsers, isolated serverless rendering workers, and teams enforcing strict ImageMagick delegate policies. Losers are shared hosting stacks, legacy CMS deployments, and unpatched Linux print servers.

What to Watch Next

  • Mass exploitation scans: Whether automated bots begin spraying disguised PostScript payloads at WordPress and Roundcube upload forms now that PoC details are public.
  • Distro backport completion: How quickly remaining enterprise Linux vendors and base Docker images ship 10.08.0 fixes.

// sources

// WebZona Studio products

Need a product or service that does not exist yet?

Pitch your idea in our "50 Hours" program — every month we build one community idea free for everyone. Or explore our released products.

// comments (0)

// no comments yet.