Does your system let users upload PDFs, images or scanned documents, then generate previews, crop pictures or run OCR? If so, a Ghostscript process may be running behind the scenes that your developers never call directly. The Ghostscript vulnerability CVE-2026-125396 has just been demonstrated: a crafted file can escape the sandbox and run commands on the server.

Why a harmless-looking image can still wake Ghostscript

Ghostscript is the interpreter many Linux servers use to convert PDF, PostScript and image files. According to The Hacker News report of 22 November 2026, image and document libraries such as ImageMagick, Pillow, libvips or Qt plugins can hand PostScript or EPS content to Ghostscript for rendering, even when the file is named .png, .jpg or .pdf.

So a routine action like generating a thumbnail can start the interpreter. The exact path depends on the libraries your application uses, which means reading your own code is not enough to declare yourself safe.

Where the bug sits and what was actually shown

The report describes a use-after-free in Ghostscript's font-loading code. A crafted document abuses it to switch off the checks of -dSAFER, the sandbox meant to stop a document from running commands or touching files. The CVE is scored 8.5 out of 10.

Security firm pwn.ai fed such a file through about ten popular applications and ran a command on the server each time, as the low-privilege account doing the rendering. Several paths needed no login: an anonymous print job to a shared Debian 13 queue, an email attachment that Roundcube processed as soon as the recipient opened the message, and public upload forms in the WordPress plugins Forminator and Essential Addons for Elementor. WordPress core needed an account that can upload files, which Authors and above have by default.

The CVE is classed as a local flaw, yet the tests reached Ghostscript from the network through print jobs, email and web uploads. No attacks in the wild have been reported so far.

The patch has existed since September, but may not have reached your machines

Artifex, which develops Ghostscript, fixed the bug in version 10.08.0 on 8 September 2026. WordPress closed its own upload path in 7.0.4 on 12 August under a separate identifier, CVE-2026-65640. The two fixes cover different points of the same chain, so updating one does not replace the other.

The easiest gap to miss is a copy of Ghostscript bundled in a container or application. Updating the host operating system does not touch it, so a document worker can keep running old code. According to the firm's survey last week, Debian 12 was listed as vulnerable, while Amazon Linux and some SUSE lines had fixes pending or in progress. That list records package status, not an attack tested on each system.

What to check on your own systems

Your engineering team can work through this in order.

  1. Find every place Ghostscript can be called. Look at features that accept external files: customer document uploads, previews, OCR, PDF-to-image conversion, print queues, email attachments.
  2. Check the version on each server. You need 10.08.0 or later, or a distro package with the fix backported.
  3. Check inside every Docker image, since each one may carry its own copy.
  4. If you use ImageMagick, review the coder policy currently applied.
  5. Review the permissions of the account that runs your document workers.
# Ubuntu / Debian: version and installed packages
gs --version
dpkg -l | grep -i ghostscript
apt-cache policy ghostscript

# Inside a container (replace with your image name)
docker run --rm --entrypoint gs your-worker-image --version

# ImageMagick 7: show the active policy
magick -list policy

The second command only works if the image contains gs; if it reports not found, try docker run --rm --entrypoint sh your-worker-image -c "dpkg -l | grep -i ghostscript". Note that on Ubuntu and Debian a package version number can be lower than 10.08.0 and still be patched through a backport, so compare against your distribution's security notice instead of comparing numbers alone.

Reducing risk if you cannot update today

The report suggests three mitigations worth doing right away. First, require authentication on print queues. Second, limit the file types your image processor accepts, for example allowing only PDF, JPEG and PNG after checking real content rather than trusting the extension. Third, use system-level controls: in one test, an AppArmor profile stopped the compromised interpreter from starting a shell.

With ImageMagick, a common approach is to disable the PS, EPS, PDF and XPS coders in policy.xml if your application does not need them. Test on staging first, because this will break any feature that genuinely has to read PDFs.

Treat digitised documents as untrusted input

The wider lesson: every file from outside, including customer records and scanned documents, is untrusted input. Run conversion in a separate low-privilege container with no secrets and no database connection. This echoes our earlier article on API keys leaked in Docker Hub images exploited within 8 seconds: a compromised worker should be able to reach almost nothing.

The same inventory mindset applies to server-level flaws, as in our piece on the 10-year-old NGINX HTTP/2 vulnerability. And if your documents contain personal data, see how AI Masking hides sensitive information before files move into later processing steps.

What to do today: list the features that accept files, run the three checks above on each server and image, and schedule updates wherever an old copy remains.

References

  • The Hacker News, "Researchers Demonstrate Ghostscript Sandbox-Escape RCE via Crafted File Uploads in Popular Apps", 22 November 2026: https://thehackernews.com/2026/11/researchers-demonstrate-ghostscript.html