As reported by The Hacker News, researchers at pwn.ai demonstrated that a now-patched use-after-free in Ghostscript's font-loading code (CVE-2026-125396, CVSS 8.5) can disable the -dSAFER sandbox and execute arbitrary commands on the host. The vulnerability was fixed by Artifext in Ghostscript 10.08.0 on September 8, 2026; a separate WordPress Core upload path was closed under CVE-2026-65640 in version 7.0.4 on August 12. No active exploitation has been reported.
Vulnerability Details
| Identifier | CVE-2026-125396 |
|---|---|
| CVSS | 8.5 (High) |
| Vendor / Product | Artifex / Ghostscript |
| Root Cause | Use-after-free in font loading path; enables disabling of -dSAFER |
| Patched Version | 10.08.0 (Sept 8, 2026) |
| Related CVE | CVE-2026-65640 — WordPress Core 7.0.4 (Aug 12, 2026) |
| In-the-wild Exploitation | None reported |
| Network-Reachable Paths Demonstrated | Anonymous print jobs (Debian 13 CUPS), Roundcube webmail attachment preview, WordPress Forminator & Essential Addons for Elementor upload forms, WordPress Core (Author+ role) |
Why This Matters More Than the CVSS Suggests
The headline number is 8.5, but the real exposure is structural. Ghostscript is rarely invoked directly by application code — it is invoked transitively by ImageMagick, Pillow, libvips, Qt image plugins, and a long tail of document-conversion tooling whenever PostScript or EPS content needs rasterizing. That means most organizations do not know they run Ghostscript at all, and file-extension allowlisting ("we only accept .png and .jpg") provides no protection: the libraries inspect content, not names.
This is the recurring pattern that has haunted Ghostscript for over a decade. -dSAFER has been bypassed repeatedly — CVE-2018-16509, CVE-2019-6116, and now CVE-2026-125396 — because the sandbox lives inside the same process that interprets attacker-controlled input. Artifex's own developer described the vulnerable code path as "an ancient piece of code well known to be a vulnerability, but difficult to eradicate." When a vendor tells you the fix is a long-term migration rather than a single patch, defenders should treat the interpreter itself as untrusted by default.
The lesson is not "patch Ghostscript." It is "stop assuming the library that renders user-supplied documents can be made safe by a flag inside that same library."
Who Is Most Exposed
Shield53 Recommendations
Immediate Actions
- Patch Ghostscript to 10.08.0 or later on every host that runs it — including build workers, CI runners, and container base images. Verify with
gs --version. - Inventory transitive callers. Run
ldd/ dependency checks against ImageMagick, Pillow, libvips, poppler, and any Qt-based tooling. If any link againstlibgs, assume exposure. - Confirm WordPress Core is on 7.0.4+ and audit Forminator / Essential Addons for Elementor installations — these are high-visibility plugin paths.
- Disable PostScript/EPS handling where unused. In ImageMagick, enforce a restrictive
policy.xmlthat disables PS/EPS/XPS delegates. In Ghostscript itself, prefer-dSAFERplus external sandboxing rather than-dSAFERalone.
Structural Hardening
- Run renderers in a syscall sandbox. seccomp-BPF, systemd
ProtectSystem=/PrivateDevices=, or gVisor-style namespaces.-dSAFERis defense-in-depth, not the primary control. - Content-type sniff before processing. Reject files whose magic bytes indicate PostScript/EPS regardless of extension, before they reach any rasterizer.
- Treat the rendering worker as untrusted. Low-privilege account, separate filesystem namespace, no network egress, time-boxed execution.
- Add Ghostscript to your SBOM and continuous-scan policy. It is one of the most commonly shadow-IT dependencies in Linux stacks and is routinely missed by application-level inventories.
Artifux did the right thing by patching promptly and being candid about the technical debt underneath. The burden now shifts to defenders: a single gs binary on a shared host can turn a thumbnail request into a foothold, and the library that calls it will not tell you it did.