Upload2Shell (CVE-2026-125396): Your Upload Button Might Be a Back Door
Published · by Steffen Stein, Zybee Labs
Somewhere on your website, there’s a friendly little button: “Attach your file.” Résumés, invoices, product photos. Harmless, right? Thanks to a bug called Upload2Shell, it can also be a door, and the thing walking through it may look exactly like a JPEG.
On November 21, 2026, security firm pwn.ai published Upload2Shell: “where you upload a file and get a shell.” Researcher Paulos Yibelo called it “a reliably exploitable file-processing bug affecting almost every application with an upload box that I tested” (Paulos Yibelo on X). The New York Times mentioned it in a story on AI-discovered software flaws (Dylan Freedman, NYT, on X).
What happened
Upload2Shell, tracked as CVE-2026-125396, is a use-after-free in Ghostscript’s Type 1 font loader. Ghostscript is the interpreter that renders PostScript and PDF files, and it runs quietly behind thumbnails, previews, document conversion, and printing. A crafted document can use the bug to switch off Ghostscript’s -dSAFER sandbox in memory and run commands as the rendering process (pwn.ai overview; pwn.ai technical writeup).
The sneaky part: your application never has to call Ghostscript itself. Libraries such as ImageMagick and Pillow decide how to handle a file by its contents, not its name. So PostScript dressed up as .png, .jpg, or .pdf gets handed to Ghostscript the moment your site makes a thumbnail or crops an image (The Hacker News).
pwn.ai says it confirmed command execution in ten products, including:
- Debian 13 CUPS: an anonymous print job to a shared network queue ran a command on the print server.
- Roundcube webmail: an external sender’s attachment was thumbnailed when the recipient simply viewed the email. No click needed.
- WordPress plugins: signed-out visitors reached it through public upload fields in Forminator and Essential Addons for Elementor.
- Google: a signed-out request for an attacker-hosted file reached Ghostscript in Google’s document renderer. Google fixed that path on November 10.
Before publication, Yibelo said he had “remotely+reliably RCE’d 15 different applications & over 10 bugb[ounty] servers” (X).
The good news: Artifex fixed the flaw in Ghostscript 10.08.0 on September 8, 2026, and there have been no reports of attacks using it (The Hacker News). The bad news: distro coverage is uneven (more below).
A side of disclosure drama
The timeline raised eyebrows. The CVE was requested on November 6 and published on November 9, more than two months after the fix, and a September teaser from pwn.ai named companies that don’t appear in the published report (iTnews). On Hacker News, commenters called the landing page dense and hard to read (HN), and vx-underground begged the industry to stop naming bugs “2Shell.” Fair. Still patch it.
Why small-business sites are exposed
You don’t need to run a print server to be in scope. You need an upload box plus something that processes the file afterward:
- Contact and application forms with file uploads. pwn.ai’s Forminator proof used a public PDF form set to store files in the WordPress Media Library (pwn.ai).
- WordPress media thumbnails via Imagick. WordPress Core exposed the renderer to any user with upload rights (Authors and up by default) on sites using Imagick and Ghostscript. WordPress fixed the issue on its end in 7.0.4 on August 12 under a separate CVE, CVE-2026-65640, with backports to older branches (WordPress.org). That doesn’t patch Ghostscript itself, and it doesn’t fix plugin upload paths.
- PDF previews in document portals, wikis, and client areas.
- Webmail such as Roundcube, which hosting panels often bundle. pwn.ai also confirmed the Roundcube thumbnail path shipped with Plesk Obsidian (pwn.ai).
- Shared hosting, where you don’t control which Ghostscript build actually runs.
Are you affected? How to check
1. Is Ghostscript installed, and which version?
gs --version
dpkg -l ghostscript # Debian/Ubuntu
rpm -q ghostscript # RHEL, Rocky, Alma, Fedora, SUSE
Don’t trust the version number alone. Distros backport fixes while keeping an older version string (iTnews). Compare the exact package to your vendor’s tracker:
- Debian: fixed in
10.05.1~dfsg-1+deb13u2and later for Debian 13, and10.0.0~dfsg-11+deb12u9for Debian 12 from the security repository (Debian tracker). - Ubuntu: USN-8949-1 (October 21) shipped the fix before the CVE existed, labeled “No CVE number” (for example,
10.02.1~dfsg1-0ubuntu7.10on 24.04 LTS; pwn.ai writeup). Meanwhile, Ubuntu’s CVE page still says “Needs evaluation.” Confusing? Very. - Still open as of November 12, per pwn.ai: Amazon Linux 2, 2023, and 2027 Preview (Amazon’s tracker still listed these as pending on November 23), several SUSE Linux Enterprise branches (in progress), and openSUSE Leap 16.0/16.1 (affected). pwn.ai did not establish the status of RHEL, Rocky, AlmaLinux, Oracle Linux, or stable Fedora (pwn.ai writeup).
2. On WordPress, ask WordPress. Go to Tools → Site Health → Info → Media Handling. It lists your ImageMagick version and a “Ghostscript version” field, which may show a version or say it cannot determine whether Ghostscript is installed (WordPress source). Also confirm you’re on WordPress 7.0.4 or a patched older branch.
3. Can ImageMagick reach Ghostscript?
convert -list format | grep -i -E 'PS|PDF|EPS|XPS'
identify -list policy # ImageMagick 6
magick identify -list policy # ImageMagick 7
If PS, EPS, PDF, or XPS shows read access (r in the mode column) and your policy has no rule denying them, uploads can reach Ghostscript. The policy file usually lives at /etc/ImageMagick-6/policy.xml or /etc/ImageMagick-7/policy.xml.
4. On shared hosting? Ask your hosting provider. Send them: “Is Ghostscript on my server patched for CVE-2026-125396 (fixed in 10.08.0 or a distro backport)? Does that include webmail and any container images?”
How to fix it
-
Update Ghostscript to 10.08.0 or your distro’s patched build. Then rebuild container images and app bundles. Updating the host OS doesn’t update a separate copy of Ghostscript inside a container (pwn.ai writeup).
-
Lock down ImageMagick’s
policy.xml. If you don’t need PostScript or PDF thumbnails, block those coders:<policy domain="coder" rights="none" pattern="{PS,PS2,PS3,EPS,PDF,XPS}" />ImageMagick’s own security policy guide goes further for public sites, disabling all external delegates, Ghostscript included, with
<policy domain="delegate" rights="none" pattern="*"/>. Trade-off: WordPress PDF previews stop working. -
Update WordPress Core, Roundcube, and plugins with upload forms. Roundcube restricted unsafe attachment image types before conversion under CVE-2026-114727 (pwn.ai).
-
Restrict upload types. Accept only what you need, e.g., JPEG and PNG for photos.
-
Validate by magic bytes, not file names. WordPress’s fix now rejects files starting with PostScript signatures like
%!or a binary EPS header before Imagick ever sees them (WordPress developer reference). In Python, pass an explicitformatslist to Pillow’sImage.open()(Pillow docs). -
Process uploads in a sandbox. Run conversions in an isolated container or worker with minimal rights. In one pwn.ai test, an AppArmor profile stopped the compromised interpreter from starting a shell (The Hacker News).
-
Require authentication on print queues if you run CUPS (The Hacker News).
Not sure what happens after someone clicks “Upload”?
Most small-business owners have no idea which libraries touch an uploaded file, and that’s exactly where Upload2Shell hides. Zybee Labs reviews your WordPress site’s upload forms, media handling, and server setup, applies fixes like the ones above, and verifies they worked.
Get done-for-you WordPress security
Sources: pwn.ai Upload2Shell overview; pwn.ai technical writeup (November 21, 2026); The Hacker News (November 22, 2026); iTnews (November 23, 2026); oss-security; Debian security tracker; Ubuntu USN-8949-1; Ubuntu CVE page; WordPress 7.0.4 release; ImageMagick security policy. This is a developing story; details may change.
Questions
What is Upload2Shell?
It is pwn.ai's name for CVE-2026-125396, a use-after-free in Ghostscript's Type 1 font loader that bypasses the -dSAFER sandbox and can run commands when a crafted file is rendered.
Is Upload2Shell being exploited?
No attacks have been reported as of November 22, 2026, per The Hacker News. Patch anyway; the technical details are public.
Which version fixes CVE-2026-125396?
Ghostscript 10.08.0, released September 8, 2026, or a distro package with the backported fix (for example, Debian's +deb13u2 or later on Debian 13).
I updated WordPress to 7.0.4. Is that enough?
Not entirely. That closes WordPress Core's upload route (CVE-2026-65640). The Ghostscript bug itself still needs a Ghostscript update, and plugin upload forms are separate paths.
My site doesn't run Ghostscript. Can I ignore this?
If Ghostscript isn't installed, this bug can't be exploited on that server. Check your webmail and hosting panel too; they may run on a different server.