Back to the blog

Upload2Shell: PoC for a vulnerability fixed in Ghostscript

A proof of concept is available for Upload2Shell, an arbitrary code execution vulnerability in Ghostscript. The vendor has already fixed it; versions prior to 10.08.0 are affected.

Analysis

Analysis — The vulnerability CVE-2026-125396, named Upload2Shell, affects Ghostscript, an open-source interpreter for PostScript and PDF documents. A proof of concept (PoC) to exploit it is available. The cause is improper handling of the .putgstringcopy procedure, which calls the privileged .forceput operator without properly checking operand types. The issue may allow restrictions in -dSAFER security mode to be bypassed and cause a use-after-free condition.

Affected software and versions

SoftwareAffected versionsRelated CVEs
ArtifexSoftware ghostpdl< 10.08.0CVE-2026-125396