Ghostscript before 10.08.0 enables RCE via PDF previews
Original title: Ghostscript Upload2Shell Flaw Exposes WordPress Sites to Remote Code Execution via ImageMagick
WordPress tracked the app exposure as CVE-2026-65640 and fixed it in 7.0.4, but Ghostscript still needs its own update.
Researchers Paulos Yibelo and pwn.ai reported on November 21, 2026, that a Ghostscript flaw dubbed Upload2Shell can turn PDF preview generation into remote code execution when WordPress uses Imagick and a vulnerable Ghostscript build. CVE-2026-125396 affects Ghostscript before 10.08.0 and is scored CVSS 4.0 8.5. A use-after-free in the Type 1 font loader can defeat -dSAFER; commands run as the rendering process. Merely storing an upload does not trigger it. Updating WordPress does not patch Ghostscript used by other host applications.
Unconfirmed: The report does not say the flaw is being exploited in real attacks.
- The WordPress core path needed media-upload rights, which Authors and higher have by default.
- Some Forminator and Essential Addons for Elementor setups exposed processing to unauthenticated visitors.
- Researchers also reported execution via Roundcube attachment previews and a Debian 13 CUPS queue.
- The Ghostscript CVE’s local attack-vector rating does not exclude remote delivery by a network app.
Impact: Remote code execution as the rendering process
| Product | Affected | Fixed in |
|---|---|---|
| Artifex Ghostscript | before 10.08.0 | 10.08.0 |
| WordPress | — | 7.0.4 |
- 1.Update WordPress core and relevant plugins, then confirm Ghostscript 10.08.0 or a backported package.
- 2.If patching is delayed, suspend preview generation for untrusted documents where possible.
- 3.Isolate rendering in a low-privilege worker and require authentication for shared print queues.
Vulnerabilities mentioned
All| CVE | Vulnerability | CVSS | EPSS | Signals | Published |
|---|---|---|---|---|---|
| CVE-2026-125396 | -dSAFER bypass and code execution in Ghostscript before 10.08.0 | 8.5 | <1% | PoC ×4 | |
| CVE-2026-65640 | Author-Level RCE in WordPress Core via Malicious Postscript File Upload | 8.8 | 2% |
From the original article
3 min read at gbhackers.com
A Ghostscript vulnerability dubbed Upload2Shell can turn routine PDF preview generation into remote code execution on WordPress sites that use Imagick and a vulnerable Ghostscript installation. Security researcher Paulos Yibelo and pwn. ai detailed the flaw on November 21, 2026, reporting that commands run with the rendering process’s permissions.
By Divya · gbhackers.com
A short excerpt; the article and its images belong to the publisher. Summary, key facts and assessment above are AI-written from the article and can be wrong.