Upload2Shell: Ghostscript Sandbox Escape Reached Google, WordPress, Debian

November 22, 2026 · Post #1'710 · Security

Security research firm pwn.ai published the full disclosure timeline for Upload2Shell (CVE-2026-125396), a use-after-free vulnerability in Ghostscript's Type 1 font loader that escapes the -dSAFER sandbox and enables remote code execution across a staggering range of applications. The vulnerability, discovered on July 27, 2026, was confirmed in production at Google, WordPress, Debian, Roundcube, MediaWiki, Dropbox, and numerous other services before being patched.

The Vulnerability

Ghostscript is a document interpreter that sits beneath an enormous number of file-processing pipelines: print servers, email attachment thumbnailers, document management systems, image converters, and upload handlers. The -dSAFER sandbox is supposed to prevent documents being rendered by Ghostscript from executing arbitrary commands on the host system.

Upload2Shell breaks that sandbox. A crafted document containing a malicious Type 1 font triggers a use-after-free in the font loader, allowing the document to cross the sandbox boundary, alter native path controls, and execute attacker-chosen commands as the rendering process. In practical terms, this means that uploading a crafted file to any service that processes it through Ghostscript can result in remote code execution on that service's server.

Confirmed Production Impact

The pwn.ai research team confirmed Upload2Shell execution in production or in representative application chains across at least 20 distinct attack surfaces:

Additional application paths were traced through source code in Gradio, InvokeAI, AUTOMATIC1111 Stable Diffusion WebUI, ComfyUI, Frappe/ERPNext, Home Assistant, CVAT, Paperless-ngx, and django-filer. In Gradio specifically, a live HTTP-to-Ghostscript handoff was confirmed: an unauthenticated image submission to a gr.Image app reached Ghostscript before the app function ran.

Disclosure Timeline

The vulnerability was discovered on July 27, 2026. Google was notified by July 30 after a production proof. Artifext received the upstream report by September 2, and Ghostscript 10.08.0 was released on September 8. Debian packaged the fix and issued security updates through September and October. Ubuntu published fixed packages for seven supported releases on October 21 (USN-8949-1). Roundcube hardened its image resizing on October 19 (CVE-2026-114727). The CVE was published on November 9.

The gap between discovery in July and CVE publication in November is roughly four months. During that window, the vulnerability was being patched downstream but was not publicly known. Any service running Ghostscript 10.05.x during that period was potentially vulnerable.

Why This Is Significant

Ghostscript is everywhere. It runs in print servers, email systems, document management platforms, image processing pipelines, and AI application upload handlers. The -dSAFER sandbox is the primary security boundary for Ghostscript, and it has been broken before. What makes Upload2Shell different is the breadth of confirmed production impact.

This is not a theoretical vulnerability in a lab setup. The pwn.ai team demonstrated execution in Google's production pipeline, in WordPress Core's upload path, in Debian's CUPS print system, and in Roundcube's email attachment thumbnailer. These are systems that process files from untrusted users by design. The attack surface is anyone who can upload a file, send an email attachment, or submit a print job.

The Roundcube finding is particularly concerning. An external sender emails a crafted attachment to a Roundcube user. When the user simply views the email, Roundcube automatically generates a thumbnail of the attachment using ImageMagick, which delegates to Ghostscript. The Ghostscript sandbox escape fires, and the attacker has code execution as www-data on the mail server. The user never clicked the attachment. They just opened the email.

Patch Status

Ghostscript 10.08.0 fixes Upload2Shell. Debian has backported the fix into security packages for Debian 13. Ubuntu has released fixed packages for seven supported releases. WordPress Core, Roundcube, and Plesk have all issued separate fixes for their specific attack paths.

Anyone running Ghostscript below 10.08.0 on a system that processes files from untrusted sources should treat this as a critical priority. The fix is straightforward, but identifying all the places Ghostscript runs in a given infrastructure is not. It may be hiding in CUPS configurations, email attachment processors, document preview services, and image conversion pipelines that use ImageMagick with Ghostscript as a delegate.

Sources:

[1] pwn.ai: Upload2Shell research and disclosure timeline
[2] CVE-2026-125396 record
[3] WordPress CVE-2026-65640 advisory
[4] Ubuntu USN-8949-1: Ghostscript fix