Technical advisory and detection guide for CVE-2026-125396, a Ghostscript Type 1 font Use-After-Free that bypasses -dSAFER for code execution, with verification and remediation steps.
UPLOAD2SHELL
⚠️ ONE FILE. ONE VULNERABLE RENDERER. POTENTIAL SERVER COMPROMISE.
Upload2Shell is a security vulnerability affecting Ghostscript, a widely used interpreter for PostScript and PDF documents.
Tracked as CVE-2026-125396, the vulnerability involves a Use-After-Free condition in Ghostscript's Type 1 font loader.
An attacker can potentially exploit this flaw to bypass the -dSAFER security restrictions and execute arbitrary commands in the context of the vulnerable rendering process.
| Attribute | Details |
|---|---|
| Vulnerability | Upload2Shell |
| CVE ID | CVE-2026-125396 |
| Vendor | Artifex Software |
| Component | Ghostscript |
| Vulnerability Type | Use-After-Free |
| CWE | CWE-416 |
| CVSS 3.1 | 7.8 — High |
| Attack Vector | Local (CVSS classification) |
| Impact | Code Execution |
| Affected Versions | Before 10.08.0 |
| Fixed Upstream Version | 10.08.0 |
The vulnerability exists in Ghostscript's font-loading functionality.
The affected .putgstringcopy procedure calls the privileged .forceput operator without properly validating operand types.
This can allow an attacker to:
save and restore.-dSAFER security boundary.Core security issue:
Crafted PostScript / PDF
|
v
Ghostscript
|
v
Type 1 Font Loader
|
v
.putgstringcopy
|
v
.forceput
|
v
Use-After-Free
|
v
-dSAFER
BYPASS
|
v
CODE EXECUTION
Ghostscript can be integrated into multiple application workflows.
Potentially exposed processing paths include:
| Technology | Processing Workflow |
|---|---|
| ImageMagick | Image conversion |
| PHP Imagick | Uploaded media processing |
| CUPS | Document printing |
| Roundcube | Email attachment previews |
| WordPress | Media processing |
| Pillow | EPS image processing |
Important: These integrations are potential attack paths, not automatically vulnerable installations. Exploitability depends on the actual renderer, version, configuration and processing workflow.
| Impact | Description |
|---|---|
| Sandbox Escape | Bypass Ghostscript security restrictions |
| Code Execution | Execute commands as the rendering process |
| Confidentiality | Potential unauthorized information access |
| Integrity | Potential modification of accessible files |
| Availability | Potential disruption of document-processing services |
Check whether Ghostscript is installed:
which gs
Identify the installed version:
gs --version
Check Debian/Kali package information:
dpkg -l | grep ghostscript
Inspect package details:
apt-cache policy ghostscript
Check ImageMagick configuration:
magick -list delegate
Note: Version checks alone are insufficient for distributions that backport security patches. Verify the installed package against the distribution's security advisory.
Upgrade to upstream Ghostscript 10.08.0 or later, or install the security-patched distribution package.
Limit processing of untrusted PostScript, EPS and PDF files.
Run document-rendering workers with minimal privileges and restricted filesystem access.
Review delegate permissions and prevent untrusted documents from reaching vulnerable rendering components.
Monitor unusual child processes and unexpected command execution from document-processing services.
🔴 SECURITY IS NOT OPTIONAL
Understand • Detect • Analyze • Patch • Protect
UPLOAD2SHELL | CVE-2026-125396 | 2026

Open-source XDR and SIEM platform for threat detection, log analysis, file integrity monitoring, vulnerability assessment, and compliance management across endpoints and cloud workloads.

Open-source network IDS/IPS/NSM engine for real-time traffic inspection, intrusion detection and prevention, protocol analysis, and rule-based threat hunting.

Zeek is a powerful network analysis framework that is much different from the typical IDS you may know.