Researchers have shown that a crafted document can break out of Ghostscript’s sandbox and run commands on the server that opens it. The bug, CVE-2026-125396, is nicknamed Upload2Shell by the team at Ostorlab that analysed it, and it matters far beyond people who use Ghostscript directly: ImageMagick, Pillow, libvips, CUPS and a long list of upload and preview features call Ghostscript behind the scenes. Artifex fixed it in Ghostscript 10.08.0 on September 8, 2026, and the technical write-up and a proof of concept followed on November 17. As of the reports read on November 23, no attacks in the wild were known. Here is what is affected, how to check and what to do if updating is not possible yet.
What is CVE-2026-125396?
It is a use-after-free in Ghostscript’s Type 1 font loader that lets a crafted PostScript, EPS or PDF file switch off the -dSAFER protections. -dSAFER is the setting that normally stops a document from reading files or running commands. Ostorlab says it is crossed rather than bypassed by a misconfiguration, so having -dSAFER on does not prevent the attack. The CVE record rates it High, CVSS v4.0 8.5. Despite a “local” classification, the pwn.ai researchers who found it reached it over the network through print jobs, email and web uploads.
Ostorlab credits Paulos Yibelo of pwn.ai with the discovery. The reported timeline runs from discovery on July 27, to Artifex receiving the report on September 2, the 10.08.0 release on September 8, the CVE publication on November 9 and the public analysis and proof of concept on November 17. The Hacker News says the published proof of concept shows only the core memory technique, does not run a shell command and fails on 10.08.0.
Why is it reachable from a file upload?
Many programs hand files to Ghostscript without telling the user. The Hacker News notes that ImageMagick, Pillow, libvips and a Qt plugin can pass PostScript or EPS content to Ghostscript even when the file is named like a .png, .jpg or .pdf. A file only has to arrive through an upload, preview, thumbnail, import or print path.
The pwn.ai team and Ostorlab report applications where the path was confirmed:
- An anonymous print job to a shared CUPS queue on Debian 13, with no login needed.
- Roundcube webmail, triggered when a recipient opens an emailed attachment.
- Public upload forms in the WordPress plugins Forminator and Essential Addons for Elementor.
- WordPress core, which needs an account allowed to upload files (Authors and above by default).
- MediaWiki with PdfHandler, DokuWiki, Mayan EDMS, ResourceSpace and the Roundcube stack in Plesk.
Ostorlab also mapped source-level paths in several AI and document tools, including ComfyUI, Stable Diffusion WebUI, Gradio, Paperless-ngx and Home Assistant. Those are code paths, not confirmed attacks. The Hacker News says Google’s affected path was fixed earlier this month, and Ostorlab dates a Google mitigation for a signed-out path to November 10.
Which versions are fixed?
- Upstream Ghostscript: every release before 10.08.0 is affected. The fix adds operand type checks before the vulnerable step, and a later change moves that helper into C.
- Debian 13: fixed in 10.05.1~dfsg-1+deb13u2. Debian 12: fixed in 10.0.0~dfsg-11+deb12u9, per Ostorlab. The Hacker News listed Debian 12 as vulnerable, so confirm the package version on your own system.
- Ubuntu: USN-8949-1 shipped fixed packages on October 21 for supported releases, including 24.04 LTS (10.02.1~dfsg1-0ubuntu7.10) and 22.04 LTS (9.55.0~dfsg-1ubuntu5.15).
- Others: The Hacker News listed Amazon Linux fixes as pending and SUSE fixes as in progress, and said Red Hat, Rocky, AlmaLinux, Oracle Linux and stable Fedora were not confirmed either way. Check your distribution’s advisory.
Distributions often backport fixes under older version numbers, so a low version number does not prove a system is vulnerable. Compare the package against your distribution’s advisory rather than the upstream version alone.
What to do if you cannot update yet
These mitigations come from Ostorlab and The Hacker News:
- Update Ghostscript everywhere it lives, including copies bundled inside container images and applications, because a host update may not reach them. Recreate running containers after upgrading.
- In ImageMagick’s policy file, set
rights="none"for thegsdelegate. This does not block direct use ofgs. - Reject PostScript, EPS and PDF uploads that do not need rendering, or convert them in a service with no shell or network access.
- Run the renderer as an unprivileged account with a restrictive seccomp or AppArmor profile. In one reported test an AppArmor profile stopped the compromised interpreter from starting a shell.
- Require authentication on shared CUPS print queues.
Do not confuse it with the WordPress fix
WordPress 7.0.4, released on August 12, closed a separate upload route under CVE-2026-65640. Both sources say that fix covers a different point in the same chain, so WordPress sites still need a patched Ghostscript. Similarly, The Hacker News notes that other reported Ghostscript issues, including one affecting Dropbox, are separate bugs.
Is it being exploited?
Ostorlab says no in-the-wild exploitation was known and the CVE was not in CISA’s Known Exploited Vulnerabilities list as of November 21. A public proof of concept exists, which shortens the time between a report and copied attacks. For flaws that are on the list, see our Exploited This Week roundup and the Java4Shell guide.
Sources
- Ostorlab: Upload2Shell, Ghostscript sandbox escape to RCE (CVE-2026-125396)
- The Hacker News: Researchers demonstrate Ghostscript sandbox-escape RCE via crafted file uploads (November 22, 2026)
Image: StepPhase title card.
Like our coverage? Add stepphase.com as a preferred source on Google to see more of our stories in Top Stories.
