A single Ghostscript bug let researchers run commands on servers through some of the most ordinary features on the web: a print job, an email thumbnail, a profile picture upload, a PDF form. The flaw, now tracked as CVE-2026-125396 and nicknamed Upload2Shell, is a use-after-free in Ghostscript’s Type 1 font loader that breaks out of the interpreter’s -dSAFER sandbox.
Research firm pwn.ai published its findings on Nov 21, 2026, after a disclosure process that started in July. The researchers say they confirmed command execution in Debian 13’s print stack, Roundcube webmail, Plesk Obsidian, WordPress core, 2 popular WordPress plugins, MediaWiki, DokuWiki, Mayan EDMS and ResourceSpace, and that the same bug reached a production document renderer at Google.
The fix has been available since Sep 8, 2026, in Ghostscript 10.08.0. The problem is that Ghostscript hides deep inside other software, and many administrators may not know it is running at all.
Why a .png upload can reach a PostScript interpreter
Ghostscript interprets PostScript and PDF. Most applications never call it directly. They hand files to image libraries such as ImageMagick or Pillow, which check the file’s contents rather than its name and quietly pass PostScript or EPS data to Ghostscript for rendering.
That is the core of the research. According to pwn.ai, almost every application it tested with file uploads could be tricked into sending a file with a trusted extension like .png or .jpg to Ghostscript. Routine features such as cropping an image, generating a thumbnail or building a document preview were enough to expose the interpreter.
Ghostscript’s -dSAFER mode is supposed to stop untrusted documents from reading files or running commands. Unlike a kernel-level sandbox, it relies on checks inside the interpreter itself. Upload2Shell defeats those checks from within.
How the escape works
The bug sits in .putgstringcopy, a helper in Ghostscript’s font loading code that uses a privileged internal operator called .forceput to write into protected font dictionaries. The helper did not validate the types of its inputs before that privileged write.
The researchers built a crafted Type 1 font that swapped a filename string for an array, forcing a type error partway through the helper. A custom error handler in the document then resumed execution right at the privileged write, handing attacker-controlled code access to .forceput without ever calling it directly.
On its own, that would have been a protected dictionary edit. Combined with a lifetime bug across PostScript’s save and restore operations, it left a reference pointing at freed memory. pwn.ai says that gave it a write-what-where primitive, meaning it could choose both the data written and where it landed in native memory. From there, the document altered the state that enforces -dSAFER and ran commands as the rendering process.
Artifex’s upstream fix adds operand type checks to .putgstringcopy so an error handler can no longer reach .forceput.
What the researchers say they hit
pwn.ai lists 10 application paths where it recorded actual command execution, plus a production result at Google. The access level varies widely:
- Debian 13 CUPS: an anonymous print job sent to a shared network queue ran a command on the host as the
lpuser - Roundcube 1.7.2: an external sender’s attachment executed when the recipient simply viewed the email, with no click on the attachment, using a tested ImageMagick delegate
- Plesk Obsidian: command execution through the Roundcube thumbnail path shipped with Plesk, though AppArmor blocked a shell in one enforced test
- Forminator: unauthenticated execution through a public PDF form set to store files in the WordPress Media Library
- Essential Addons for Elementor: unauthenticated execution through a public login and registration widget with an upload field enabled
- WordPress core: execution through the standard upload path for users with the
upload_filescapability, which is Author and above by default, on sites using Imagick with Ghostscript installed - MediaWiki, DokuWiki, Mayan EDMS and ResourceSpace: execution through anonymous PDF uploads, image resizing, emailed document imports and preview workers in specific configurations
The researchers also traced code paths from uploads to Ghostscript in Gradio, ComfyUI, AUTOMATIC1111 Stable Diffusion WebUI, InvokeAI, Home Assistant, CVAT, Paperless-ngx and Frappe/ERPNext. Those are mapped routes, not confirmed exploits. For Gradio, pwn.ai says it saw a live HTTP request start Ghostscript before the app’s own code ran.
At Google, the researchers say a signed-out request for an attacker-hosted file reached Ghostscript in Google’s document renderer and gave them control of the renderer plus a limited file read on the worker. Google mitigated that path on Nov 10, 2026, according to the disclosure timeline.
A September teaser from pwn.ai also named Dropbox, Box, Zoom and Wikimedia. The researchers now say Dropbox and several redacted services were hit through separate Ghostscript bugs, not CVE-2026-125396, and those case studies have not been published yet.
Severity and exploitation status
VulnCheck, the CVE numbering authority, scored the flaw 8.5 High under CVSS 4.0. NIST had not published its own assessment at time of publication. That base score treats the bug as local with user interaction, which undersells the real-world risk when an application feeds untrusted uploads straight into Ghostscript with no login required.
No public reports of exploitation in the wild had surfaced at time of publication. pwn.ai has not released its proof-of-concept code and says product-specific case studies will roll out over time.
The patch trail
Vendors had a long head start on this one:
- Aug 12, 2026: WordPress shipped a fix for its upload path under
CVE-2026-65640. Affected versions include 7.0.0 through 7.0.3 and 6.9.0 through 6.9.6, plus earlier branches listed in the advisory. - Sep 8, 2026: Artifex released Ghostscript
10.08.0with the root fix - Sep 25, 2026: Debian shipped its first Debian 13 fix,
10.05.1~dfsg-1+deb13u2, in DSA-6516-1. The current Debian 13 build is10.05.1~dfsg-1+deb13u3. - Oct 19, 2026: Roundcube restricted unsafe attachment image types before ImageMagick conversion under
CVE-2026-114727 - Oct 21, 2026: Ubuntu released fixed Ghostscript packages for 7 releases in USN-8949-1, before the CVE number existed
- Nov 9, 2026:
CVE-2026-125396was published - Nov 17, 2026: Debian 12 received its fix,
10.0.0~dfsg-11+deb12u9, in DLA-4914-1
Ghostscript 10.08.0 also fixed 5 other CVEs, according to Artifex’s own security page, which does not yet list CVE-2026-125396. The upstream commit and Debian’s tracker tie the fix to that release. The 10.08.0 release notes only say the version “addresses a number of potential security issues,” which may explain why the update drew little attention until now.
What defenders should check
The fastest fix is updating Ghostscript itself, either to 10.08.0 or later or to your distribution’s patched package. Updating WordPress, Roundcube or a plugin closes one route, but any other software on the same server that hands files to Ghostscript stays exposed until the interpreter is patched.
- Run
gs --versionon web, mail, print and document-processing hosts, including containers, and compare against your distribution’s fixed build - Look for Ghostscript in container images that bundle it for previews, such as Paperless-ngx and Mayan EDMS
- Check whether ImageMagick’s policy allows PostScript, EPS, PDF and XPS coders. If those formats are not needed, disabling them in
policy.xmlcuts off the most common route. - Audit public upload fields on WordPress sites, especially registration widgets and form plugins that save uploads to the Media Library
- Restrict shared CUPS queues to trusted networks
pwn.ai expects others to find more routes into the same bug through print filters, thumbnailers and document previews. Given how many products quietly rely on Ghostscript, that seems likely.












