What to do5 steps
Upgrade Ghostscript to 10.08.0 or later.
Or install your distribution's package that lists CVE-2026-125396 as fixed. Ubuntu fixed seven releases in USN-8949-1, which predates the CVE and says "No CVE number"; Debian 13 is fixed from
10.05.1~dfsg-1+deb13u2(DSA-6516-1).Check your distribution's tracker.
Do not assume the fix is installed. On 12 November 2026 pwn.ai found Debian 12 still listed as vulnerable, Amazon Linux with a pending fix, and several SUSE and openSUSE Leap lines affected or in progress (pwn.ai).
Update the Ghostscript that the application runs.
An update of the host does not change a copy of Ghostscript inside a container image or an application bundle.
WordPress: upgrade to 7.0.4 or 6.9.7.
Or install the backport for your branch. It mitigates the WordPress Core path (CVE-2026-65640); the Ghostscript fix is still needed.
CUPS: require authentication on shared print queues.
That blocked pwn.ai's unauthenticated print job.
Are you affected?only if all are true
Every setup
- Ghostscript before 10.08.0, or a distribution package without the backported fix, renders the file. -dSAFER does not stop it.
- The attacker can get a file to that renderer: an upload, an email attachment or a print job that the application previews, thumbnails or converts.
- A trusted extension is no protection: in pwn.ai's tests Pillow, ImageMagick (Imagick) and other decoders chose PostScript from the content of files named .png, .jpg or .pdf.
- Not reached in pwn.ai's tests: PHP GD, OpenCV, prebuilt Sharp, Jimp, Java ImageIO and Go's standard image decoders. Storing or copying a file does not render it.
Your setup
CUPS (tested on Debian 13)2 conditions
- A print queue is shared on the network.
- The queue accepts jobs without authentication. No account is needed.
Roundcube (tested on 1.7.2)3 conditions
- The attacker can email a user of the server. No Roundcube account is needed.
- The user views the message. No click on the attachment is needed.
- The ImageMagick delegate policy is permissive.
WordPress Core 7.0.0 to 7.0.3, 6.9.0 to 6.9.62 conditions
- The site uses Imagick and Ghostscript.
- The attacker has an Author or higher account (upload_files).
WordPress with Forminator (tested on 1.55.1)2 conditions
- A public form has a PDF upload field. No account is needed.
- The form stores uploads in the Media Library.
WordPress with Essential Addons for Elementor (tested on Lite 6.7.0)2 conditions
- A public Login/Register widget has a custom upload field. No account is needed.
- Registration is enabled.
MediaWiki with PdfHandler (tested on 1.46.0)1 condition
- The wiki is configured to permit anonymous uploads.
DokuWiki (tested on 2026-07-14a)2 conditions
- The wiki is open to anonymous uploads.
- It uses the optional ImageMagick backend with a permissive policy.
Mayan EDMS (tested on 4.11.5)2 conditions
- A POP3 document source is configured.
- The attacker can email that mailbox. No account is needed.
ResourceSpace (tested on 11.0)1 condition
- The attacker has an account or a valid upload-share link.
Check your version
- Ghostscript version
gs --version - Distribution package (backports keep an older version string)
dpkg -l | grep -i ghostscript - Distribution package (backports keep an older version string)
rpm -qa | grep -i ghostscript - Distribution package (backports keep an older version string)
apk info -v | grep -i ghostscript - Container image
docker run --rm --entrypoint gs <image> --version - Prompt for your own agent, read-onlyAm I affected by Upload2Shell?
Read the prompt
Check whether the systems I am authorized to inspect are affected by Upload2Shell (CVE-2026-125396). A use-after-free in Ghostscript's Type 1 font loader bypasses the -dSAFER sandbox; pwn.ai reached it through image and PDF processing in WordPress, Roundcube, CUPS and other software. Fixed in Ghostscript 10.08.0. It is exploitable under these conditions: - Ghostscript before 10.08.0, or a distribution package without the backported fix, renders the file. -dSAFER does not stop it. - The attacker can get a file to that renderer: an upload, an email attachment or a print job that the application previews, thumbnails or converts. - A trusted extension is no protection: in pwn.ai's tests Pillow, ImageMagick (Imagick) and other decoders chose PostScript from the content of files named .png, .jpg or .pdf. - Not reached in pwn.ai's tests: PHP GD, OpenCV, prebuilt Sharp, Jimp, Java ImageIO and Go's standard image decoders. Storing or copying a file does not render it. - CUPS (tested on Debian 13), only if all are true: A print queue is shared on the network. The queue accepts jobs without authentication. No account is needed. - Roundcube (tested on 1.7.2), only if all are true: The attacker can email a user of the server. No Roundcube account is needed. The user views the message. No click on the attachment is needed. The ImageMagick delegate policy is permissive. - WordPress Core 7.0.0 to 7.0.3, 6.9.0 to 6.9.6, only if all are true: The site uses Imagick and Ghostscript. The attacker has an Author or higher account (upload_files). - WordPress with Forminator (tested on 1.55.1), only if all are true: A public form has a PDF upload field. No account is needed. The form stores uploads in the Media Library. - WordPress with Essential Addons for Elementor (tested on Lite 6.7.0), only if all are true: A public Login/Register widget has a custom upload field. No account is needed. Registration is enabled. - MediaWiki with PdfHandler (tested on 1.46.0), only if all are true: The wiki is configured to permit anonymous uploads. - DokuWiki (tested on 2026-07-14a), only if all are true: The wiki is open to anonymous uploads. It uses the optional ImageMagick backend with a permissive policy. - Mayan EDMS (tested on 4.11.5), only if all are true: A POP3 document source is configured. The attacker can email that mailbox. No account is needed. - ResourceSpace (tested on 11.0), only if all are true: The attacker has an account or a valid upload-share link. Fixed releases: - Ghostscript: 10.08.0 (branch 10) The CVE record lists every release before 10.08.0 as affected. Distribution packages can carry a backported fix under an older version string (Ubuntu USN-8949-1, Debian 13 from 10.05.1~dfsg-1+deb13u2): compare the full package version with the distribution advisory. Commands the catalog lists to find the version or the setting (read each one before you run it): - Ghostscript version: gs --version - Distribution package (backports keep an older version string): dpkg -l | grep -i ghostscript - Distribution package (backports keep an older version string): rpm -qa | grep -i ghostscript - Distribution package (backports keep an older version string): apk info -v | grep -i ghostscript - Container image: docker run --rm --entrypoint gs <image> --version What the catalog says to do on an affected system (report these, do not carry them out): 1. Upgrade Ghostscript to 10.08.0 or later. 2. Check your distribution's tracker. 3. Update the Ghostscript that the application runs. 4. WordPress: upgrade to 7.0.4 or 6.9.7. 5. CUPS: require authentication on shared print queues. For each host, container image or application, report affected, not affected, fixed or unknown, with the evidence, and list anything you could not access. Work read-only: do not change configuration, restart services or send exploit input. More: https://ghostscript.2shell.wtf/upload2shell
Affected versions1 branch
| Ghostscript branch | Fixed in |
|---|---|
| 10 | 10.08.0 |
The CVE record lists every release before 10.08.0 as affected. Distribution packages can carry a backported fix under an older version string (Ubuntu USN-8949-1, Debian 13 from 10.05.1~dfsg-1+deb13u2): compare the full package version with the distribution advisory.
Proof of concept1 public PoC
For testing systems you own or are authorized to test. A PoC repository can be fake or carry malware: read it before you run it.
- Open the PoC
pwn.ai publishes the Upload2Shell write-up with a proof of concept that writes native memory; it does not run a command
Timeline4 events
Patched
WordPress 7.0.4 ships the Core mitigation for its own path (CVE-2026-65640)
Patched
Ghostscript 10.08.0 released with the root fix
Disclosed
CVE-2026-125396 published
Public PoC
pwn.ai publishes the Upload2Shell write-up with a proof of concept that writes native memory; it does not run a command
Sources9 links
Sources checked on . This page tells you how to check and what to install. It cannot tell you that you are safe.