Upload2Shell – Ghostscript sandbox bypass
-dSAFER alone as insufficient protection against this flaw. Inventory the services that render untrusted documents.
Upload2Shell is a use-after-free in Ghostscript’s Type 1 font loader (CWE-416). A crafted PostScript or PDF document can corrupt interpreter memory and bypass the sandbox’s file access restrictions. In the documented cases this led to command execution with the renderer’s privileges.
Paulos Yibelo of pwn.ai documented ten paths through specific applications, seven reachable without an account on the target. VulnCheck’s CVSS 4.0 score is 8.5 (high), with a local attack vector for the interpreter. A network-facing service can still expose the vulnerable component when it sends an uploaded document or print job to Ghostscript. VulnCheck CVE record
Patch and disclosure timeline
| Date | Event |
|---|---|
| September 7, 2026 | Artifex commits the fix. |
| September 8, 2026 | Ghostscript 10.08.0 ships with the fix, initially without an explicit security notice for it. |
| November 9, 2026 (UTC) | VulnCheck publishes the CVE record at 23:28 UTC. |
| November 21–23, 2026 | pwn.ai dates its research report November 21. AlmaLinux and Sophos follow with advisories. |
The pwn.ai timeline puts the upstream patch in September, weeks before the public CVE record appeared.
Where Ghostscript is exposed
Upstream Ghostscript releases before 10.08.0 are affected. A distribution can ship the same fix as a backport. Exposure depends on whether a workflow sends untrusted documents to an unpatched Ghostscript binary. The research covers examples including WordPress and MediaWiki previews, Roundcube file processing and Debian 13 CUPS print jobs. ImageMagick and Pillow can also invoke Ghostscript in some format handlers and configurations.
Check your exposure
1. Identify the renderer version
gs --version
Check the binary the worker actually launches, including copies in application bundles and container images. For a distribution package, verify the full package revision against the vendor’s security tracker.
2. Review each calling service
magick -list delegate
magick -list policy
Use convert in place of magick for ImageMagick 6. Check thumbnail workers, attachment previews, document converters and print spoolers as well. Audit direct Ghostscript calls in the services that make them.
Update and reduce exposure
Install Ghostscript 10.08.0 or later, or a vendor package confirmed to contain the backport. For workflows that reach Ghostscript only through ImageMagick and can drop the relevant formats, disable the configured Ghostscript delegate and corresponding coders in the loaded policy.xml. This example assumes a delegate named gs:
<policy domain="delegate" rights="none" pattern="gs" />
<policy domain="coder" rights="none" pattern="PS" />
<policy domain="coder" rights="none" pattern="PS2" />
<policy domain="coder" rights="none" pattern="EPS" />
<policy domain="coder" rights="none" pattern="PDF" />
Confirm the effective policy with -list policy and benign sample files. Blocking formats can turn off previews and conversion features. Where you need rendering, isolate the worker, give it minimal privileges, restrict file and network access, and validate the actual file type before processing.
Known exploitation
A public proof of concept is available. The reports reviewed through November 23, 2026 did not document active exploitation. CVE-2026-125396 is absent from the November 25 release of the CISA KEV catalog.