Security firm pwn.ai has published Upload2Shell, a Ghostscript flaw tracked as CVE-2026-125396 that lets a crafted document break out of Ghostscript’s -dSAFER sandbox and run commands as the process doing the rendering. Artifex fixed it in Ghostscript 10.08.0 on 8 September. The CVE was published on 9 November, and pwn.ai is now releasing its case studies one by one.
The bug
VulnCheck’s advisory says Ghostscript before 10.08.0 has a -dSAFER bypass in the .putgstringcopy procedure in gs_fonts.ps, which calls the privileged .forceput operator without checking operand types. A crafted PostScript or PDF file triggers a type error, recovers .forceput through a custom error handler, and causes a use-after-free across save and restore. VulnCheck scores it 8.5 under CVSS 4.0 with a local attack vector, and credits Paulos Yibelo and pwn.ai, with Ken Sharp.
The local label undersells it. Ghostscript sits under image and document libraries, and pwn.ai notes that files named .png or .jpg can still reach it through image conversion.
Where pwn.ai says it worked
pwn.ai’s timeline lists confirmed paths it reported in September, among them:
- Debian 13 CUPS: an unauthenticated print job to a shared queue ran a command on the host as
lp. - Roundcube: an emailed attachment, thumbnailed when the message was viewed, ran as
www-data. Plesk Obsidian ships the same path. - WordPress plugins: public upload fields in Essential Addons for Elementor and Forminator, with no login. WordPress core’s own path needed an account with upload rights and was closed in 7.0.4 on 12 August as CVE-2026-65640.
- Others: Mayan EDMS, DokuWiki with its ImageMagick backend, MediaWiki’s PdfHandler on wikis allowing anonymous PDF uploads, and ResourceSpace.
pwn.ai also says a signed-out request reached Ghostscript in Google’s document renderer, and that Google fixed that path on 10 November.
Fixed builds
- Upstream: Ghostscript 10.08.0.
- Debian: the security tracker marks 13 fixed via DSA-6516-1 (current build 10.05.1
dfsg-1+deb13u3) and 12 fixed in bookworm security via DLA-4914-1 (10.0.0dfsg-11+deb12u9). The plain bookworm package is still listed as vulnerable. - Ubuntu: pwn.ai says USN-8949-1 shipped fixed packages for seven releases on 21 October.
- Roundcube: pwn.ai says it separately restricted unsafe attachment image types under CVE-2026-114727.
The bug is not in CISA’s Known Exploited Vulnerabilities catalogue (latest update 20 November), and we have seen no report of exploitation. Yibelo’s earlier work appeared in Vercel’s sandbox challenge results.
Why this matters
Any service that makes thumbnails, previews or PDFs from user files may be calling Ghostscript without your code ever naming it, as the Pillow EPS fixes showed last month. Updating the host package does not touch a copy inside a container image or a vendored bundle, so check the binary your document workers really run. Treat uploaded files as code until they are converted in a sandbox you control.

The Campfire
CommentsThanks. Your comment is waiting for the desk. Once it is approved it appears here within about a minute.
Add a comment