Illustration of a blank document inside a cracked glowing blue glass cube, with orange light streams flowing into a rendering machine, a server rack and an upload panel on a dark background.

Upload2Shell: One Booby-Trapped File Can Turn Ghostscript Into a Remote Shell

Ghostscript is the PostScript and PDF interpreter hiding under a huge amount of software: print queues, thumbnailers, document previews, image converters. On Saturday, researchers at pwn.ai published full details of Upload2Shell, tracked as CVE-2026-125396, and showed how one booby-trapped file can turn that quiet plumbing into remote code execution.

The good news first: the fix has existed since September. The bad news: plenty of systems may still not have it.

What’s broken

The bug lives in Ghostscript’s Type 1 font-loading code. According to the GitHub and VulnCheck advisories, the .putgstringcopy procedure in gs_fonts.ps calls the privileged .forceput operator without checking operand types. A crafted PostScript or PDF file can trigger an error, recover .forceput with a custom error handler, and cause a use-after-free across save/restore. The result is escaping the -dSAFER sandbox and running commands as whatever process is rendering the file.

VulnCheck rates it high severity, CVSS 8.5 under version 4. Affected: Ghostscript before 10.08.0.

Where pwn.ai says it landed

The scary part is the delivery routes. pwn.ai says it confirmed command execution through an anonymous print job on a Debian 13 CUPS shared queue, through Roundcube webmail just by viewing an email with a malicious attachment, and through signed-out upload forms in the WordPress plugins Forminator and Essential Addons for Elementor. It also lists MediaWiki’s PdfHandler, DokuWiki, Mayan EDMS, Plesk and ResourceSpace. It says a file disguised as a .png or .jpg can still reach Ghostscript via ImageMagick.

pwn.ai also says it reached Ghostscript in Google’s document renderer, which Google fixed on November 10, and that WordPress shipped its own separate fix, CVE-2026-65640, on August 12. Those claims come from the researchers’ own disclosure timeline; we haven’t seen vendor statements confirming each one.

The patch timeline

Artifex released Ghostscript 10.08.0 on September 8. Oracle’s Alan Coopersmith noted on the oss-security list Saturday that the release notes only say it “addresses a number of potential security issues,” and that CVE-2026-125396 was confirmed as fixed there only with Saturday’s write-up. Debian and Ubuntu have shipped fixed packages, per pwn.ai.

Why it matters

This is a classic supply-chain-of-parsers problem: you may not know you run Ghostscript until someone’s PDF finds it. If you host a WordPress site, a webmail server, a wiki or anything that previews uploads, update Ghostscript to 10.08.0 or your distro’s patched build, update the plugins involved, and consider whether ImageMagick should be handing PDF and PostScript to Ghostscript at all. Public proofs-of-concept haven’t been released yet, but pwn.ai says case studies are coming. That’s your window.

Sources

Similar Posts