Dev News Daily ENDE

Upload2Shell: a Ghostscript font bug turned ordinary image uploads into remote code execution

The security firm pwn.ai published on 21 November the technical writeup of Upload2Shell, the name it gives to CVE-2026-125396. The researchers, with Paulos Yibelo as author, describe a use-after-free in the code Ghostscript uses to load Type 1 fonts. A crafted document can use it to write chosen data to a chosen place in native memory, switch off the path checks that enforce the -dSAFER sandbox while the flag is still set on the command line, and then run commands with the rights of the process doing the rendering.

The reach comes from how files get to Ghostscript. An application that crops an image or builds a preview often calls ImageMagick, and ImageMagick may hand the file to Ghostscript even when it carries a .jpg or .png name. On its disclosure page the firm lists confirmed routes: an anonymous print job to a shared CUPS queue on Debian 13, an email attachment in Roundcube that was thumbnailed when the message was opened, public upload or form fields in the Forminator and Essential Addons for Elementor plugins for WordPress, anonymous PDF uploads on a MediaWiki configured to allow them, DokuWiki, Mayan EDMS and ResourceSpace. A production path at Google was reported by 30 July and mitigated on 10 November.

Artifex fixed the root cause in Ghostscript 10.08.0 on 8 September, after the bug was filed as Artifex Bug 709684. Ubuntu shipped fixed packages for seven releases and Debian patched Trixie, but the writeup says that as of 12 November Debian still listed Bookworm as vulnerable, Amazon Linux showed a pending fix and several SUSE branches were still affected or in progress. It also warns that updating the host does not update a separate copy of Ghostscript inside a container image or an application bundle.

Upload2Shell: a Ghostscript font bug turned ordinary image uploads into remote code execution
Upload2Shell: a Ghostscript font bug turned ordinary image uploads into remote code execution — Dev News Daily

Why it matters

The vulnerable code is rarely called on purpose: it sits behind thumbnail and preview features several layers down. Checking whether an application is exposed means following the path from the uploaded file to whichever renderer actually opens it, including copies bundled in images.

Primary source
Hacker News front page
https://pwn.ai/upload2shell