Stuart Neal
Director of Operations at Nextgen Marketing
We have worked with Vitalli and his team for well over a year now and will continue to do so in the future.
Having the confidence in an agency that allowed us to scale up and down development resources, as and when needed, has really made a positive difference to our agency.
Home / Blog / News / 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.
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 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.
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.
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.
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.
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