Ghostscript Sandbox-Escape Flaw Let Crafted File Uploads Trigger RCE
Security firm pwn.ai this week demonstrated a now-patched Ghostscript vulnerability. A specially crafted file could break out of the interpreter's security sandbox and run commands on the host server, according to The Hacker News.
What was reported
Ghostscript is the PostScript and PDF interpreter used in many Linux server stacks. It converts uploaded PDFs, PostScript files, and images into other formats. It is often invoked by an application's file-processing pipeline rather than called directly by developers. pwn.ai reported that an ordinary file upload could be used to escape Ghostscript's sandbox protections and achieve remote code execution. The flaw has been patched. The source does not specify affected version ranges, a CVE identifier, or which downstream applications were tested.
Why it matters
Ghostscript is often a hidden dependency. It can be pulled in by image and PDF conversion libraries, document management systems, and office-suite backends. This means the exposure can extend beyond apps that explicitly list it. Any service that accepts user-uploaded documents or images and runs them through a conversion step may pass attacker-controlled input to Ghostscript.
What defenders should do now
- Inventory where Ghostscript is used, directly or transitively (via ImageMagick, libraries such as Pillow or PythonMagick, CMS or DMS platforms, or print and PDF pipelines). Confirm patched versions are deployed once vendor advisories are available.
- Isolate file-conversion workloads. Run Ghostscript in a minimal, least-privilege container or VM with no network egress and a restricted filesystem, rather than relying only on its built-in sandboxing (for example,
-dSAFER). - Hunt for anomalous child processes, outbound connections, or file writes spawned from processes that invoke Ghostscript (for example,
gs,convert, or conversion worker services) shortly after a file upload. - Monitor upload endpoints for unusual file types or malformed PostScript and PDF structures submitted for conversion.
Developing story
Details are still emerging. No CVE, affected-version list, or full technical write-up has been published alongside this report. Treat this as early-stage intel and watch for a formal advisory. Read the original coverage at The Hacker News.