TL;DR — What You Need to Know
- The Vulnerability: Tracked as CVE-2026-125396 (CVSS 4.0: 8.5) and dubbed Upload2Shell, a use-after-free flaw in Ghostscript’s Type 1 font loader prior to upstream 10.08.0 lets crafted documents bypass Ghostscript’s
-dSAFERsandbox and run system commands. - Remote Reachability: Even though the CVE lists a local attack vector at the interpreter level, researchers demonstrated on November 17, 2026, that routine preview, thumbnail, and print pipelines in WordPress (tracked separately as CVE-2026-65640), Roundcube 1.7.2, and Debian 13 CUPS print servers automatically pass untrusted files straight to Ghostscript.
- Immediate Action: Patch Ghostscript to 10.08.0 (or your Linux distro’s backported package, such as Debian 13’s
10.05.1~dfsg-1+deb13u2), update WordPress to 7.0.4 or 6.9.7, and trace every container or worker process generating thumbnails or print jobs to ensure no bundled copies remain unpatched.
A critical sandbox-escape vulnerability in Ghostscript—dubbed Upload2Shell and tracked as CVE-2026-125396—allows crafted documents to break out of Ghostscript’s security restrictions and execute arbitrary commands on WordPress sites, Roundcube webmail servers, and Linux CUPS print servers through routine background file processing.
Affecting upstream Ghostscript releases prior to 10.08.0, the vulnerability resides in the interpreter’s Type 1 font loader. While the CVE record assigns a CVSS 4.0 score of 8.5 with a local attack vector—reflecting direct execution at the interpreter level—affected servers do not need to expose Ghostscript directly to the internet. Instead, built-in preview, thumbnail, and print workflows silently hand off incoming files to the vulnerable renderer behind the scenes.
In research published on November 17, 2026, security researchers Paulos Yibelo and pwn.ai demonstrated how network-facing applications can deliver remotely supplied documents directly into the vulnerable code path. The disclosure outlines proof-of-concept research demonstrations rather than confirmed exploitation in the wild.
ByteClaro Advisory Note: Storing an uploaded file on disk did not trigger Ghostscript in the researchers’ tests—rendering it did. Because modern web stacks often run preview workers inside containers or isolated application bundles, updating the host OS package alone will not protect workers carrying their own embedded Ghostscript binaries.
How Upload2Shell Bypassed Ghostscript’s -dSAFER Sandbox
Ghostscript renders PDF and PostScript documents. Because PostScript is a full programming language designed to describe page layouts, rendering a document requires interpreting and executing instructions embedded inside the file.

To prevent malicious files from reading or writing arbitrary system files or launching shell commands, Ghostscript relies on its -dSAFER sandbox mode. Upload2Shell defeats -dSAFER through a use-after-free memory corruption bug—a condition in which software retains a pointer to a memory block after freeing it:
- Missing Type Validation: Ghostscript’s Type 1 font loader failed to validate the data type it received prior to executing an operation capable of raising an error.
- Protected Write Exposure: When that error condition triggered, it exposed a protected write primitive that untrusted document code was never meant to control.
- In-Place Sandbox Bypass: Researchers leveraged the resulting memory corruption to overwrite Ghostscript’s internal security checks while
-dSAFERremained active—executing arbitrary commands under the renderer service account’s privileges rather than automatically asroot.
Three Entry Paths Into the Same Vulnerable Renderer
Rather than representing three separate Ghostscript flaws, WordPress, Roundcube, and CUPS served as three distinct delivery pipelines reaching the same vulnerable rendering engine:
| Target Platform | How Untrusted Files Reached Ghostscript | Execution Context & Prerequisites |
|---|---|---|
| WordPress (CVE-2026-65640) | Media preview generation passed uploads through Imagick / ImageMagick to Ghostscript. | Requires media upload privileges by default (Author role or higher), though tested configurations of Forminator and Essential Addons for Elementor reached the renderer unauthenticated via public upload forms. |
| Roundcube Webmail (1.7.2) | Viewing an email triggered server-side thumbnail generation via ImageMagick into Ghostscript (dependent on ImageMagick policy configuration). | No sender webmail account required. Victim only had to view the message—no attachment click or download needed. Commands ran as www-data. |
| Linux Print Servers (CUPS on Debian 13) | A shared CUPS network print queue accepted incoming jobs and routed them to Ghostscript for format conversion. | Zero recipient interaction required on unauthenticated shared queues. Commands executed as the lp print service account. |
Requiring authentication on shared CUPS queues blocked anonymous network submissions in testing, though authentication alone does not fix the underlying Ghostscript memory flaw.
Remediation & Verification Status
Upstream maintainer Artifex patched the Type 1 font loader vulnerability in Ghostscript 10.08.0. Because Linux distributions frequently backport security patches to older version branches, administrators should verify package advisories rather than relying solely on upstream version numbers:
- Ghostscript / Linux Packages: Upgrade to upstream 10.08.0 or your distribution’s patched package (for example, Debian 13 first shipped the fix in
10.05.1~dfsg-1+deb13u2). - WordPress Core & Plugins: Update WordPress to 7.0.4 or the 6.9.7 backport (which addresses the core upload route tracked as CVE-2026-65640), and check for updates to public form plugins such as Forminator and Essential Addons for Elementor.
ByteClaro Defense & Verification Checklist
Because exploitation occurs at the moment a background worker renders a preview, thumbnail, or print job, administrators should trace their full processing pipeline:
- Trace Every Rendering Worker & Container: Identify every service, background queue worker, Docker container, or application bundle that generates thumbnails, PDF previews, or print conversions—and confirm each one invokes a patched Ghostscript binary rather than a stale bundled copy.
- Harden ImageMagick
policy.xml: On web and mail servers (including WordPress and Roundcube hosts), review/etc/ImageMagick-*/policy.xmland explicitly disable PostScript, EPS, PDF, and XPS coder delegates (rights="none") unless document rasterization is strictly required. - Audit Public WordPress Upload Forms: Review unauthenticated front-end upload forms (such as Forminator or Elementor add-ons) that route files into the WordPress Media Library, and temporarily suspend automatic preview generation for untrusted file types if immediate patching is delayed.
- Lock Down CUPS Print Queues: Require authentication on shared CUPS queues, restrict network access to print ports (
TCP/UDP 631) via firewall rules, and ensure renderer service accounts (www-data,lp) run with minimal filesystem permissions.
Need assistance hardening Linux rendering pipelines, auditing ImageMagick policies, or isolating containerized web workloads? Connect with the ByteClaro Consulting team via our Contact page.









