Generating a thumbnail is routine work for a web server. With an unpatched version of Ghostscript installed, the same step can trigger a command hidden in an uploaded file. Researchers at pwn.ai uploaded what looked like a PDF to a public form on a WordPress 7.0.2 site without signing in. Their command ran as the web server user. The flaw, Upload2Shell (CVE-2026-125396), sits in Ghostscript, which ImageMagick calls to render PostScript and PDF files. In CloudLinux’s tests, the public proof of concept also worked inside CageFS, where Ghostscript typically runs with the permissions of the site’s user.
Fixed packages became available through regular updates on AlmaLinux 8, 9 and 10 and CloudLinux 8, 9.9 and 10 on November 23, two days after pwn.ai published its write-up. Red Hat released its updates on November 25.
How a Disguised File Reaches Ghostscript
A PostScript file is a program, and rendering it means running it. Ghostscript’s safe mode, called -dSAFER, is meant to restrict which files that program can read or write and to stop it from starting other commands. Upload2Shell gets around it through a memory flaw in Ghostscript’s font-loading code. ImageMagick decides how to handle a file by its contents rather than its name, so a PostScript file named .pdf, .png or .jpg can still end up in Ghostscript.
One public route was a PDF upload field in a Forminator form, set to save files to the Media Library. The registration widget of Essential Addons for Elementor, with an upload field, worked the same way. In WordPress itself, the Author role was enough, and the project shipped its own mitigation for that path in August, as we reported at the time.
Webmail can reach Ghostscript too. In pwn.ai’s Roundcube test, opening the message was enough: the server made a thumbnail of the attachment and ran the command. The test used an ImageMagick configuration that let files through to Ghostscript. With the Roundcube components shipped in Plesk Obsidian 18.0.79, the researchers ran a command in one tested configuration, calling the image-resizing code directly instead of sending an email. Plesk’s own advisory confirms that the flaw can be reached through Roundcube’s image processing in Plesk for Linux.
VulnCheck, which assigned the CVE, gives the flaw a CVSS 4.0 score of 8.5 out of 10. The score treats the attack as local, although the routes above reach the interpreter over the network. As of its November 25 update, CISA’s catalog of vulnerabilities known to be exploited in attacks does not list the flaw.
Fixed Ghostscript Builds by System
Ghostscript 10.08.0, released on September 8, fixes the flaw, but servers run older versions patched by their distribution. Ubuntu fixed it on October 21, before the flaw had a CVE number. AlmaLinux put its own backport in the testing repository on November 22, when it knew of no fixed packages for RHEL.
| System | Fixed Ghostscript build | Update availability |
|---|---|---|
| Ubuntu 22.04, CloudLinux for Ubuntu 22.04 | 9.55.0~dfsg1-0ubuntu5.15 | October 21 |
| Ubuntu 24.04 | 10.02.1~dfsg1-0ubuntu7.10 | October 21 |
| AlmaLinux 8, CloudLinux 8 | 9.27-20.el8_10.alma.1 | November 23 |
| AlmaLinux 9, CloudLinux 9.9 | 9.54.0-19.el9_8.3.alma.1 | November 23 |
| CloudLinux 9.8 | 9.54.0-19.el9_8.3.alma.1, after updating the cloudlinux-release package | November 25 |
| AlmaLinux 10, CloudLinux 10 | 10.02.1-16.el10_2.3.alma.1 | November 23 |
| RHEL 8 | 9.27-21.el8_10 | November 25 |
| RHEL 9 | 9.54.0-20.el9_9.1 | November 25 |
| RHEL 10 | 10.02.1-17.el10_3.1 | November 25 |
| CloudLinux 7 ELS, 7 Hybrid | 9.25-5.0.1.el7.tuxcare.els5 | In the rollout repository since November 25; stable expected in the coming days |
Long-running services that have the Ghostscript library loaded keep the old copy until they are restarted, AlmaLinux notes, and the dnf needs-restarting command lists them. A host update also leaves any copy of Ghostscript bundled with a container or application untouched. On CageFS servers, CloudLinux asks administrators to follow the update with cagefsctl --force-update; otherwise, users inside CageFS keep the old Ghostscript.
cPanel and Plesk Updates, Plus a Stopgap That Costs PDF Thumbnails
cPanel lists the minimum WordPress versions for each branch as 6.8.8, 6.9.7 and 7.0.4. For the Roundcube that cPanel bundles, the threshold is 1.6.20, and a cPanel update brings in a newer copy when the installed one is older. Plesk ships the same Roundcube version as its fix, in Plesk Obsidian 18.0.81 Update 5 and 18.0.82, and leaves Ghostscript itself to the operating system’s updates.
Roundcube itself tightened what it passes to ImageMagick in 1.6.20 and 1.7.5 on October 19 and released a further fix in 1.6.22 and 1.7.7 on November 23.
As a stopgap, cPanel’s advisory describes blocking Ghostscript in the system ImageMagick policy, including PDF and PostScript files. CloudLinux’s version, tested on CloudLinux 8, 9 and 10 with cPanel and CageFS, covers more ground. It also edits the policy file of alt-ImageMagick, which the imagick extension of alt-php uses, and adds the system ImageMagick settings to CageFS, since users inside it otherwise never see the policy. Its list of blocked file types is longer, with a warning that a shorter one leaves some PostScript types open. Both stopgaps end with a restart of Apache and PHP-FPM.
The trade-off is that ImageMagick no longer handles PDF, EPS or PostScript files, so PDF thumbnails stop working. cPanel’s list of possible side effects adds previews and image resizing in applications such as Roundcube and WordPress. Software that calls an unpatched Ghostscript directly, without ImageMagick, stays exposed. In CloudLinux’s tests with the patched packages, the public proof of concept stopped working, and PDF and PostScript thumbnails still rendered.
Sources
- How We Hacked the Pipes - Upload2Shell - pwn.ai
- Ghostscript flaw (Upload2Shell): updates for CloudLinux - CloudLinux (official)
- Ghostscript CVE-2026-125396 (Upload2Shell) - CloudLinux Status (official)
- Security: CVE-2026-125396 - Ghostscript - Upload2Shell - cPanel Support (official)
- Vulnerability CVE-2026-125396 and CVE-2026-114727 (Upload2Shell): Remote code execution via image processing in Roundcube shipped with Plesk for Linux - Plesk Support (official)
- Upload2Shell (CVE-2026-125396): Patched Ghostscript released - AlmaLinux Blog (official)
- Roundcube Webmail 1.6.22 - Roundcube on GitHub (official)
- Roundcube Webmail 1.6.20 - Roundcube on GitHub (official)
- USN-8949-1: Ghostscript vulnerabilities - Ubuntu Security Notices (official)
- RHSA-2026:103524 ghostscript security update - Red Hat Customer Portal
- RHSA-2026:103523 ghostscript security update - Red Hat Customer Portal
- RHSA-2026:103517 ghostscript security update - Red Hat Customer Portal
- Known Exploited Vulnerabilities Catalog - CISA (official)
- CVE-2026-125396 - CVE Program
- Ghostscript before 10.08.0 -dSAFER Bypass via .putgstringcopy .forceput Recovery - VulnCheck
- Ghostscript/GhostPDL 10.08.0 - Artifex on GitHub (official)
- PS interpreter - validate operands to .putgstringcopy - Artifex on GitHub (official)