Upload2Shell: One Booby-Trapped Upload Can Hijack Servers Running Old Ghostscript

Laptop, laser printer and a small server rack with status lights in a dim office at night

If your business runs a WordPress site, a webmail inbox or any tool that makes thumbnails or previews of uploaded files, a newly detailed bug deserves a few minutes of your attention today. Researchers say a single crafted file, dressed up as an ordinary image or PDF, could let an attacker run commands on the server that processes it.

The flaw, nicknamed Upload2Shell and tracked as CVE-2026-125396, sits in Ghostscript, the free document engine that quietly renders PDFs and PostScript files behind many websites, mail systems and printers. Security firm pwn.ai published the full details on November 21 after months of coordinated disclosure.

A font loader with too much power

Ghostscript has a built-in sandbox, called -dSAFER, that is meant to stop documents from touching files or running programs. According to the researchers, a bug in the way it loads Type 1 fonts lets a booby-trapped document break out of that sandbox and run commands with the permissions of whatever program is doing the rendering. Debian’s security tracker and the vulnerability firm VulnCheck describe the same flaw, and VulnCheck rates it 8.5 out of 10.

The sneaky part is the delivery. Many apps hand files to Ghostscript indirectly, often through ImageMagick, so a file named .png or .jpg can still end up there. Something as routine as cropping a profile photo or previewing an email attachment can be enough.

Where the researchers made it work

pwn.ai says it confirmed command execution in several real setups, including:

  • WordPress sites using Imagick and Ghostscript, for any user allowed to upload files (Authors and above by default)
  • The Forminator and Essential Addons for Elementor plugins, where a public form with an upload field needed no login at all
  • Roundcube webmail, where simply viewing an email with a malicious attachment triggered it in the tested configuration
  • Debian 13 machines sharing a printer queue over the network, plus MediaWiki, DokuWiki and the Roundcube build bundled with Plesk

The team also says it reached Ghostscript inside Google’s document processing, which Google fixed on November 10, according to the disclosure timeline.

Patches have been out for weeks

The good news is that this isn’t a zero-day scramble. Artifex fixed the bug in Ghostscript 10.08.0 back on September 8, and a post on the oss-security mailing list confirms that release covers it. Debian and Ubuntu have shipped fixed packages. WordPress closed its own upload path in version 7.0.4 in August, with fixes for older branches such as 6.9.7, and Roundcube tightened its image resizing in versions 1.6.20 and 1.7.5.

We found no reports of attacks using Upload2Shell so far, and the researchers have not yet released working exploit code. That can change quickly now that the technical write-up is public, so the quiet window to patch is closing.

A quick checklist for site and server owners

  1. Update WordPress core and every plugin, especially form and page-builder plugins with upload fields.
  2. Ask your host or IT team which Ghostscript version your servers run. Anything older than 10.08.0, or an unpatched distribution package, needs updating.
  3. Upgrade Roundcube to 1.6.20 or 1.7.5 or later. Plesk users should check their panel for pending updates.
  4. Switch off anonymous uploads on public forms and wikis that don’t truly need them.
  5. If nothing on the server needs PDF or PostScript previews, consider removing Ghostscript entirely.

For everyone else, there’s nothing to install on your phone or laptop. This one is a job for whoever runs the websites and mail servers you rely on, and the sooner they check, the better.

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *