A flaw in Ghostscript let researchers run commands on WordPress, Roundcube webmail, and Linux print servers through routine file processing. The vulnerability, dubbed Upload2Shell and tracked as CVE-2026-125396, affects upstream Ghostscript releases before 10.08.0.
It sits in the software’s Type 1 font loader, but the affected servers did not need to expose Ghostscript directly. Their own preview, thumbnail, and print features delivered files to it.
The CVE record gives the flaw a CVSS 4.0 score of 8.5 and lists a local attack vector. That describes the flaw at the interpreter level, not how a document arrives there.
In research published on November 17, Paulos Yibelo and pwn.ai showed that network-facing services could pass remotely supplied files to the vulnerable code. The report describes research demonstrations, not confirmed attacks in the wild.
Upload2Shell Bypassed Ghostscript’s Sandbox
Ghostscript renders PDFs and PostScript documents. PostScript is a programming language for describing pages, so rendering a file means running instructions from it.
Ghostscript’s -dSAFER mode is meant to limit what those instructions can access. Upload2Shell undermined those limits through a use-after-free, a memory flaw in which software keeps a reference to data after releasing the memory that held it.
The font loader failed to check the type of data it received before an operation that could raise an error. That error exposed a protected write that document code was not supposed to control.
Researchers used the resulting memory flaw to alter Ghostscript’s security checks while -dSAFER was still enabled. The test commands ran with the renderer’s permissions, not automatically as root. As Cyber Security News reported in its coverage of a separate Ghostscript PDF flaw, those permissions help determine what an attacker can reach after gaining code execution.
WordPress, Roundcube and CUPS were Exposed
On WordPress, the researchers reached Ghostscript through the media preview process on a site using Imagick and ImageMagick. The WordPress advisory tracks the core upload issue separately as CVE-2026-65640. It requires media upload privileges, which Authors and higher roles have by default.
As covered in our WordPress Imagick vulnerability report, WordPress fixed that route in 7.0.4 and backported the fix, including to 6.9.7. The researchers also found that certain public upload features in Forminator and Essential Addons for Elementor reached the renderer without a login in the configurations tested.
On Roundcube 1.7.2, the sender needed no webmail account. The recipient had to view the message, but did not have to click or download the attachment. Roundcube’s server generated a thumbnail and passed the attachment through ImageMagick to Ghostscript. The test depended on an ImageMagick policy that allowed the handoff. The command ran as www-data, the web service account, rather than on the recipient’s device.
The print server required no action from a recipient. On Debian 13, a shared CUPS queue accepted network print jobs without credentials and sent the test document to Ghostscript for conversion. The researchers confirmed command execution by writing a marker file as lp, the print service account.
Requiring authentication blocked anonymous submission in the test, but did not repair the underlying flaw. These were three ways to reach the same vulnerable renderer, not three separate flaws in Ghostscript.
Artifex fixed the underlying flaw in Ghostscript 10.08.0. Linux distributions can apply the same fix to an older release, so the upstream version number alone is not enough to judge exposure. Debian 13, for example, first shipped the fix in 10.05.1~dfsg-1+deb13u2.
Administrators should check their vendor’s package status for CVE-2026-125396 and verify the copy used by each service. Updating the host does not replace Ghostscript inside an existing container or application bundle.
WordPress operators should apply both the core and renderer updates and review public forms that send uploads into the Media Library. If patching must wait, suspend automatic previews for untrusted files where practical.
On print servers, require authentication for shared queues and restrict network access to them. Keep renderers isolated and give their service accounts only the access they need.
The key check comes after a file is accepted. Storing a file did not start Ghostscript in the researchers’ tests. Rendering it did. Trace the worker that actually makes the preview, thumbnail or print output, then verify that worker uses the patched package.
What Are Leading Organizations Doing About AI and Cyber Risks? Find Out. View Details!

