Ghostscript CVE-2026-125396 Enables Server Command Execution
A critical use-after-free vulnerability in Ghostscript's font loader, patched in September 2026, allows attackers to execute commands on servers via crafted files uploaded to common applications. No active exploitation has been reported.

A now-patched flaw in Ghostscript allows a crafted file to escape its security sandbox and run commands on the server. Tracked as CVE-2026-125396 with a severity score of 8.5, the vulnerability is a use-after-free in the software's Type 1 font loader. Security firm pwn.ai demonstrated that ordinary upload, preview, and print features in about ten common applications could be tricked into feeding it a crafted file.
The underlying bug allows a crafted document to switch off checks in -dSAFER, the sandbox designed to stop documents from running commands or reaching files. The firm demonstrated the result by feeding such a document through applications and watching a command run on the server each time, executed as the low-privilege account that does the rendering. Several attack paths required no login. These included an anonymous print job to a shared Debian 13 queue, an emailed attachment that Roundcube webmail processed when the recipient opened the message, and public upload forms in the WordPress plugins Forminator and Essential Addons for Elementor.
The vulnerability affects Ghostscript versions before 10.08.0. It enables command execution on servers processing file uploads via print jobs, email attachments, and web upload forms. Applications including ImageMagick, Pillow, libvips, and Qt plugins can trigger Ghostscript when processing files with extensions like .pdf or .png. Simply storing a file is not enough; a preview or conversion step is required to trigger the flaw.
Fix status and distribution coverage
Artifex, which develops Ghostscript, fixed the flaw in version 10.08.0 on September 8, 2026. The developer is moving the vulnerable internal step into safer code. Ken Sharp of Artifex described the affected component as "an ancient piece of code well known to be a vulnerability, but difficult to eradicate."
Coverage across Linux distributions is uneven. Updating the host operating system does not update a separate copy of Ghostscript bundled inside a container image or an application. This leaves systems vulnerable until the specific renderer is updated. As of last week, several distributions still shipped a vulnerable Ghostscript or had a fix pending.
| Distribution | Status |
|---|---|
| Debian 12 (Bookworm) | 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. Debian's security tracker confirms the fix is in Bookworm's security branch from version 10.0.0~dfsg-11+deb12u9.
Mitigation and application context
While updates are essential, attackers can exploit the flaw via print queues, email, and web forms without authentication in some cases. WordPress had already closed its own upload path in version 7.0.4 on August 12 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.
System controls help too. In one test, an AppArmor profile stopped the compromised interpreter from starting a shell. Until the renderer is updated, exposure can be reduced by requiring authentication on print queues and by limiting which file types an image processor accepts. Operators are advised to update Ghostscript and ImageMagick and run preview processes with minimal privileges.
One published proof-of-concept file shows only the core memory trick. It changes a value inside the running interpreter and sets it back, without running a shell command. On the patched 10.08.0 build, it fails before that point. The firm's broader research extended to production services. Google fixed the affected path last week. Reports of similar problems at Dropbox and other unnamed services concern separate Ghostscript bugs, not CVE-2026-125396.
Applications including InvocationAI, AUTOMATIC1111, and ComfyUI use image-handling paths that may invoke Ghostscript. Imageio, scikit-image, and Qt's EPS plugin are also potential triggers. PHP GD and OpenCV do not invoke Ghostscript for tested files. Users should avoid uploading PDFs or images from unknown sources to online tools. Operators should update Ghostscript and ImageMagick while requiring authentication on print queues and restricting file type processing.





