A Ghostscript sandbox escape dubbed Upload2Shell let a security researcher run commands on servers through ordinary print jobs, email attachments and public upload forms, with confirmed code execution on Debian 13, Roundcube, Plesk, MediaWiki and popular WordPress plugins, and a production hit inside Google’s document renderer.
The flaw, tracked as CVE-2026-125396, is a use-after-free in Ghostscript’s Type 1 font loader that lets a crafted PostScript or PDF document break out of the -dSAFER sandbox.
VulnCheck, the CVE Numbering Authority, rates it 8.5 (High) under CVSS 4.0, and every Ghostscript release before 10.08.0 is listed as affected.
Paulos Yibelo of autonomous pentesting firm pwn.ai published the Upload2Shell evidence index and a technical write-up on Tuesday, November 17. The research explains why the bug spreads so far. Ghostscript sits underneath ImageMagick, Pillow, PHP’s Imagick and other converters, so a file named .png or .jpg can still end up being rendered by Ghostscript.
Artifex fixed the root bug in Ghostscript 10.08.0 on September 8, and Debian, Ubuntu, Arch, Alpine, Gentoo and openSUSE Tumbleweed have shipped fixed builds. As of November 22, Amazon Linux still lists the fix as pending, Debian 12 remains vulnerable, and Red Hat’s tracking bug is still open.
How the Ghostscript Upload2Shell Flaw Works
Ghostscript implements part of its font loading in PostScript itself. According to the CVE record, the .putgstringcopy procedure in gs_fonts.ps calls .forceput, a privileged operator that is supposed to stay out of reach of untrusted documents, without first checking the types of its operands.
A malicious document deliberately triggers a type error inside that procedure. It then catches the error with its own error handler, which hands it back a usable .forceput. That privileged write leaves a reference to a local object alive after a restore frees it, so the attacker gets a use-after-free and, from the reused memory, a write-what-where primitive. Yibelo says that primitive can rewrite the state that enforces -dSAFER, after which commands run under the account of the rendering process.
The upstream fix credits Artifex developer Ken Sharp. His first change checks operands before the failing copy, and a later change moves the helper into C so it no longer depends on .forceput. Sharp told the researchers that “it isn’t easy to undo 30 years worth of assumptions in the code.” The upstream tracking entry is Artifex Bug 709684.
Which Applications Pwn.ai Exploited
Pwn.ai’s evidence index records confirmed command execution in about ten targets, each reached through a different everyday feature. On Debian 13, an anonymous IPP print job sent to a shared CUPS queue ran commands as the lp user. In Roundcube 1.7.2, a recipient who opened an email from an outside sender triggered execution as www-data, provided a tested ImageMagick delegate was configured.
Signed-out visitors reached code execution through public forms in Forminator 1.55.1 and through widgets in Essential Addons for Elementor Lite 6.7.0. Anonymous uploads did the same on MediaWiki 1.46.0 with PdfHandler and on DokuWiki 2026-07-14a. Mayan EDMS 4.11.5 was compromised by an email sent to a configured POP3 source, and ResourceSpace 11.0 by an authenticated upload.
Plesk Obsidian 18.0.79 bundles Roundcube 1.6.17 and Ghostscript 9.54.0, and code ran there as roundcube_sysuser. In one test with AppArmor enforced, though, the shell was blocked, and pwn.ai says it did not test any live Plesk endpoints.
WordPress Core is in a different position because the attacker needs an account. The CMS fixed its exposure separately as CVE-2026-65640 (CVSS 8.8) in WordPress 7.0.4 on August 12, with backports as far back as the 4.7 branch. That attack requires the upload_files capability, which Author accounts and above have by default, plus Imagick and Ghostscript on the server.
At Google, pwn.ai says a signed-out request for an attacker-hosted file reached Ghostscript 10.05.0 in Google’s document renderer. The researchers say they gained native control of the renderer and read the worker’s /proc/version file. They do not claim a full shell. Google mitigated the path on November 10.
Several other names on the researcher’s list need context. The September 25 teaser named Box, Dropbox, Zoom and Wikimedia among the compromised targets. The current evidence index gives no details for Box or Zoom, and it describes the Dropbox case and four redacted production services as separate Ghostscript findings, not Upload2Shell. Meta does not appear anywhere in pwn.ai’s published material. Gradio, ComfyUI, AUTOMATIC1111, InvokeAI, Home Assistant Core, Paperless-ngx, Frappe/ERPNext, CVAT and django-filer are listed only as “source-mapped” code paths, not confirmed exploits.
Which Distributions Have Patched CVE-2026-125396
| Product/Distribution | Status as of November 22, 2026 | Fixed package or advisory |
|---|---|---|
| Ghostscript upstream | Fixed | 10.08.0 (September 8) |
| Debian 13 (Trixie) | Fixed | 10.05.1~dfsg-1+deb13u2, DSA-6516-1; current build +deb13u3 |
| Debian 12 (Bookworm) | Vulnerable | None yet (10.0.0~dfsg-11+deb12u8) |
| Ubuntu 16.04–26.10 | Fixed | USN-8949-1 (October 21) |
| Red Hat Enterprise Linux | Open | Bugzilla 2569593, status NEW |
| Amazon Linux 2 / 2023 | Pending fix | No ALAS advisory yet |
| openSUSE Tumbleweed | Fixed | ghostscript 10.08.0-5.1 |
| SUSE Linux Enterprise / openSUSE Leap 16 | In progress / affected | None yet |
| Arch, Alpine, Gentoo, Fedora Rawhide, Kali | Fixed | 10.08.0 builds |
| Windows, macOS (Homebrew, MacPorts), FreeBSD | Fixed | 10.08.0 |
Debian, Ubuntu and other distributions backported the fix to older Ghostscript branches, so a fixed system can still report a version below 10.08.0. On Ubuntu 24.04 LTS, for example, the fixed package is 10.02.1~dfsg1-0ubuntu7.10, and on Ubuntu 22.04 LTS it is 9.55.0~dfsg1-0ubuntu5.15. Ubuntu’s USN-8949-1 credits Yibelo with a font-loading operand validation flaw and was published before the CVE ID existed.
Pwn.ai’s own write-up says it could not establish fix status for Rocky Linux, AlmaLinux, Oracle Linux or stable Fedora releases. Fix status for Plesk, Elementor, Forminator, Mayan EDMS, DokuWiki, MediaWiki and ResourceSpace is also not stated. Roundcube added its own hardening on October 19, tracked as CVE-2026-114727, which restricts which attachment types are passed to image conversion.
Is CVE-2026-125396 Being Exploited?
No vendor or government agency has reported in-the-wild exploitation of CVE-2026-125396, and the flaw is not in CISA’s Known Exploited Vulnerabilities catalog. Its EPSS score, which estimates the chance of exploitation, stood at 0.0013 after publication.
Pwn.ai has published one self-contained PostScript proof. It corrupts native memory in the renderer but does not spawn a shell or touch host files, and it fails on Ghostscript 10.08.0. The full command-execution chains are not public yet. The researchers say the Debian 13 CUPS chain will be the first full case study and exploit they release, which shortens the time left for anyone still running an unpatched print server.
What Admins Should Do Now
Install your distribution’s fixed Ghostscript package, or upstream 10.08.0, and restart any service that keeps a converter running, such as CUPS, PHP-FPM, queue workers or preview daemons. Check the installed build with dpkg -l ghostscript on Debian and Ubuntu or rpm -q ghostscript on RPM-based systems, and compare it against your vendor’s advisory instead of the upstream version number. gs --version shows the upstream base version only.
Ghostscript copies bundled inside container images and application packages do not get host updates, so rebuild those images as well. Update WordPress to 7.0.4 or a later release such as 7.1.1, or to your branch’s backport such as 6.9.7, and update Roundcube to a release that includes the CVE-2026-114727 change.
Where patching has to wait, pwn.ai recommends four measures. Require authentication on shared print queues. Check a file’s real type before it reaches ImageMagick or Ghostscript. Stop the rendering process from starting a shell, which is what AppArmor did in the Plesk test. And limit which file types are passed to the converter in the first place. Amazon Linux and Red Hat have not published separate workarounds.
Community Discussion
Join the conversation. Ask questions, share solutions, and help others.
Be the first to start the discussion!
