Ghostscript flaw lets disguised uploads escape server sandbox
An AI-assisted discovery exposed a Ghostscript sandbox escape through disguised document uploads. Fixes are available, but backported patches make version strings an unreliable guide to exposure.

An AI-assisted investigation by pwn.ai researcher Paulos Yibelo uncovered a Ghostscript flaw that could turn an apparently ordinary file upload into command execution on a server, iTnews reported. The vulnerability, named Upload2Shell and tracked as CVE-2026-125396, affects unpatched releases earlier than Ghostscript 10.08.0.
The interpreter's maintainer, Artifex, released that version on September 8. No exploitation in the wild has been reported, although a working proof of concept accompanied the disclosure. In its own test, iTnews reproduced the exploit against an older vulnerable build; the patched release did not trigger the flaw.
Ghostscript processes PostScript and PDF documents for functions such as previews and printing. The attack depends on the distinction between a file's name and the instructions inside it. PostScript is executable programming language, not simply a description of an image. A normal PDF cannot contain the code this exploit requires, so the malicious document carries PostScript while presenting a .pdf, .jpg or .png filename.
Libraries including ImageMagick and Pillow inspect file contents to choose a processing route. When they recognise PostScript, they can hand the document to Ghostscript despite its apparently trusted extension. The upload field is therefore only the entry point: the vulnerable interpreter is reached during subsequent processing.
The -dSAFER sandbox is supposed to prevent a document from accessing files or executing commands. Upload2Shell defeats that control through a font-loading routine. A crafted document breaks the routine and uses its own error handler to disable the protection in memory.
pwn.ai confirmed command execution across 10 products, with different routes into the same processing chain. In Debian 13, an anonymous job submitted to a shared print queue executed on the host. For Roundcube webmail, opening a message containing a disguised attachment was sufficient. Neither case required the attacker to persuade an operator to launch a conventional executable.
Public upload forms in the WordPress plugins Forminator and Essential Addons for Elementor also exposed the flaw to visitors without an account. WordPress assigned its fix a severity of 8.8 out of 10 for installations combining Imagick with Ghostscript. A separate route into Google's document pipeline accepted a signed-out request for an attacker-hosted file; pwn.ai put the closure of that route on November 10.
The disclosure also drew boundaries around the affected-company list. Meta, Zoom and Box appeared in a September teaser but not in pwn.ai's published report. The firm's Dropbox finding and several unnamed findings concerned separate Ghostscript bugs, rather than evidence that every earlier company mention described Upload2Shell.
Mitigations preceded the vulnerability's public identifier. WordPress shipped its mitigation on August 12, followed by Artifex's September release. pwn.ai requested the CVE on November 6; publication followed on November 9, US Eastern time, more than two months after the Ghostscript fix.
The underlying class of sandbox escapes is not new. Artifex fixed a related problem in the same font-handling file in 2018 after Google researcher Tavis Ormandy found it through fuzzing. Artifex is now trying to remove the privileged internal operation that enables this recurring class of bug.
Exposure is greater for web services that automatically process untrusted PDF and PostScript documents than for desktop systems. Checking the installed version alone is insufficient: Linux distributions may retain an older version string while backporting the security fix. An older-numbered package therefore needs its patch status checked rather than being assumed vulnerable solely from its release label.




















