Upload2Shell: a fully updated WordPress site can still be exploitable through its own upload form

Paulos Yibelo published the full Upload2Shell writeup on pwn.ai on 21 November, and it is the most uncomfortable WordPress security story of the month precisely because WordPress is not the bug. The flaw is in Ghostscript — the PostScript and PDF interpreter sitting several layers below your site, which nobody installed on purpose and which does not appear anywhere in the WordPress dashboard. An attacker uploads what looks like an image or a PDF, the site generates a preview, and the file runs a command as the web-service user. Two separate things have to be patched to close it, and only one of them is a WordPress update, which makes this a good argument for someone actually checking the libraries sitting underneath each client’s upload form.

What the bug actually is

  • CVE-2026-125396, a use-after-free in Ghostscript’s Type 1 font loader. It gave the researchers a write-what-where primitive — control over both the data written and where it lands in memory — which a crafted document can use to alter the state enforcing Ghostscript’s `-dSAFER` sandbox and run commands as the rendering process
  • Every Ghostscript release before 10.08.0 is affected. Artifex authored the fix on 2 September, committed it on 7 September and released 10.08.0 on 8 September 2026. The CVE itself was only published on 9 November
  • The CVE scores 8.5 under CVSS 4.0 with a local attack vector. The writeup makes the point that the rating understates it: the demonstrations reached the interpreter remotely through WordPress, Roundcube webmail and network print queues

The delivery trick is the ordinary one. A file named `.pdf` contained PostScript bytes; a file named `.png` did too. ImageMagick and Pillow both selected a handler from the content rather than the extension and passed it to Ghostscript. Checking the filename at the upload endpoint does nothing.

The WordPress path

The researchers reached Ghostscript through WordPress generating a preview for an uploaded PDF, on a site using Imagick and ImageMagick — a very common stack on Linux hosting.

  • In WordPress Core, media upload privileges were enough. Authors and above have them by default. WordPress’s own advisory for this, CVE-2026-65640, describes remote code execution on sites using Imagick and Ghostscript
  • Affected core versions per that advisory: 7.0.0–7.0.3, 6.9.0–6.9.6 and earlier branches. WordPress shipped its mitigation in 7.0.4 on 12 August 2026, with backports including 6.9.7
  • Plugins removed the login requirement entirely. Using Forminator 1.55.1, a signed-out visitor submitting a public PDF upload field configured to store files in the Media Library triggered the same conversion path — command executed as the web-service user in 5 of 5 HTTP trials. Essential Addons for Elementor Lite 6.7.0 with a public Login/Register widget and a custom upload field gave the same result, also 5 of 5. Both were tested against WordPress 7.0.2 with Ghostscript 10.05.1

Worth being precise about what that means: those plugins are not the vulnerability. They are doing what they advertise — accepting a file from the public and putting it in the Media Library. The plugin simply converts an Author-level bug into an unauthenticated one.

Why updating WordPress is not the end of it

This is the part that matters on a client portfolio. The WordPress fix and the Ghostscript fix address different points in the same processing path, and the WordPress one landed in August. Any site on a sane update cadence is well past 7.0.4 — current core is 7.1.5 — so core is almost certainly fine. The Ghostscript package underneath it is a separate question, and the answer is uneven.

As of 12 November, the writeup records Debian 12 (Bookworm) still listed as vulnerable, Amazon Linux 2, 2023 and 2027 Preview listed as pending fix, and several SUSE Linux Enterprise and openSUSE Leap branches affected or in progress. Ubuntu published USN-8949-1 on 21 October covering seven releases; Debian patched Trixie and its development branches. The researchers say plainly that they did not establish whether current RHEL, Rocky, AlmaLinux, Oracle Linux or stable Fedora packages contain the fix.

And one more trap, quoted almost directly: updating the host operating system does not update a separate copy of Ghostscript inside an existing container image or application bundle. A document worker can keep running vulnerable code long after the host package has been replaced.

What to check this week

  • Confirm every site is on 7.0.4 / 6.9.7 or later — in practice, current. That is the easy half
  • Ask the host which Ghostscript version the server runs and whether it contains the `.putgstringcopy` fix. “We’re on the latest Debian” is not an answer; Bookworm was still listed vulnerable last week
  • On containerised stacks, check the image, not the host
  • Inventory which client sites accept public file uploads — contact forms with attachments, registration widgets, job application forms, quote request forms. That is where an Author+ issue becomes an anyone issue
  • If a site has no business rendering PDFs, consider removing the PostScript and PDF delegates from the ImageMagick policy entirely

Not just WordPress

The same interpreter was reached through Roundcube 1.7.2 — an external sender emails an attachment declared as `image/jpeg`, the recipient opens the message without clicking the attachment, and the server-side thumbnail generation runs the command as `www-data`. And through CUPS on Debian 13, where an anonymous print job sent to a shared network queue that accepts jobs without authentication ran a command on the print server. If you manage anything beyond websites for a client, both are worth a mention.

What this means for Codelibry clients

If your site is on one of our maintenance plans, the WordPress side of this was applied back in August as part of the normal update cycle, and we are now going through each site to confirm what Ghostscript version the server underneath it is actually running — chasing the hosts that have not shipped the fix yet. It will be written up in your next monthly maintenance report with what we found and what changed. Nothing needs doing on your end. If you are not on a plan, this is a fair illustration of the gap one covers: your WordPress dashboard will show no updates available and say nothing at all about the component that is actually exposed.

Source: pwn.ai

Vitalii Omelchenko
Founder at Codelibry and WordPress enthusiast. Helping digital agencies to protect their margins and do better at website delivery.Need help with wordpress builds? Book a call using the Contact page
our Blog

Explore our Latest Insights

WordPress core landed on the US actively-exploited list four times in 2026. It had never been there before
News
November 20, 2026
PHP shipped 18 CVEs worth of fixes this week. Two of them reach an ordinary WordPress site
News
November 20, 2026
Two critical NGINX HTTP/2 flaws can reach code execution. Updating WordPress will not help
News
November 20, 2026
whatsapp icon