Ghostscript Upload2Shell (CVE-2026-125396): What Website Owners Should Check

Ghostscript Upload2Shell (CVE-2026-125396): What Website Owners Should Check

When you upload a PDF to a website and see a preview, a tool called Ghostscript may be doing the work behind the scenes. Researchers at pwn.ai have shown how a crafted file can break out of Ghostscript’s safety sandbox and run commands on the server. They call the research Upload2Shell.

A fix is available. The catch is that many people don’t know they run Ghostscript.

What happened

  • The flaw is CVE-2026-125396. A crafted document can bypass Ghostscript’s SAFER mode, which is meant to stop files from running commands.
  • It was fixed in Ghostscript 10.08.0, released on 8 September 2026. The CVE was published on 9 November.
  • VulnCheck scores it 8.5 out of 10 (CVSS 4.0). The score treats it as a local flaw, but pwn.ai reached Ghostscript remotely through uploads, email and print jobs.
  • The Hacker News reported on 22 November that there have been no reports of it being used in attacks.

pwn.ai has published a limited proof of concept that doesn’t run commands. It lists its full attack chains against applications as not published.

Who is affected

Any server that passes untrusted files to an unpatched Ghostscript, often through image tools such as ImageMagick. pwn.ai tested several setups, including:

  • WordPress with Forminator (1.55.1 tested), where a public form accepts PDF uploads saved to the Media Library
  • WordPress with Essential Addons for Elementor Lite (6.7.0 tested), where registration is on and the form has an upload field
  • Roundcube webmail, where viewing an emailed file triggers a thumbnail
  • Shared Linux print queues that accept jobs without a login

On those two WordPress setups, the attacker did not need an account. The plugins are not enough on their own. The server must also process the file with Ghostscript.

WordPress core had a separate, related issue, CVE-2026-65640. It needs an account that can upload files, plus Imagick and Ghostscript. WordPress 7.0.4 fixed it on 12 August. Updating WordPress doesn’t update Ghostscript, so you need both.

What to do

  1. Find Ghostscript. On Linux, run gs --version. On shared hosting, ask your host whether Ghostscript and Imagick are enabled, and whether CVE-2026-125396 is patched.
  2. Update it. Install 10.08.0 or later, or your Linux distribution’s security update.
  3. Check your vendor’s notice, not only the version number. Distributions often add fixes to older versions. Debian lists fixed packages for Debian 12 and 13 in its security updates. Other vendors had fixes pending when the research came out.
  4. Check containers and bundled copies. Updating the host doesn’t update a Ghostscript copy inside a container or an application.
  5. Update WordPress to 7.0.4 or later, and update every plugin.
  6. Tighten upload forms. Remove upload fields you don’t need, and accept only the file types you must have. Turn off open registration if you don’t use it.
  7. Require a login on shared print queues.

If you can’t patch yet, see our guide to protecting systems you can’t patch. For the basics, use our Linux server hardening checklist and keep tested backups.

Frequently asked questions

Is my WordPress site vulnerable? Only if your server processes uploaded files with an unpatched Ghostscript. Ask your host, and update WordPress and your plugins either way.

Are attackers using this flaw? The Hacker News reported no known attacks as of 22 November 2026. The technical details are public, so don’t wait.

My Ghostscript version is older than 10.08.0. Am I at risk? Not always. Your Linux vendor may have added the fix to an older version. Look up CVE-2026-125396 in its security notices.

Sources: The Hacker News (22 Nov 2026), pwn.ai Upload2Shell research, VulnCheck advisory (9 Nov 2026), Debian security tracker, Ghostscript release notes, WordPress 7.0.4 release post (12 Aug 2026).