A now-patched flaw in Ghostscriptallows a crafted file to escape the program's security sandbox and run commands on the server that processes it.
Ghostscript is the interpreter that many Linux servers use to convert uploaded PDFs, PostScript files, and images into other formats, often without the application calling it directly.
Security firm pwn.ai showed this week that ordinary upload, preview, and print features in about ten common applications could be tricked into feeding it such a file. The flaw, tracked as CVE-2026-125396, was fixed on September 8, and there have been no reports of it being used in attacks.
Getting a crafted file to Ghostscript is easy, because an application does not have to call it directly. A common image or document library such as ImageMagick, Pillow, libvips, or a Qt plugin will hand PostScript or EPS content to Ghostscript to render, even when the file is named .png, .jpg, or .pdf. A routine feature like making a thumbnail or cropping a picture can start the interpreter, and the exact path depends on the libraries the application uses.
The underlying bug is a use-after-free in the part of Ghostscript that loads fonts. A crafted document uses it to switch off the checks in -dSAFER, the sandbox that is supposed to stop the document from running commands or reaching files.
The security firm demonstrated the result by feeding such a document through about ten applications and watching a command run on the server, each time as the low-privilege account that does the rendering.
Several of those paths needed no login: an anonymous print job to a shared Debian 13 queue, an emailed attachment that Roundcube webmail processed the moment the recipient opened the message, and public upload forms in the WordPress plugins Forminator and Essential Addons for Elementor.
WordPress Core itself needed more: an account with the ability to upload files, which Authors and higher roles have by default. Although the CVE is classified as a local flaw, the firm's tests reached Ghostscript from the network via print jobs, email, and web uploads. The tested version and the access needed for each application are set out in its impact index.
Artifex, which develops Ghostscript, fixed the flaw in version 10.08.0 on September 8, and is moving the vulnerable internal step into safer code. Ken Sharp, the developer who handled the fix, called that step "an ancient piece of code well known to be a vulnerability, but difficult to eradicate" in the bug report. The CVE was published last week and is scored 8.5 out of 10 in its security advisory.
WordPress had already closed its own upload path in version 7.0.4 on August 12, under a separate identifier, CVE-2026-65640, as noted in its release notes. That fix and the Ghostscript fix cover different points in the same chain, so updating one does not remove the need for the other.
Updating the Renderer
The fix helps only where it reaches the renderer the application actually 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 the old code after the host package is replaced.
Coverage across Linux distributions is uneven. As of last week, several still shipped a vulnerable Ghostscript or had a fix pending, according to the firm's survey. The list records package status, not a tested attack path for each system:
- Debian 12 (Bookworm): listed as vulnerable
- Amazon Linux 2, 2023, and 2027 Preview: fix pending
- SUSE Linux Enterprise 12 SP5 and parts of 15: fix in progress
- SUSE Linux Enterprise Server 16.0 and 16.1: fix in progress
- openSUSE Leap 16.0 and 16.1: affected
The firm did not establish whether current Red Hat, Rocky Linux, AlmaLinux, Oracle Linux, or stable Fedora packages carry the fix.
Until the renderer is updated, the exposure can be reduced by requiring authentication on print queues and by limiting which file types an image processor accepts. System controls help too, and in one test an AppArmor profile stopped the compromised interpreter from starting a shell.
One published proof-of-concept file, described in its technical analysis, shows only the core memory trick. It changes a value inside the running interpreter and sets it back, without running a shell command or touching files on the host, and on the patched 10.08.0 build it fails before that point.
The firm's broader research extended to production services, including Google, which fixed the affected path last week. Its reports of similar problems at Dropbox and other unnamed services are separate Ghostscript bugs, not this one.
Found this article interesting? Follow us on Google News, Twitter and LinkedIn to read more exclusive content we post.