Researchers Demonstrate Ghostscript Sandbox-Escape RCE via Crafted File Uploads in Popular Apps
About 5 min read
securityaisoftwarenetworking
A critical vulnerability in the Ghostscript interpreter was patched this week after security researchers demonstrated that a specially crafted document could break out of the program’s sandbox and execute arbitrary commands on any server that processes it. The flaw, identified as CVE‑2026‑125396, was fixed in Ghostscript version 10.08.0 on September 8, and, according to the researchers, no active exploitation of the bug has been reported to date.
Ghostscript is the open‑source engine used by a wide range of Linux‑based services to convert PDFs, PostScript files and images into other formats. Because many web applications and image‑processing pipelines invoke Ghostscript indirectly through libraries such as ImageMagick, Pillow, libvips or Qt plugins, a malicious file can be fed to the interpreter without the hosting application ever calling Ghostscript directly. The researchers at the security firm pwn.ai showed that ordinary upload, preview and print features in roughly ten popular applications could be tricked into processing a crafted file that triggers the vulnerability.
The underlying defect is a use‑after‑free error in the portion of Ghostscript that loads fonts. By exploiting this memory error, an attacker can disable the –dSAFER flag, which is intended to confine the interpreter to a sandbox that blocks command execution and file system access. Once the sandbox is bypassed, the malicious document can issue system commands as the low‑privilege account that runs the rendering process. In the firm’s tests, each of the ten applications launched a command on the server after receiving the crafted file, confirming that the escape works across a variety of typical deployment scenarios.
Several of the attack paths demonstrated required no authentication at all. An anonymous print job sent to a shared Debian 13 print queue was sufficient to trigger the exploit, as was an email attachment opened in the Roundcube webmail client. Public upload forms in the WordPress plugins Forminator and Essential Addons for Elementor also allowed the malicious file to reach Ghostscript. In the case of WordPress Core, the researchers needed only a user account with file‑upload privileges—by default granted to Authors and higher‑level roles—to upload the payload. Although the CVE is classified as a local flaw, the tests proved that it can be reached from the network via print jobs, email processing, and web uploads, illustrating a broader attack surface than the classification might suggest.
Artifex, the company that maintains Ghostscript, responded to the disclosure by releasing version 10.08.0, which rewrites the vulnerable internal step into safer code. Ken Sharp, the developer who authored the fix, described the corrected component as “an ancient piece of code well known to be a vulnerability, but difficult to eradicate,” underscoring the technical debt that had accumulated around the legacy font‑loading routine. The CVE was publicly disclosed last week and received a severity rating of 8.5 out of 10 in the official security advisory, reflecting the high impact of remote code execution combined with the ease of delivering the exploit.
WordPress had already addressed a related upload issue in its own release cycle. Version 7.0.4, published on August 12, closed a separate upload path identified as CVE‑2026‑65640. That fix, however, targets a different stage in the processing chain, meaning that updating WordPress alone does not mitigate the Ghostscript vulnerability. Both patches are required to fully secure the end‑to‑end workflow: the WordPress update blocks the initial file‑acceptance vector, while the Ghostscript update hardens the rendering engine that would otherwise be invoked.
The patch’s effectiveness depends on where the vulnerable Ghostscript binary resides. Updating the host operating system’s package does not automatically replace a copy of Ghostscript that may be bundled inside a container image or embedded within an application. Consequently, a document‑processing service could continue to run the vulnerable interpreter even after the host package is upgraded. A survey conducted by pwn.ai revealed uneven coverage across Linux distributions. As of the latest check, several major distributions still ship a vulnerable version of Ghostscript or have not yet released a fix, and the firm could not confirm whether current packages for Red Hat Enterprise Linux, Rocky Linux, AlmaLinux, Oracle Linux or the stable Fedora branch include the remediation.
In the interim, administrators can reduce exposure by tightening access controls around the identified entry points. Requiring authentication for print queues, restricting the types of files accepted by image‑processing libraries, and applying mandatory access control policies such as AppArmor can block the interpreter from spawning a shell. In one of the firm’s experiments, an AppArmor profile successfully prevented the compromised Ghostscript instance from launching a command interpreter, demonstrating that host‑level confinement remains a viable defensive layer.
The researchers also released a proof‑of‑concept file that showcases the core memory manipulation technique without invoking a shell or touching host files. On the patched 10.08.0 build, the exploit fails before it can alter the interpreter’s internal state, confirming that the fix neutralizes the specific use‑after‑free path. The broader research effort extended beyond the ten test applications to include production services such as Google, which patched its own Ghostscript integration last week. Reports of similar issues at Dropbox and other unnamed services were found to involve distinct Ghostscript bugs, not the CVE‑2026‑125396 vulnerability.
Overall, the incident highlights the complex dependency chains that modern web and document services rely on, and it underscores the importance of keeping both application‑level components and underlying libraries up to date. For organizations that host image‑processing pipelines, email gateways, or print services on Linux, the immediate steps are to verify that Ghostscript version 10.08.0 or later is in use, to audit any bundled copies within containers, and to enforce stricter authentication and file‑type policies. As the security community continues to monitor the situation, the coordinated patches from Artifex and WordPress provide a clear path to remediation, but the uneven distribution of updates across Linux ecosystems means that vigilance remains essential.
A new technique called Weight2Shell has been disclosed by cybersecurity researchers, which allows artificial intelligence (AI) models to produce different behavior on different machines, eve…
Season 2: Legacy for Gears of War: E‑Day launches tomorrow, marking the franchise’s twentieth anniversary and offering a wave of new content for both veteran players and newcomers. The updat…
Hela: of Mice & Magic is set to launch on December 1, 2026 for Xbox Series X|S, and the title will be available on day one through Xbox Game Pass. The game presents an open‑world adventure i…