Ghostscript Upload2Shell bug escapes -dSAFER, enabling command execution

Ghostscript Upload2Shell bug escapes -dSAFER, enabling command execution

pwn.ai has published a public record of Upload2Shell, a use-after-free in the Type 1 font loader of Ghostscript. According to the researchers, a crafted document can cross Ghostscript's -dSAFER sandbox, alter native path controls, and execute attacker-chosen commands as the rendering process. The root flaw has the identifier CVE-2026-125396.

The reach comes from where Ghostscript sits: beneath print, email, upload and preview workflows. The researchers point to their earlier ImageMagick research, which showed how files named .png or .jpg can still reach Ghostscript through image conversion. Their index records confirmed affected paths alongside further applications whose renderer routes they traced.

The confirmed cases vary widely. On Debian 13 with CUPS (Ghostscript 10.05.1~dfsg-1+deb13u1), an anonymous IPP Print-Job to a shared network queue ran a command on the host as uid=7(lp). The proof is one remote run plus separate 20/20 local conversions, and the network reproduction went to Debian Security. In a webmail case, an external sender's attachment was thumbnailed when the email was viewed, and the tested ImageMagick delegate ran the proof as www-data, with no attachment click needed. The researchers also confirmed command execution in the Roundcube thumbnail path shipped with Plesk Obsidian (reported to WebPros); a Roundcube-related entry ran as uid=995(roundcube_sysuser) in 5/5 direct component trials.

WordPress is a large part of the list. Core's upload path exposed the renderer to Author+ users and to any Contributor granted upload_files, and public upload fields in multiple plugins required no WordPress login. The index lists unauthenticated remote command execution through a public registration widget with an upload field, and through a public PDF form that stores files in the Media Library; both were reported to the plugin teams. Other confirmed routes include a configured document inbox that imported and rendered an external email attachment, an open wiki's upload and resize path using its optional ImageMagick backend, and MediaWiki's PdfHandler on a wiki configured for anonymous PDF uploads (reported to Wikimedia Security). A preview worker was also compromised through an authenticated upload or an upload-share capability. Separately, a signed-out request for an attacker-hosted file reached Ghostscript in Google's document renderer; the researchers sent Google the production proof, and Google fixed the path before the public case study.

Only the first ten entries in the evidence index record Upload2Shell execution. Of the rest, Gradio records a live HTTP-to-Ghostscript handoff, and the remaining entries only map application code to image-processing sinks. The index was last updated on 18 November 2026.

On the fix side, the team filed the Type 1 loader flaw upstream as Artifex Bug 709684, and Artifex released the fix. Ghostscript 10.08.0 fixes Upload2Shell; it entered Debian unstable first. Debian backported the upstream change into its security package: it published a first stable-security update after the report, and the current fixed Debian 13 build, 10.05.1~dfsg-1+deb13u3, followed in October. Ubuntu released fixed Ghostscript packages for seven supported releases on 21 October 2026 (USN-8949-1, covering Ubuntu Pro and Legacy branches too), and its notice described the font-loader finding before the CVE number was assigned. Application teams closed routes as well: WordPress fixed the Author+ upload path under CVE-2026-65640 (affected: 7.0.0 to 7.0.3, 6.9.0 to 6.9.6, and earlier branches in the advisory), and Roundcube restricted unsafe attachment image types before ImageMagick conversion under CVE-2026-114727.

The researchers say they found several other Ghostscript issues with lower or comparable impact and reported them upstream. Some of those, including a production document-processing finding and the Dropbox and redacted-service cases, belong to separate case studies. They expect the security community to find more software that reaches this vulnerability through uploads, thumbnails, print jobs and document imports, and say product-specific posts and proofs will be linked as they appear.

Key facts

  • Upload2Shell (CVE-2026-125396) is a use-after-free in Ghostscript's Type 1 font loader that lets a crafted document cross the -dSAFER sandbox and run attacker-chosen commands as the rendering process.
  • Confirmed routes include an anonymous IPP print job to a shared CUPS queue on Debian 13 (command ran as lp), thumbnailed email attachments through an ImageMagick delegate (www-data), and WordPress, Roundcube and MediaWiki upload paths.
  • Ghostscript 10.08.0 fixes the flaw, which was filed upstream as Artifex Bug 709684; Debian 13 has 10.05.1~dfsg-1+deb13u3, and Ubuntu shipped fixed packages for seven releases on 21 October 2026.
  • WordPress fixed its Author+ upload path under CVE-2026-65640 and Roundcube restricted unsafe attachment image types under CVE-2026-114727; Google fixed its affected document path before the public case study.
  • Only the first ten evidence-index entries record execution; the rest are traced routes into image-processing code.

Why it matters

Ghostscript is a single interpreter hidden behind many file-handling features, so one sandbox escape reaches print servers, webmail thumbnails, CMS uploads and document previews at once. The researchers describe it as a single interpreter surfacing behind very different file-processing features. The -dSAFER mode is the boundary meant to contain untrusted documents, and this bug is a way across it. The same pattern, files named .png or .jpg still reaching Ghostscript through image conversion, means an upload field that looks like it accepts only images may still feed the interpreter.

Who it affects

Anyone running Ghostscript on a path that renders files from outsiders. The write-up names Debian 13 systems with CUPS and a shared queue, WordPress (7.0.0 to 7.0.3, 6.9.0 to 6.9.6 and earlier branches in the advisory, where Author+ users or Contributors with upload_files can reach the renderer), Roundcube, the Roundcube thumbnail path in Plesk Obsidian, MediaWiki installations with PdfHandler or the ImageMagick backend, WordPress plugins with public upload fields, and document inbox and preview worker setups. Ubuntu users on any of seven supported releases, including Pro and Legacy branches, are covered by the fixed packages.

How to use it

This is a patching story. Update Ghostscript to 10.08.0, or take your distribution's fix: Debian 13 security build 10.05.1~dfsg-1+deb13u3, or the Ubuntu packages from USN-8949-1. Update WordPress to a release carrying the CVE-2026-65640 fix and Roundcube to a version with the CVE-2026-114727 change. The researchers say the technical write-up lists distribution package versions. Then check where your own stack passes uploads, thumbnails, print jobs or document imports to Ghostscript, directly or through ImageMagick or Pillow.

How solid is it

The write-up comes from the pwn.ai researchers, who do not name individual authors in the text, and it is a vendor-style public record rather than an independent review. It is detailed on access conditions, observed user IDs and software versions, and it ties the root to a filed upstream bug (Artifex Bug 709684), an upstream fix, a CVE number and downstream notices from Ubuntu, Debian, WordPress and Roundcube. The proof strength varies: the Debian CUPS entry is one remote run plus 20/20 local conversions, and the Roundcube-related entry ran in 5/5 direct component trials. Only the first ten index entries record execution.

Risks and caveats

The page gives no CVSS score or severity rating for CVE-2026-125396 and includes no exploit code or technical detail of the use-after-free beyond one sentence. It does not mention exploitation in the wild. The Debian entry rests on one remote run, and the page does not claim every CUPS install is affected by default. Entries after the first ten are traced routes, not confirmed exploitation. The researchers warn that another print filter, thumbnailer or document preview may be the next route into the interpreter, and that more affected software is likely to turn up. Several product-specific posts, proofs and vendor responses are still to come.

“Another print filter, thumbnailer, or document preview may be the next route into the interpreter.”

— pwn.ai, Upload2Shell public record