November 22, 2026

A Crafted Upload Can Break Out of Ghostscript’s Sandbox: The Spec Sheet on CVE-2026-125396 and a Checklist for Servers That Handle Files

Researchers fed a single crafted document through about ten common applications, including webmail, print queues and WordPress upload forms, and made the Ghostscript interpreter behind them run commands. The fix has existed since September, but many systems still carry old copies. Here are the facts on one page, plus what to check.

An open rack server with exposed circuit boards and memory modules in a server closet

Ghostscript is rarely something a business chooses to run. It arrives quietly, as the engine underneath image libraries, document previewers and print servers. That is exactly why new research into a now-patched flaw deserves attention. The details below come from The Hacker News’ report on the findings by security firm pwn.ai.

The spec sheet

  • Identifier: CVE-2026-125396, scored 8.5 out of 10 in its security advisory.
  • Component: Ghostscript, the PostScript and PDF interpreter many Linux servers use to convert uploaded documents and images.
  • Bug type: a use-after-free in the code that loads fonts.
  • Effect: a crafted document switches off -dSAFER, the sandbox meant to stop documents from running commands or touching files, and then runs commands on the server as the account doing the rendering.
  • Fixed in: Ghostscript 10.08.0, released by Artifex on September 8. The CVE was published last week.
  • Exploitation in the wild: none reported.
  • Classification: a local flaw, although the researchers reached it over the network through print jobs, email and web uploads.
  • Public proof of concept: one file showing only the core memory trick; it changes and restores a value inside the interpreter, runs no shell command, and fails on 10.08.0.

How a file reaches Ghostscript without anyone asking

Applications do not have to call Ghostscript directly. Common libraries such as ImageMagick, Pillow, libvips or a Qt plugin will pass PostScript or EPS content to it for rendering, even if the file is named .png, .jpg or .pdf. Making a thumbnail or cropping an image can be enough. Which path triggers it depends on the libraries a given application uses.

Where the researchers made it work

  • No login needed: an anonymous print job sent to a shared Debian 13 print queue; an email attachment processed by Roundcube webmail when the recipient opened the message; public upload forms in the WordPress plugins Forminator and Essential Addons for Elementor.
  • Login needed: WordPress core, which required an account allowed to upload files. Authors and higher roles have that by default. WordPress closed its own path in version 7.0.4 on August 12 under a separate identifier, CVE-2026-65640, but that fix and the Ghostscript fix cover different points in the chain, so one does not replace the other.
  • In each case, the command ran as the low-privilege account that does the rendering.

Patch status the researchers found last week

  • Debian 12 (Bookworm): listed as vulnerable.
  • Amazon Linux 2, 2023 and 2027 Preview: fix pending.
  • SUSE Linux Enterprise 12 SP5, parts of 15, and Server 16.0 and 16.1: fix in progress.
  • openSUSE Leap 16.0 and 16.1: affected.
  • Red Hat, Rocky Linux, AlmaLinux, Oracle Linux and stable Fedora: not established either way.

These entries reflect package status, not a tested attack on each system.

Checklist for anything that accepts files

  • List every server and service that previews, converts, resizes or prints files from outside: websites with upload forms, webmail, print servers, document portals.
  • Find every copy of Ghostscript, not just the system package. Updating the host does not update a copy bundled inside a container image or an application.
  • Update Ghostscript to 10.08.0 or a distribution build that includes the fix, then rebuild and redeploy containers.
  • Keep WordPress core and upload-handling plugins current, and review which user accounts are allowed to upload files.
  • Until patched, require authentication on print queues and restrict which file types image processing will accept.
  • Use operating system controls; in one test, an AppArmor profile stopped the compromised interpreter from opening a shell.
  • Run rendering services under low-privilege accounts, as the tested applications did, so a successful attack reaches as little as possible.

What this means for your company

If your website takes résumés, invoices or photos, if your staff use self-hosted webmail, or if your office shares a network printer, you likely have software that hands outside files to an interpreter like this one. The risk is not that a single upload instantly takes over your business; in these tests, commands ran as a limited account. The risk is that a public form becomes a foothold. Ask whoever manages your website and servers to confirm Ghostscript is updated everywhere it lives, including inside containers and vendor appliances, and that upload features accept only the file types you actually need.

If you are not sure which of your systems process uploaded files or what software they rely on, we can help you inventory them and close the gaps. Reach out to Layer 7 Data Solutions to discuss how we’ve helped companies similar to yours.

About The Author