CyberSecurityNews: Upload2Shell Vulnerability Allows Hackers to Run Commands on WordPress, Email, and Print Servers

Try Our Free Tools!
Master the web with Free Tools that work as hard as you do. From Text Analysis to Website Management, we empower your digital journey with expert guidance and free, powerful tools.

A Vulnerability in Ghostscript: Researchers Expose Wide-Ranging Risks

A critical vulnerability within Ghostscript has enabled cybersecurity researchers to execute commands across multiple platforms, including WordPress, Roundcube webmail, and Linux print servers, all through standard file processing operations.

This flaw, identified as Upload2Shell and cataloged under CVE-2026-125396, affects Ghostscript versions earlier than 10.08.0.

The vulnerability is located within the software’s Type 1 font loader. Notably, the compromised servers did not require direct exposure to Ghostscript; instead, their mechanisms for generating previews, thumbnails, and handling print jobs relayed files to the vulnerable code.

The CVE record assigns the vulnerability a CVSS score of 8.5, indicating a high severity level and categorizing it as a local attack vector.

This classification pertains specifically to the interpreter level, without clarifying the means by which a document reaches this stage.

In a research paper published on November 17, experts Paulos Yibelo and pwn.ai demonstrated that network-facing services could transmit externally supplied files to the vulnerable Ghostscript code. Their findings, while illuminating, do not confirm active exploits occurring in the wild.

Upload2Shell: Evasion of Ghostscript’s Security Measures

Ghostscript is primarily responsible for rendering PDFs and PostScript documents, which involves executing commands embedded within these files.

The software’s -dSAFER mode aims to restrict access to certain instructions, yet the Upload2Shell vulnerability has proven capable of breaching these safeguards through a use-after-free error—a form of memory corruption in which a program continues to reference data after the memory it had occupied has been released.

The font loader failed to validate the type of data it processed prior to executing an operation that could potentially trigger an error.

This oversight permitted access to a protected write area, which the document’s code should not have manipulated.

Researchers leveraged this memory vulnerability to circumvent Ghostscript’s security protocols, all while -dSAFER remained active.

Consequently, the test commands executed under the permissions granted to the Ghostscript renderer, rather than as root, which is significant in determining the extent of what an attacker might access post-exploitation, as detailed in a separate report by Cyber Security News regarding another Ghostscript PDF vulnerability.

Exploited Platforms: WordPress, Roundcube, and CUPS

In the case of WordPress, the security researchers were able to access Ghostscript through the media preview function within a site that utilized Imagick and ImageMagick.

The WordPress advisory addresses a distinct core upload vulnerability classified as CVE-2026-65640, which necessitates media upload permissions typically possessed by users in the Author role or higher by default.

As outlined in prior reports regarding the WordPress Imagick vulnerability, a remedy for this exploitation was integrated into version 7.0.4 and subsequently backported to version 6.9.7.

The researchers also identified that certain public upload capabilities within the Forminator and Essential Addons for Elementor plugins allowed files to interact with the renderer without requiring user authentication in the tested configurations.

In the case of Roundcube 1.7.2, verification of a webmail account was unnecessary for the sender. Although the recipient was required to view the message, engagement with the attachment was not mandated.

The Roundcube server autonomously generated a thumbnail and routed the attachment to Ghostscript via ImageMagick, contingent upon a policy allowing for this interconnection.

Consequently, commands executed with www-data permissions—the server account for web services—rather than originating from the end-user’s device.

The print server did not necessitate any action from the recipient. On a Debian 13 environment, a communal CUPS queue accepted network print jobs devoid of credential requirements, facilitating the transfer of the test document to Ghostscript for processing.

Command execution was validated by the creation of a marker file attributed to lp, which is the print service account.

While enforcing authentication would block anonymous submissions in this scenario, it does not rectify the underlying vulnerability.

These instances represent three avenues to engage the same susceptible renderer rather than distinct flaws within Ghostscript.

Artifex has rectified the core issue within Ghostscript version 10.08.0. Additionally, Linux distributions are capable of applying the same remediation to earlier versions, suggesting that reliance solely on the upstream version number may not accurately assess exposure. For instance, Debian 13 first included the fix in 10.05.1~dfsg-1+deb13u2.

System administrators are urged to verify their vendor’s package status concerning CVE-2026-125396 and ensure that the version utilized by each service is updated.

Notably, upgrading the host system does not automatically replace Ghostscript in existing containers or application bundles.

WordPress administrators should implement necessary updates for both core and renderer components while scrutinizing public forms that funnel uploads into the Media Library.

white and blue printer paper

If immediate patching is infeasible, it is advisable to deactivate automatic previews for untrusted files wherever possible.

For print servers, authenticating shared queues and limiting network access are critical to safeguarding against potential threats.

It is imperative to keep renderers contained and grant their service accounts only the minimum access required for their operations.

The most crucial verification takes place after a file has been accepted. In the tests conducted by researchers, merely storing a file did not trigger Ghostscript.

It was the act of rendering that initiated the vulnerability. Care should be taken to examine the worker responsible for generating the preview, thumbnail, or print output, ensuring that this worker utilizes the patched package.

Source link: Cybersecuritynews.com.

Disclosure: This article is for general information only and is based on publicly available sources. We aim for accuracy but can't guarantee it. The views expressed are the author's and may not reflect those of the publication. Some content was created with help from AI and reviewed by a human for clarity and accuracy. We value transparency and encourage readers to verify important details. This article may include affiliate links. If you buy something through them, we may earn a small commission — at no extra cost to you. All information is carefully selected and reviewed to ensure it's helpful and trustworthy.

Reported By

Neil Hemmings

I'm Neil Hemmings from Anaheim, CA, with an Associate of Science in Computer Science from Diablo Valley College. As Senior Tech Associate and Content Manager at RS Web Solutions, I write about AI, gadgets, cybersecurity, and apps – sharing hands-on reviews, tutorials, and practical tech insights.
Share the Love
Related News Worth Reading