Cybersecurity

Ghostscript ‘Upload2Shell’ flaw let disguised image files run commands on servers, including WordPress sites. What to check now

By Nino Ray Yeh · November 23, 2026 · 8:47 am AEDT · 8 min read
Close-up of rack-mounted servers with rows of drive bays and green and blue status lights in a server room

A now-patched flaw in Ghostscript, the open-source PostScript and PDF interpreter that quietly sits behind many website thumbnail, preview and print features, could let a booby-trapped file disguised as a JPG, PNG or PDF run commands on the server that processed it. Security firm pwn.ai published its full technical write-up and a proof of concept on Saturday 21 November (US time), showing the bug, named Upload2Shell and tracked as CVE-2026-125396, reaching about ten widely used products, including WordPress, Roundcube webmail and Debian’s print server.

The good news: Artifex fixed Ghostscript in September, WordPress shipped its own mitigation in August, and no exploitation in the wild has been reported. The catch is that the fix only helps if it has reached the copy of Ghostscript your server, container or hosting provider actually uses, and several Linux distributions were still listing a pending fix this week.

What was disclosed

According to the CVE advisory published by VulnCheck on 9 November, Ghostscript before version 10.08.0 contains a bypass of its -dSAFER sandbox in a font-loading helper called .putgstringcopy. A crafted PostScript or PDF document can trigger an error, recover a privileged internal operator called .forceput through a custom error handler, and then cause a use-after-free memory bug that leads to arbitrary code execution.

Artifex released the fix in Ghostscript 10.08.0 on 8 September 2026. pwn.ai says Artifex authored the fix on 2 September, and that the CVE was only requested on 6 November and published on 9 November, more than two months after the patch shipped. The detailed write-up and proof-of-concept file followed on 21 November, and were reported by The Hacker News and Australia’s iTnews, which said it was able to replicate the proof of concept against an earlier, vulnerable Ghostscript build.

How a ‘picture’ ends up running code

PostScript is a programming language as well as a page format, so rendering a PostScript file means running a program. Ghostscript’s -dSAFER mode is meant to stop that program reading files or launching commands. Upload2Shell switches those checks off in memory while -dSAFER is still set on the command line.

The bigger lesson is how the file reaches Ghostscript in the first place. Applications often never call Ghostscript directly. Image libraries such as ImageMagick (and PHP’s Imagick binding), Pillow, libvips and a Qt plugin decide how to handle a file by looking at its contents, not its name, and can pass PostScript or EPS content on to Ghostscript when asked to make a thumbnail, crop an image or generate a preview. “Almost every application we tested with file uploads could be tricked into passing a file with a trusted extension to Ghostscript,” Paulos Yibelo of pwn.ai wrote.

Which products were shown to be reachable

pwn.ai’s impact index lists ten products in which it ran a command through the flaw, each time as the low-privilege account doing the rendering. The headline cases:

  • Debian 13 print servers (CUPS): an anonymous print job sent to a shared network queue that accepted jobs without authentication ran a command on the host as the lp user.
  • Roundcube webmail: an outside sender emailed an attachment labelled as a JPEG but containing PostScript; when the recipient simply viewed the message, the server-side thumbnail step ran the command. pwn.ai notes this needed a permissive ImageMagick delegate configuration.
  • WordPress core: on sites using Imagick and Ghostscript, a user with media upload rights (Authors and above by default) could trigger it through PDF preview generation.
  • WordPress plugins: signed-out visitors reached the same path through a public PDF upload field in Forminator configured to store files in the Media Library, and through a custom upload field in Essential Addons for Elementor’s public registration widget.
  • Others: MediaWiki with PdfHandler (only where anonymous uploads are explicitly allowed), DokuWiki with the optional ImageMagick backend, Mayan EDMS, ResourceSpace, and the Roundcube component shipped with the Plesk Obsidian hosting control panel.

pwn.ai also says it reached Google’s image and document pipeline, which Google closed on 10 November, and that separate Ghostscript bugs earned maximum bug bounties from Dropbox and other unnamed services. Those other findings are different root causes and have not yet been published. Asked about the total payout, Yibelo told iTnews: “I can’t say the exact amount but it’s in the low six figs”.

Patch status: fixed upstream, uneven downstream

  • Ghostscript: fixed in 10.08.0 (patch commit). Distributions often backport the fix while keeping an older version number, so the version string alone can mislead.
  • WordPress: WordPress 7.0.4, released 12 August, fixed “Authenticated Author+ remote code execution via malicious file upload on sites that use Imagick and Ghostscript” (CVE-2026-65640). The advisory says the fix was backported to all branches back to 4.7. pwn.ai’s plugin tests were run on WordPress 7.0.2, before that mitigation, and it hasn’t said whether the core fix alone blocks the plugin routes, so it is safest to update both WordPress and the server’s Ghostscript.
  • Ubuntu: USN-8949-1 (21 October) shipped fixed packages for seven releases; it predates the CVE, so it describes the bug without the number.
  • Debian: the security tracker now lists fixed packages for Trixie (DSA-6516-1), Forky and unstable, and a fixed Bookworm security build via DLA-4914-1, although the Bookworm main archive version is still marked vulnerable. pwn.ai had reported Bookworm as vulnerable as of 12 November.
  • Amazon Linux: Amazon’s CVE page still lists Ghostscript on Amazon Linux 2, 2023 and the 2027 Preview as “Pending Fix”.
  • SUSE: SUSE’s page rates the issue important with an overall state of “Pending”; fixed packages exist for openSUSE Tumbleweed, while several enterprise lines were still in progress when pwn.ai checked.

Severity scores vary because they measure different things. VulnCheck scores the Ghostscript bug 8.5 under CVSS 4.0 and Amazon 7.8 under CVSS 3.1, both using a local attack vector, because Ghostscript itself only processes a file it is handed. WordPress’s separate advisory uses a network attack vector, which works out to 8.8 under CVSS 3.0. pwn.ai’s point is that in real deployments, uploads, email and print queues turn a ‘local’ interpreter bug into a remotely reachable one.

The AI angle, and why this bug class keeps coming back

pwn.ai says the flaw was found by an AI model it names as GPT 5.6 Sol, working with Yibelo. That is the researchers’ own account and has not been independently verified, but it fits a wider trend of AI-assisted vulnerability discovery we saw with the Java4Shell disclosure last week.

The bug also belongs to a family of Ghostscript sandbox escapes that has recurred for years; iTnews notes Artifex fixed a related flaw in the same font-handling file in 2018. Artifex’s first patch adds operand checks, and a follow-up moves the helper into C so it no longer relies on .forceput. Artifex developer Ken Sharp, quoted by pwn.ai from the bug report, put the difficulty plainly: “it isn’t easy to undo 30 years worth of assumptions in the code.” The Hacker News reports he called the step “an ancient piece of code well known to be a vulnerability, but difficult to eradicate”.

What Australian site owners and IT teams should check

  • Update WordPress to 7.0.4 or the matching backport on your branch, if automatic minor updates haven’t already done it. In WordPress, Tools → Site Health → Info → Media Handling shows whether Imagick is in use and which Ghostscript version the server reports.
  • Ask your host whether the server’s Ghostscript package includes the CVE-2026-125396 fix (10.08.0 or a distribution backport). On shared hosting you usually can’t patch this yourself.
  • Review public upload forms in plugins such as Forminator and Essential Addons for Elementor, especially any that save visitor uploads to the Media Library.
  • Rebuild containers and app bundles. Updating the host operating system does not update a separate copy of Ghostscript inside a container image or bundled application.
  • Lock down print queues so network print jobs need authentication, and tighten ImageMagick policies so PostScript, EPS and PDF are only processed where genuinely needed.
  • Mind the clock. The Australian Signals Directorate’s Essential Eight maturity model says patches for vulnerabilities in online services should be applied within 48 hours of release “when vulnerabilities are assessed as critical by vendors or when working exploits exist”, and within two weeks otherwise. The fixes here are months old, so any internet-facing system still running a vulnerable build is already well outside either window.

If your site has had a recent WordPress security scare, our earlier explainer on the PHP2Shell flaw and how to check a WordPress host covers the same basic habit: know which software versions your host is really running underneath WordPress.

Our view (analysis)

Upload2Shell is less about one font-loader bug than about invisible dependencies. A contact form, a webmail preview or a shared office printer can hand an attacker’s file to a decades-old interpreter that never appeared in anyone’s security review. The fix has been available since September, but the public write-up and proof of concept now give attackers a detailed map, and pwn.ai says more case studies are coming. For most small Australian businesses on managed WordPress hosting the practical step is simple: confirm WordPress is current and get a straight answer from your host about Ghostscript.

What we don’t know yet

  • Whether anyone has exploited Upload2Shell in the wild. None has been reported by pwn.ai, iTnews or The Hacker News.
  • Whether current Red Hat, Rocky Linux, AlmaLinux, Oracle Linux or stable Fedora packages contain the fix; pwn.ai says it could not establish this.
  • Which other services were affected by the separate Ghostscript bugs pwn.ai reported; those case studies are not yet published.

Sources: pwn.ai research and impact index, VulnCheck CVE advisory, Ghostscript release notes, WordPress 7.0.4 release and advisory, Ubuntu, Debian, Amazon Linux, SUSE, iTnews, The Hacker News, ASD Essential Eight.

Photo: NOIRLab/NSF/AURA/T. Slovinský via Wikimedia Commons, CC BY 4.0 (resized). Generic server room photo; not connected to the products named.

Keep exploring

Read next

More stories worth your time from The Tech Boom.

Explore all tech stories
Share this story

Topics

Share with