Ghostscript vulnerability: rows of server racks that process uploaded files
13
Views

The Ghostscript vulnerability CVE-2026-125396 lets a crafted file break out of the program’s security sandbox and run commands on the server that processes it. Ghostscript is a tool that many Linux servers use to turn uploaded PDFs, PostScript files and images into other formats, often without the app calling it directly. Security firm pwn.ai showed this week that attackers could trick ordinary upload, preview and print features in about ten popular apps into feeding it such a file. The bug is already patched and there are no reports of attacks, but updating is not as simple as it sounds.

⚡ Quick summary: Ghostscript vulnerability

  • The flaw is CVE-2026-125396 and it has a severity score of 8.5 out of 10.
  • Artifex fixed it on 8 September 2026 in Ghostscript 10.08.0.
  • A crafted file can escape the sandbox and run commands as the low-privilege account that renders files.
  • Also, researchers reached it through print jobs, email and web upload forms.
  • Nobody has reported attacks, but several Linux distributions still ship a vulnerable version or are still preparing a fix.
Ghostscript vulnerability: rows of server racks that process uploaded files
Image: Carl Lender, CC BY 2.0, via Wikimedia Commons.

What is the Ghostscript vulnerability?

Ghostscript has a safety feature called -dSAFER that should stop a document from running commands or reaching files on the server. The bug is a use-after-free in the part of Ghostscript that loads fonts. In simple words, the program keeps using a piece of memory after the program has released it, and a crafted document can abuse that to switch the safety checks off.

Once the checks are off, the document can run commands on the server. In the researchers’ tests the commands ran as the low-privilege account that does the rendering, not as an administrator. That still gives an attacker a foothold to read data or look for the next weakness.

Why this Ghostscript vulnerability is easy to reach

First, an app does not have to call Ghostscript directly. Image and document libraries such as ImageMagick, Pillow, libvips or a Qt plugin pass PostScript or EPS content to Ghostscript to render it, even when the file has a .png, .jpg or .pdf name. So a routine feature like making a thumbnail or cropping a picture can start the interpreter.

The CVE officially counts as a local flaw, but the firm’s tests reached Ghostscript from the network. Several paths needed no login at all:

  • An anonymous print job sent to a shared Debian 13 print queue.
  • An emailed attachment that Roundcube webmail processed as soon as the recipient opened the message.
  • Public upload forms in the WordPress plugins Forminator and Essential Addons for Elementor.

However, WordPress itself needed more: an account that can upload files, which Authors and higher roles have by default. WordPress had already closed its own upload path in version 7.0.4 on 12 August 2026 under a separate identifier, CVE-2026-65640. That fix and the Ghostscript fix cover different points in the same chain, so updating one does not remove the need for the other.

🧪 Interactive risk checker: does this Ghostscript vulnerability affect you?

How to fix the Ghostscript vulnerability

To fix the bug, Artifex released Ghostscript 10.08.0 on 8 September and is moving the risky internal step into safer code. The catch is that the fix only helps where it reaches the renderer your app really uses. Updating the host operating system does not update a separate copy of Ghostscript bundled inside a container image or an application, so a document worker can keep running old code after you replace the host package.

  • First, find every place Ghostscript runs, including containers and bundled copies, and update it to 10.08.0 or later.
  • Next, require a login on print queues instead of accepting anonymous jobs.
  • Also, limit which file types your image and document tools accept, and block PostScript and EPS where you do not need them.
  • Then use system controls such as AppArmor; in one test a profile stopped the compromised interpreter from starting a shell.
  • Finally, keep WordPress and its upload plugins updated, since the two fixes cover different steps.

Coverage across Linux distributions is uneven. As of last week the firm’s survey listed Debian 12 as vulnerable, fixes pending for Amazon Linux 2, 2023 and 2027 Preview, and fixes in progress for SUSE Linux Enterprise 12 SP5, parts of 15, and Enterprise Server 16.0 and 16.1. The survey listed openSUSE Leap 16.0 and 16.1 as affected. The firm did not establish whether current Red Hat, Rocky Linux, AlmaLinux, Oracle Linux or stable Fedora packages carry the fix. That list records package status, not a tested attack path for each system.

However, server bugs like this often pile up. For another recent example, read our guide to the NoisyTCP Linux kernel vulnerability.

Key takeaways from the pwn.ai research

  • CVE-2026-125396 lets a crafted file escape the Ghostscript sandbox and run commands on the server.
  • Artifex fixed it on 8 September 2026 in Ghostscript 10.08.0, and nobody has reported attacks.
  • Print jobs, email attachments and web uploads can all feed Ghostscript without your app calling it directly.
  • Updating the host may not update copies bundled inside containers or apps.
  • Limit file types, protect print queues and check your distribution’s fix status.

FAQ on the Ghostscript vulnerability

❓ What is CVE-2026-125396?

In short, it is a use-after-free bug in Ghostscript’s font loading that a crafted document can use to turn off the -dSAFER sandbox and run commands on the server.

❓ Has the Ghostscript vulnerability been used in attacks?

There have been no reports of it being used in attacks. Researchers at pwn.ai demonstrated it in about ten common apps.

❓ Which Ghostscript version fixes it?

Artifex released version 10.08.0 on 8 September 2026.

❓ Does updating WordPress fix it?

Not on its own. WordPress 7.0.4 closed its own upload path under CVE-2026-65640, but the Ghostscript fix covers a different step in the same chain.

❓ How can I reduce the risk before I update?

Require authentication on print queues, limit the file types your image processors accept, and use controls such as AppArmor.

Sources and image credit

Sources: The Hacker News. Thumbnail: Carl Lender, CC BY 2.0, via Wikimedia Commons.

Article Categories:
Information Security

Leave a Reply

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