The short version
- The flaw. CVE-2026-125396 is a use-after-free in Ghostscript's font-loading code. A crafted document uses it to switch off the checks in -dSAFER, the sandbox meant to stop a document running commands or reading files, and is scored 8.5 out of 10.
- The reach. pwn.ai ran a command on the server through about ten applications, each time as the low-privilege account that does the rendering. Some paths needed no login, including an anonymous print job, an emailed attachment processed by Roundcube webmail and public upload forms in two WordPress plugins.
- The fixes. Artifex released Ghostscript 10.08.0 on 8 September. WordPress had already closed its own upload path in version 7.0.4 on 12 August under CVE-2026-65640; the two fixes cover different points in the same chain, so both are needed.
- The patching gap. Updating the host operating system does not update a copy of Ghostscript bundled inside a container image or an application. Distribution coverage is uneven and several packages were still vulnerable or awaiting a fix.
- The exploitation status. There have been no reports of the flaw being used in attacks. The published proof-of-concept shows only the core memory trick, without running a shell command or touching host files, and fails on the patched build.
Timeline
| Date | Event |
|---|---|
| 12 August | WordPress releases version 7.0.4, closing its own upload path under CVE-2026-65640. |
| 8 September | Artifex releases Ghostscript 10.08.0 containing the fix for CVE-2026-125396. |
| November | CVE-2026-125396 is published and scored 8.5 out of 10. |
How the flaw works
Ghostscript converts PDFs, PostScript files and images on many Linux servers, often without the application calling it directly. Libraries such as ImageMagick, Pillow, libvips and Qt plugins pass PostScript or EPS content to it even when a file is named .png, .jpg or .pdf, so a routine thumbnail or crop can start the interpreter.
The bug is a use-after-free, meaning memory is reused after it has been freed, in the font-loading code. A crafted document uses it to switch off the checks in -dSAFER, the sandbox meant to stop a document running commands or reaching files. pwn.ai ran a command on the server in about ten applications, each time as the low-privilege account that does the rendering.
The CVE is classified as a local flaw, but the firm reached Ghostscript over the network through print jobs, email and web uploads. Several paths needed no login: an anonymous print job to a shared Debian 13 queue, an attachment Roundcube webmail processed when the message was opened, and public upload forms in the WordPress plugins Forminator and Essential Addons for Elementor. WordPress Core required an account that can upload files, which Authors and higher roles have by default.
Who is exposed
Any application that renders untrusted documents through Ghostscript is in scope, whether or not it names the interpreter. The firm's impact index sets out the tested version and the access each application needs.
Updating the host operating system does not update a copy bundled inside a container image or an application, so a document worker can keep running old code after the host package is replaced.
Coverage across distributions is uneven. Debian 12 is listed as vulnerable; Amazon Linux 2, 2023 and 2027 Preview have a fix pending; SUSE Linux Enterprise 12 SP5 and parts of 15, and SLES 16.0 and 16.1, have fixes in progress; openSUSE Leap 16.0 and 16.1 are affected. The firm did not establish the status of Red Hat, Rocky Linux, AlmaLinux, Oracle Linux or stable Fedora.
Fixes and mitigations
Artifex fixed the flaw in Ghostscript 10.08.0 on 8 September 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.
WordPress closed its own upload path in version 7.0.4 on 12 August under CVE-2026-65640. Because the two fixes cover different points in the same chain, updating one does not remove the need for the other. Until the renderer is updated, exposure can be reduced by requiring authentication on print queues and limiting the file types an image processor accepts; in one test an AppArmor profile stopped the compromised interpreter from starting a shell.
The firm's wider research reached production services, including Google, which fixed the affected path. Its reports of similar problems at Dropbox and other unnamed services concern separate Ghostscript bugs, not this one.
What is not known yet
- Whether anyone has exploited the flaw in the wild; the firm reports no attacks.
- Which of the roughly ten tested applications still ship or call a vulnerable Ghostscript.
- Whether Red Hat, Rocky Linux, AlmaLinux, Oracle Linux and stable Fedora packages carry the fix.
- How many deployments run a bundled copy that host package updates do not reach.
- Whether the separate Ghostscript bugs reported at Dropbox and other unnamed services share this code path.
What to do
If you run Ghostscript or render uploaded documents
- Update Ghostscript to 10.08.0 or later everywhere it runs, including container images and copies bundled with applications, not just the host package.
- Check your distribution's package status against the firm's list and patch where a fix is available.
- Require authentication on print queues and restrict the file types your image processor accepts.
- Apply system controls such as an AppArmor profile that stops the interpreter starting a shell.
If you run WordPress
- Update WordPress Core to 7.0.4 or later.
- Update the Forminator and Essential Addons for Elementor plugins.
- Review which roles are allowed to upload files.
For everyone else
- Map where document rendering happens indirectly through libraries such as ImageMagick, Pillow, libvips or Qt plugins, and treat those renderers as internet-facing.
Update log
- First published.
Sources
New incident reports by email
One email a week with the reports published since the last one.
We email you about this topic only; unsubscribe any time. See our Privacy Policy.