Research firm pwn.ai showed how a crafted file exploits Ghostscript flaw CVE-2026-125396 to run commands on servers with WordPress, Roundcube or shared printers. A fix is available.
On November 21, 2026, research firm pwn.ai published its technical analysis of Upload2Shell (CVE-2026-125396), a flaw in Ghostscript, the PDF and PostScript interpreter that many Linux servers use to print, convert files and build previews. With a crafted file, an attacker can get around -dSAFER, Ghostscript's sandbox, and run commands on the server. Artifex, which develops Ghostscript, fixed it in version 10.08.0 on September 8; the CVE record, published on November 9, scores it 8.5 out of 10.
How the file reaches Ghostscript
According to pwn.ai, the application does not have to call Ghostscript itself: image libraries such as ImageMagick (and its PHP extension, Imagick) or Pillow hand it the content when they detect PostScript, even if the file is named .jpg, .png or .pdf. An ordinary feature, such as making a thumbnail, is enough. The firm ran commands in these cases, among others:
- An anonymous print job sent to a shared CUPS queue (the Linux printing service) on Debian 13.
- An email with an attachment disguised as an image in Roundcube, the webmail offered by many hosting services: opening the message was enough, on a server with a permissive ImageMagick setup.
- Public WordPress forms, with no login, built with the Forminator plugin (a PDF form that stores files in the media library) and Essential Addons for Elementor (a sign-up form with a file upload field).
- WordPress itself, with an account that can upload files (Author or higher), when the server has Imagick and Ghostscript.
The CVE record classifies the flaw as local, because someone has to process the file, but pwn.ai reached it remotely through printing, email and web forms. CISA lists no known exploitation, and the firm has only published a partial proof that does not run commands.
What to do
- Update Ghostscript on your Linux servers to version 10.08.0 or to your distribution's fixed package. Ubuntu fixed it on October 21 (USN-8949-1), and Debian fixed it in Debian 13 (DSA-6516-1) and 12 (DLA-4914-1). On November 22, AlmaLinux released fixed packages for AlmaLinux 8, 9 and 10 in its testing repository (
almalinux-testing) while it moves them to production. Amazon Linux and SUSE still have packages pending or in testing, and Red Hat has not published a page or packages for RHEL. - If you run containers or applications that ship their own copy of Ghostscript, rebuild them with the fixed version: updating the server's operating system does not change those copies.
- Keep WordPress up to date (its fix arrived in 7.0.4 and in older branches, such as 6.9.7) and update Roundcube to 1.6.20 or 1.7.5. Those fixes do not replace the Ghostscript one.
- While you update, turn off public forms that accept file uploads and require authentication on shared print queues.
- If your site runs on shared hosting, ask your provider whether it has already updated Ghostscript.
How we help you
With our hosting for business websites and email we review and update Ghostscript, ImageMagick and the server's webmail. With maintenance for your WordPress site we update the core and plugins and check which forms accept files. Ask for a review of your server.
Sources
- pwn.ai: technical analysis of Upload2Shell (CVE-2026-125396) (November 21, 2026)
- CVE: CVE-2026-125396 record (November 9, 2026)
- Artifex: Ghostscript 10.08.0 release (September 8, 2026)
- Ubuntu: Ghostscript notice USN-8949-1 (October 21, 2026)
- Debian: fixed versions for CVE-2026-125396 (accessed November 22, 2026)
- AlmaLinux: patched Ghostscript in the testing repository (November 22, 2026)
- Amazon Linux: CVE-2026-125396 status (accessed November 22, 2026)
- SUSE: CVE-2026-125396 status (accessed November 22, 2026)
- WordPress: CVE-2026-65640 advisory, fixed in 7.0.4 (August 12, 2026)
- Roundcube: security updates 1.6.20 and 1.7.5 (October 19, 2026)
Source: pwn.ai