DKDKCISSP
PolicyINCIDENT

Researchers Demonstrate Ghostscript Sandbox-Escape RCE via Crafted File Uploads in Popular Apps

A flaw in Ghostscript allows crafted files to escape security measures and execute commands on servers, affecting multiple applications.

DKCISSP News Desk22 Nov 2026, 10:33 am2 min read
Researchers Demonstrate Ghostscript Sandbox-Escape RCE via Crafted File Uploads in Popular Apps
Image courtesy of The Hacker News. Original report

Researchers from pwn.ai disclosed a vulnerability in Ghostscript that enables crafted file uploads to bypass security sandboxes, potentially allowing remote command execution on servers. This flaw, identified as CVE-2026-125396, was patched on September 8, but the implications for security remain significant.

The vulnerability in Ghostscript, an interpreter widely used on Linux servers for converting PDFs and images, allows a crafted file to escape the program's security sandbox. This flaw can lead to remote command execution on servers that process these files. The security firm pwn.ai demonstrated that common applications, including those with upload and print features, could be exploited to deliver such crafted files.

The exploit works by leveraging a use-after-free bug in Ghostscript's font loading process. A crafted document can manipulate the checks in the sandbox mode, known as -dSAFER, which is designed to prevent documents from executing commands or accessing files. Once the checks are disabled, the crafted file can execute commands on the server, posing a serious security risk.

Ghostscript serves as a backend for various applications, processing files without needing direct calls from these applications. Libraries like ImageMagick and Pillow can invoke Ghostscript to render PostScript or EPS content, even if the files are named with common image extensions. For instance, functions like thumbnail generation or image cropping can initiate Ghostscript, making it vulnerable to this attack vector.

The vulnerability affects numerous applications, with pwn.ai testing about ten common ones. Notably, some of these paths allowed access without requiring user authentication, such as anonymous print jobs and public upload forms in WordPress plugins. Although WordPress Core requires user accounts to upload files, the vulnerability can still be exploited through various means, including print jobs and email attachments.

The flaw was patched by Artifex in Ghostscript version 10.08.0 on September 8. Ken Sharp, the developer responsible for the fix, described the vulnerable code as an 'ancient piece' that is well-known for its potential risks but difficult to eradicate. The vulnerability received a score of 8.5 out of 10 in its security advisory, indicating its severity.

WordPress had previously addressed a related security issue in version 7.0.4 on August 12, under a different identifier. However, both fixes are necessary to secure the application, as they address different aspects of the same vulnerability chain. Organizations must ensure they update to both versions to mitigate risks effectively.

Despite the patch, the coverage across various Linux distributions is inconsistent. Some still ship with vulnerable versions of Ghostscript or have pending fixes. Security teams should be aware that simply updating the host operating system may not be sufficient, as applications may bundle their own copies of Ghostscript that require separate updates.

What security teams should do

  • Update to Ghostscript version 10.08.0 or later.
  • Restrict print queue access to authenticated users only.
  • Limit the file types accepted by image processing applications.
DKCISSP VIEWOur take, not reported fact

What it meansA vulnerability in Ghostscript allows crafted files to bypass security and execute commands on servers, affecting multiple applications. Organizations need to act quickly to mitigate this risk.

Ask your IT team this weekWhich applications in our environment utilize Ghostscript for processing files?What steps are in place to ensure all software dependencies are updated regularly?

DecisionThe IT team will update Ghostscript and related applications, and security will verify that updates were applied.

MORE IN POLICY

More cybersecurity reporting

Critical binary-parser Flaw Enables JavaScript Injection via Malicious Parser Definitions23 Nov 2026, 6:52 pmGnuPG Warns Critical GPGME Flaw Could Expose App Data via Malicious OpenPGP Keys21 Nov 2026, 4:36 pmHandling the NIST 800-171 Rev 3 Transition20 Nov 2026, 7:30 pmCISA Urges Immediate Patching of Java4Shell Flaw That Could Allow Remote Code Execution20 Nov 2026, 3:05 pm