{"slug": "researchers-demonstrate-ghostscript-sandbox-escape-rce-via-crafted-file-uploads", "title": "Researchers Demonstrate Ghostscript Sandbox-Escape RCE via Crafted File Uploads in Popular Apps", "summary": "Security firm pwn.ai demonstrated that a use-after-free flaw in Ghostscript, tracked as CVE-2026-125396 and scored 8.5 out of 10, lets a crafted file disable the -dSAFER sandbox and run commands as the low-privilege rendering account across about ten common applications, including anonymous print jobs to a shared Debian 13 queue, Roundcube webmail attachments, and public upload forms in the WordPress plugins Forminator and Essential Addons for Elementor. Artifex fixed the flaw in Ghostscript version 10.08.0 on September 8, and WordPress closed its own upload path in version 7.0.4 on August 12 under CVE-2026-65640; no in-the-wild exploitation has been reported. The two fixes cover different points in the same chain, and updating a host OS does not replace a separate Ghostscript copy bundled inside a container image or application, leaving some document workers on vulnerable code.", "body_md": "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.\n\nGhostscript 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.\n\nSecurity 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.\n\nGetting 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.\n\nThe 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.\n\nThe 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.\n\nSeveral of those paths needed no login: an anonymous print job to a shared Debian 13 queue, an emailed attachment that Roundcube webmail processed the moment the recipient opened the message, and public upload forms in the WordPress plugins Forminator and Essential Addons for Elementor.\n\nWordPress Core itself needed more: an account with the ability to upload files, which Authors and higher roles have by default. Although the CVE is classified as a local flaw, the firm’s tests reached Ghostscript from the network via print jobs, email, and web uploads. The tested version and the access needed for each application are set out in its [impact index](https://pwn.ai/upload2shell).\n\n**Artifex**, which develops Ghostscript, fixed the flaw in version 10.08.0 on September 8, and is moving the vulnerable internal step into safer code. Ken Sharp, the developer who handled the fix, called that step “an ancient piece of code well known to be a vulnerability, but difficult to eradicate” in the [bug report](https://bugs.ghostscript.com/show_bug.cgi?id=709684). The CVE was published last week and is scored 8.5 out of 10 in its [security advisory](https://www.vulncheck.com/advisories/ghostscript-before-10.08.0-dsafer-bypass-via-putgstringcopy-forceput-recovery).\n\nWordPress had already closed its own upload path in version 7.0.4 on August 12, under a separate identifier, CVE-2026-65640, as noted in its [release notes](https://wordpress.org/news/2026/08/wordpress-7-0-4-release/). That fix and the Ghostscript fix cover different points in the same chain, so updating one does not remove the need for the other.\n\n### Updating the Renderer\n\nThe fix helps only where it reaches the renderer the application actually uses. Updating the host operating system does not update a separate copy of Ghostscript bundled inside a container image or an application, so a document worker can keep running the old code after the host package is replaced.\n\nCoverage across Linux distributions is uneven. As of last week, several still shipped a vulnerable Ghostscript or had a fix pending, according to the firm’s survey. The list records package status, not a tested attack path for each system:\n\n- **Debian 12 (Bookworm):** listed as vulnerable\n- **Amazon Linux 2, 2023, and 2027 Preview:** fix pending\n- **SUSE Linux Enterprise 12 SP5 and parts of 15:** fix in progress\n- **SUSE Linux Enterprise Server 16.0 and 16.1:** fix in progress\n- **openSUSE Leap 16.0 and 16.1:** affected\n\nThe firm did not establish whether current Red Hat, Rocky Linux, AlmaLinux, Oracle Linux, or stable Fedora packages carry the fix.\n\nUntil the renderer is updated, the exposure can be reduced by requiring authentication on print queues and by limiting which file types an image processor accepts. System controls help too, and in one test an AppArmor profile stopped the compromised interpreter from starting a shell.\n\nOne published proof-of-concept file, described in its [technical analysis](https://pwn.ai/upload2shell/research.html), shows only the core memory trick. It changes a value inside the running interpreter and sets it back, without running a shell command or touching files on the host, and on the patched 10.08.0 build it fails before that point.\n\nThe firm’s broader research extended to production services, including Google, which fixed the affected path last week. Its reports of similar problems at Dropbox and other unnamed services are separate Ghostscript bugs, not this one.", "url": "https://wpnews.pro/news/researchers-demonstrate-ghostscript-sandbox-escape-rce-via-crafted-file-uploads", "canonical_source": "https://www.swapupdate.in/researchers-demonstrate-ghostscript-sandbox-escape-rce-via-crafted-file-uploads-in-popular-apps/", "published_at": "2026-11-22 13:24:52+00:00", "updated_at": "2026-11-22 14:16:25.239715+00:00", "lang": "en", "topics": ["ai-safety"], "entities": ["Ghostscript", "pwn.ai", "Artifex", "Ken Sharp", "WordPress", "Roundcube", "ImageMagick", "Forminator"], "also_reported_by": [], "takeaway": "A crafted PostScript or EPS file can reach Ghostscript through image libraries like ImageMagick, Pillow, libvips or Qt plugins even when named .png or .jpg, so update Ghostscript to 10.08.0 and WordPress to 7.0.4, and patch bundled copies inside containers, not just the host package.", "recommendation": {"advice": "Patch Ghostscript to 10.08.0 and WordPress to 7.0.4, and update Ghostscript copies bundled in container images or app workers, since host OS updates leave those vulnerable to CVE-2026-125396.", "playbook": "agent-security", "playbook_url": "https://wpnews.pro/playbooks/agent-security"}, "alternates": {"html": "https://wpnews.pro/news/researchers-demonstrate-ghostscript-sandbox-escape-rce-via-crafted-file-uploads", "markdown": "https://wpnews.pro/news/researchers-demonstrate-ghostscript-sandbox-escape-rce-via-crafted-file-uploads.md", "text": "https://wpnews.pro/news/researchers-demonstrate-ghostscript-sandbox-escape-rce-via-crafted-file-uploads.txt", "jsonld": "https://wpnews.pro/news/researchers-demonstrate-ghostscript-sandbox-escape-rce-via-crafted-file-uploads.jsonld"}}