A now-patched flaw in Ghostscript allows a crafted file to escape the program's security sandbox and run commands on the server that processes it.
Ghostscript is the interpreter that many Linux servers use to convert uploaded PDFs, PostScript files, and images into other formats, often without the application calling it directly.
Security firm pwn.ai showed this week that ordinary upload, preview, and print features in about ten common applications could be tricked into feeding it such a file. The flaw, tracked as CVE-2026-125396, was fixed on September 8, and there have been no reports of it being used in attacks.
Getting a crafted file to Ghostscript is easy, because an application does not have to call it directly. A common image or document library such as ImageMagick, Pillow, libvips, or a Qt plugin will hand PostScript or EPS content to Ghostscript to render, even when the file is named .png, .jpg, or .pdf. A routine feature like making a thumbnail or cropping a picture can start the interpreter, and the exact path depends on the libraries the application uses.
The underlying bug is a use-after-free in the part of Ghostscript that loads fonts. A crafted document uses it to switch off the checks in -dSAFER, the sandbox that is supposed to stop the document from running commands or reaching files.
The security firm demonstrated the result by feeding such a document through about ten applications and watching a command run on the server, each time as the low-privilege account that does the rendering.
Source link







