Skip to Content

Proof-of-concept exploit code available for Ghostscript ‘Upload2Shell’ vulnerability (CVE-2026-125396)

Author - Sophos Logo

On November 21, 2026, pwn.ai described a proof of concept for exploiting a high-severity (CVSS 4.0 score of 8.5) vulnerability in Ghostscript, which is used to convert PostScript and PDF files into other formats. This use-after-free vulnerability (CVE-2026-125396) has been dubbed ‘Upload2Shell’. Attackers could exploit this flaw by sending custom PostScript or PDF documents that bypass the -dSAFER sandbox, gaining the ability to execute arbitrary code.

Artifex patched the issue in September, and affected distributions are being updated. There are no reports of active exploitation. 

Recommended actions

Organizations should upgrade to the latest Ghostscript release as appropriate and can monitor the status of vulnerable distributions listed in the pwn.ai article. Until updates are available, organizations can reduce the risk by preventing Ghostscript from processing untrusted files. 

Sophos countermeasures

SophosLabs continues to monitor the threat landscape for activity related to this threat and will deliver detections and protections as available. 

The Sophos MDR team is actively monitoring for exploitation and post-exploitation activity related to this threat and will investigate and respond to suspicious activity.