Sunday, 22 November 2026

Upload2Shell Ghostscript flaw reaches WordPress, Roundcube, CUPS

A Ghostscript bug fixed in 10.08.0 let researchers run commands through WordPress uploads, email thumbnails and network print jobs.

Key points

  • Ghostscript before 10.08.0 can be tricked into running commands despite its safe mode.
  • WordPress 7.0.4 carries a fix, backported to branches back to 4.7.
  • Check your distribution's patch status, since fixes are often backported to older versions.

A flaw in Ghostscript, the tool many servers use to turn PDFs and PostScript files into previews, thumbnails and print output, let security researchers run commands on a WordPress site, a Roundcube mail server and a Linux print server. Anyone who runs such a server should check that Ghostscript has been updated.

Researchers call the bug Upload2Shell, and its CVE number is CVE-2026-125396. Every Ghostscript release older than 10.08.0 is affected, and that release carries the repair. VulnCheck’s record rates it 8.5 out of 10 on the CVSS 4.0 scale and credits Paulos Yibelo and pwn.ai, along with Ken Sharp, for it. The researchers’ work is described as demonstrations, not attacks seen in the wild.

Ghostscript has a restricted mode, -dSAFER, meant to stop a document’s code from touching the system. The CVE record says a font-handling routine calls a privileged operator without checking the type of data it receives. A crafted PostScript or PDF file can trigger an error, get that operator back through a custom error handler, and then abuse a use-after-free memory fault to run arbitrary code.

The server does not need to expose Ghostscript itself, because other software hands it files. WordPress is one route: a related vulnerability, tracked separately as CVE-2026-65640, affects sites running Imagick and Ghostscript. A user with the Author role or above can upload a crafted PostScript file and achieve remote code execution. WordPress 7.0.4 contains the fix, with security updates also provided for supported older branches dating back to 4.7. Pwn.ai is credited with privately reporting the issue.

The researchers also reported that Roundcube 1.7.2, affected by a separately tracked issue (CVE-2026-114727), could be reached by a plain email whose attachment was thumbnailed on the server. Debian 13 CUPS print queue open on the network could be reached by a print job with no login. In each case the commands ran with the service’s own limited account, not as root.

Distributions often patch an older Ghostscript instead of moving to 10.08.0, so the version number alone does not tell you whether a server is safe. Debian 13 first shipped the fix in 10.05.1~dfsg-1+deb13u2. Administrators should check their vendor’s status for CVE-2026-125396 and confirm that containers and bundled applications do not carry their own old copy. Fixes in WordPress or Roundcube should not be treated as substitutes for patching Ghostscript itself.

This is why a Ghostscript bug matters to people who never installed Ghostscript. PostScript is a programming language for describing pages, so rendering such a file means running instructions that come from the file itself. Sites that accept uploads, mail servers that show attachment previews and print servers that convert documents all do this work in the background, and a hole in the renderer turns each of them into an entry point for whoever can send a file.

For WordPress sites, update to the latest security release and review any public forms that send uploads into the Media Library. Administrators should also check Ghostscript independently, as updating WordPress does not necessarily fix the underlying renderer. If updates must wait, restrict ImageMagick from processing untrusted PostScript and PDF files through its security policy, disable unnecessary automatic previews, and require authentication for shared print queues.

TPRO Team

The Tech Prolonged newsroom desk. Stories under this byline cover AI, the web and general tech, and are reviewed by our editors before publishing.