A critical vulnerability in Ghostscript, identified as CVE-2026-125396, has raised alarms across various platforms, allowing attackers to execute commands through routine file processing. This flaw, known as Upload2Shell, affects Ghostscript versions prior to 10.08.0, posing significant risks to WordPress, Roundcube webmail, and Linux print servers.
Understanding the Ghostscript Vulnerability
The vulnerability resides in Ghostscript’s Type 1 font loader, allowing exploitation through indirect exposure via preview, thumbnail, and print functions. Despite not requiring direct access to Ghostscript, the flaw can be exploited by passing files through network-facing services, as demonstrated in research by Paulos Yibelo and pwn.ai, published on November 17. Although there are no confirmed attacks in the wild, the research highlights potential attack vectors.
Impacts on WordPress, Roundcube, and Print Servers
On WordPress platforms, researchers accessed Ghostscript through media preview processes, exploiting configurations involving Imagick and ImageMagick. The vulnerability, tracked separately as CVE-2026-65640, requires media upload permissions, typically available to users with Author roles or higher. WordPress has addressed this issue in versions 7.0.4 and 6.9.7.
For Roundcube 1.7.2, the flaw could be triggered without the sender having a webmail account, and without requiring the recipient to interact with the attachment. The server generated thumbnails, passing attachments through ImageMagick, allowing command execution as the web service account, www-data.
Print servers faced similar risks, particularly on Debian 13, where shared CUPS queues accepted network print jobs without credentials. This enabled unauthorized command execution, confirmed by the researchers through the creation of marker files under the print service account.
Mitigation and Security Recommendations
Artifex has addressed the Ghostscript vulnerability in version 10.08.0. Administrators should verify the package status for CVE-2026-125396 and ensure that all services utilize the updated version. It’s crucial to apply both core and renderer updates, especially for WordPress operators, and to scrutinize public forms that route uploads to the Media Library.
For print servers, implementing authentication for shared queues and restricting network access are recommended measures. Isolating renderers and ensuring service accounts have minimal necessary access can further mitigate risks. The key is to trace the workers responsible for file rendering and confirm they employ the patched Ghostscript package.
Ensuring system security requires proactive measures. Administrators should regularly monitor vendor updates and apply patches promptly to safeguard against potential exploits of this critical vulnerability.
