Researchers Demonstrate Ghostscript Sandbox-Escape RCE via Crafted File Uploads in Popular Apps
A routine feature such as creating a thumbnail, cropping an image, previewing a document, or printing can start Ghostscript behind the scenes. If a crafted file reaches that interpreter, it can turn a normal file-processing step into command execution on the server. This matters because an attacker may only need a way to submit or deliver a file. Image and document libraries such as ImageMagick, Pillow, libvips, or a Qt plugin can pass PostScript or EPS content to Ghostscript. The file may even have a familiar extension such as .png, .jpg, or .pdf. The flaw is a use-after-free in Ghostscript's font-loading code; the crafted document uses it to switch off checks in the -dSAFER sandbox. Pwn.ai demonstrated commands running through about ten application paths, always as the low-privilege account used for rendering. Some tested paths required no login, including shared print queues, email processing, and public upload forms. Ghostscript fixed the flaw in version 10.08.0, but the relevant renderer must actually be updated.
How could a crafted file sent through an upload, preview, or print feature make a server run commands?
A routine feature such as creating a thumbnail, cropping an image, previewing a document, or printing can start Ghostscript behind the scenes. If a crafted file reaches that interpreter, it can turn a normal file-processing step into command execution on the server. This matters because an attacker may only need a way to submit or deliver a file.
Image and document libraries such as ImageMagick, Pillow, libvips, or a Qt plugin can pass PostScript or EPS content to Ghostscript. The file may even have a familiar extension such as .png, .jpg, or .pdf. The flaw is a use-after-free in Ghostscript's font-loading code; the crafted document uses it to switch off checks in the -dSAFER sandbox.
Pwn.ai demonstrated commands running through about ten application paths, always as the low-privilege account used for rendering. Some tested paths required no login, including shared print queues, email processing, and public upload forms. Ghostscript fixed the flaw in version 10.08.0, but the relevant renderer must actually be updated.
What is Ghostscript, and why might an app use it without calling it directly?
Ghostscript is an interpreter used by many Linux servers to convert uploaded PDFs, PostScript files, and images into other formats. It matters because an application may rely on it as part of an ordinary file-processing task, giving a crafted document a route to the server-side interpreter.
The application does not have to call Ghostscript directly. Libraries such as ImageMagick, Pillow, libvips, or a Qt plugin may hand PostScript or EPS content to it for rendering. That can happen during routine work such as making a thumbnail or cropping a picture. Even a file named .png, .jpg, or .pdf may contain content that gets sent to Ghostscript.
The exact route depends on the libraries an application uses, so simply checking whether its code calls Ghostscript may miss exposure. Pwn.ai tested about ten application paths. Artifex fixed the flaw in Ghostscript version 10.08.0, but a fix helps only if it reaches the copy of the interpreter that actually processes files.
How many application paths did researchers test, and which kinds worked without a login?
Pwn.ai reported testing about ten application paths that could pass a crafted file to Ghostscript. The demonstrations matter because they included routine features such as uploads, previews, and printing, rather than requiring an application to invoke Ghostscript directly.
Several tested paths needed no login. These included an anonymous print job sent to a shared Debian 13 queue, an attachment processed by Roundcube webmail when the recipient opened the message, and public upload forms in the WordPress plugins Forminator and Essential Addons for Elementor. WordPress Core was different: its tested path required a file-upload-capable account, which Authors and higher roles have by default.
The tests show network routes to Ghostscript through print jobs, email, and web uploads, despite the CVE being classified as a local flaw. The article refers readers to the firm's impact index for tested versions and access requirements. It does not give a precise total beyond about ten, and the list of paths is not a claim that every application is vulnerable.
What is the -dSAFER sandbox supposed to prevent, and what does escaping it allow?
Ghostscript's -dSAFER setting is a security sandbox. In the article, its purpose is to stop a document being processed from running commands or reaching files. It matters because servers may process documents supplied by users, and the sandbox is intended to limit what those documents can do.
The flaw is a use-after-free in the part of Ghostscript that loads fonts. Pwn.ai showed that a crafted document can exploit this bug to switch off checks in -dSAFER. Once those checks are bypassed, the document can lead to a command running on the server. The demonstrations ran each command as the account responsible for rendering.
This is not the same as proving that every possible action or file is accessible: the article describes commands running with low privileges, not unrestricted control. Artifex fixed the flaw in Ghostscript 10.08.0 on September 8. The protection only helps where that updated renderer is the one the application actually uses.
What account privileges did the researchers’ commands have, and how does that affect the possible damage?
In every demonstration described, the command ran as the low-privilege account used to render the file. This is important context: the result was command execution on the server, but the tests did not show the command running with administrator privileges.
Pwn.ai reached Ghostscript through about ten application paths. Some paths needed no login, such as an anonymous job to a shared Debian 13 print queue, an email attachment processed when opened, and public upload forms. A low-privilege account still means the file-processing service can perform commands under that account's permissions. The article does not specify which files or systems those permissions exposed in each test.
The demonstrated account level therefore limits what can be concluded about possible damage; it does not make the flaw harmless. The article also notes that an AppArmor profile stopped the compromised interpreter from starting a shell in one test. Updating the actual renderer and restricting file-processing routes can reduce exposure.
Why might updating a host or an application not fix the vulnerable Ghostscript copy that processes files?
Applications may use a separate copy of Ghostscript bundled inside a container image or within the application itself. Replacing the host operating system's package does not replace those separate copies. A document worker can therefore continue running vulnerable code after the host has been updated.
The same principle applies to an application update: it only helps if it updates or stops using the affected renderer. The article gives WordPress as a related example. WordPress had closed its own upload path in version 7.0.4, but that fix and Ghostscript's fix address different points in the same chain. One does not remove the need for the other.
Coverage among Linux distributions was uneven when the firm's survey was reported. Debian 12 was listed as vulnerable, while fixes were pending or in progress for several other listed systems. The article says the package survey did not test an attack path for each system. Administrators need to check the Ghostscript copy used by each file-processing service.
What is a use-after-free bug, and how can it let a program behave in an unintended way?
A use-after-free is a programming flaw in which code tries to use memory after that memory has been released for reuse. This general definition comes from established computing knowledge; the article identifies the Ghostscript flaw as a use-after-free but does not explain the memory-management details.
When a program uses a stale reference, it may read or change data that no longer belongs to the object it expects. The result can be unintended behavior. In this case, the flaw is in Ghostscript's font-loading code, and pwn.ai showed that a crafted document could use it to switch off checks in the -dSAFER sandbox. The sandbox is meant to stop documents from running commands or reaching files.
The demonstrated consequence was a command running on the server as the low-privilege rendering account. Artifex fixed the issue in Ghostscript 10.08.0 and described the vulnerable internal step as old code that was difficult to eradicate. A proof-of-concept described in the analysis showed only the memory trick, not a shell command or access to host files.
This brief was written by AI from the original reporting and checked by other models. Names, figures and quotes come from the source; read it for full context.
Read more in the JupiteX app
Pulse is free. New stories every 4 hours, each one broken into the questions that explain it.
Or read more news on the web