“High”, with a local attack vector and passive user interaction; 7.8 under CVSS 3.1. Red Hat, SUSE and Amazon rate the flaw as “important”, and Ubuntu gives it “medium” priority; the NVD does not yet have its own score. [3][5][15][16][17][14][4]
Upload2Shell CVE-2026-125396A crafted image, PDF or print document can execute commands on the server via Ghostscript
On November 21, 2026, pwn.ai published the details of “Upload2Shell”, a flaw in the PostScript and PDF interpreter Ghostscript (CVE-2026-125396). A crafted file with a harmless name such as image.jpg or invoice.pdf switches off the -dSAFER protection mode as soon as an application converts it into a thumbnail or another format. Researcher Paulos Yibelo demonstrated this via uploads in WordPress, Roundcube’s mail preview and anonymous print jobs to CUPS. The bug has been fixed since Ghostscript 10.08.0 of September 8; updates for Red Hat, SUSE Linux Enterprise and Amazon Linux are still missing. No attacks are known so far, but third-party exploit tools have been available on GitHub since November 22.
- CVSS 4.0: 8.5 (VulnCheck, rated as a local attack) · BSI: risk “high”
- Affected: Ghostscript before 10.08.0 without a backport, also as a library and in containers
- Fix: Ghostscript 10.08.0 of September 8, 2026 · WordPress 7.0.4 · Roundcube 1.7.7
- Reachable via uploads, mail attachments and print jobs
What happened and what it means for you
Upload2Shell is not in a single application but in Ghostscript, the interpreter for PostScript and PDF that many programs call in the background. Image libraries such as ImageMagick or Pillow recognize PostScript by its content, not by the file name, and pass it on to Ghostscript. There, a crafted font causes the interpreter to switch off its protection mode. Three questions determine whether you are affected: the Ghostscript version, whether untrusted files reach the renderer and which safeguards are in front of it. [1][3][8]
- The renderer is affected, not your upload form. Ghostscript often works out of sight: as a helper program for ImageMagick, as a plugin for Pillow or Qt, as an embedded library or as a filter in the CUPS printing system. Even application code that is free of errors is open to attack if it passes untrusted files to such a library.
- The file extension offers no protection. In pwn.ai’s tests, PostScript in files with the extension .jpg, .png or .pdf was enough, because the libraries decide based on the content. Anyone who only checks the actual file type after the thumbnail has been created lets the renderer run first.
- Many paths, some without authentication. pwn.ai demonstrates chains via anonymous print jobs to CUPS in Debian 13, Roundcube’s mail preview, public upload fields in WordPress plugins, MediaWiki, DokuWiki and other applications. According to pwn.ai, there was also a path without authentication in Google Docs, which Google closed on November 10.
- The fix is a Ghostscript update, including in images and application packages. Ghostscript 10.08.0 fixes the bug, and Debian and Ubuntu provide backports. Container images and application packages with their own copy, however, only receive the fix with a rebuild; updating the host is not enough.
- Enterprise distributions do not yet provide updates. As of November 23, Red Hat (RHEL 7 to 10), SUSE (SUSE Linux Enterprise) and Amazon (Amazon Linux) had not yet released patched packages; AlmaLinux has been testing its own backports since November 22. Until then, hardening and isolation have to carry the load.
What is established
- Ghostscript 10.08.0 of September 8 closes the flaw: the patch validates the operands of the internal procedure .putgstringcopy. A second commit of September 11, after the release, reimplements the procedure in C so that it no longer needs .forceput.
- VulnCheck did not assign the CVE number until November 9, two months after the fix. On November 21, pwn.ai published the full analysis, along with a PoC that demonstrates the memory access but does not itself execute a command.
- Since November 22, several third-party tools have been available on GitHub that, according to their authors, generate working attack files. Germany’s Federal Office for Information Security (BSI) has been warning with the risk rating “high” since November 10 and has updated its warning to mention a public PoC.
- WordPress closed its path as early as August 12 with version 7.0.4 (CVE-2026-65640), and Roundcube did so in three rounds, most recently with versions 1.7.7 and 1.6.22 of November 23.
- Debian 12 and 13, Ubuntu, Alpine, Arch, Homebrew and openSUSE Tumbleweed provide patched packages.
- The flaw is not in CISA’s KEV catalog, and no attacks are known. In its SSVC assessment, CISA rates the technical impact as “total”, meaning full control over the affected software, but exploitation as not automatable.
What remains unclear
- When patched packages will be released for Red Hat, SUSE Linux Enterprise, Amazon Linux and the stable Fedora versions.
- Whether Ubuntu will assign the CVE to its update of October 21; on November 23, the CVE page still showed “Needs evaluation”.
- How quickly wikis, document management systems, hosting panels and plugins will follow suit; pwn.ai does not state a patch status for MediaWiki, DokuWiki, Mayan EDMS, ResourceSpace, Plesk or the WordPress plugins.
- When pwn.ai will publish the full chain against CUPS, including a PoC; it has been announced as the next part of the series.
- Which other services are affected: the announcement of September 25 also named Box, Dropbox and Zoom. The report does not document a path for Box or Zoom, and according to pwn.ai, Dropbox’s maximum bounty concerned a different Ghostscript bug.
How an upload turns into a shell
pwn.ai describes the full chain, and the CVE record and Artifex’s patch commit confirm its core. The steps show the path via an image upload; for mail previews and printing, only the entry point differs. [1][3][6][7][46]
- According to pwn.ai
File with a harmless name
Attackers upload a file named image.jpg or invoice.pdf that actually contains PostScript. With Roundcube, a mail attachment declared as a JPEG image is enough; with CUPS, an anonymous print job to a shared queue.
- According to pwn.ai
The library passes it on
For a thumbnail, metadata or conversion, the application opens the file with ImageMagick, Pillow, libvips or Qt. The library recognizes PostScript by its content and starts Ghostscript in the -dSAFER protection mode, often without anyone clicking on the file.
- According to pwn.ai and the CVE record
A type error with consequences
A crafted Type 1 font makes the internal procedure .putgstringcopy run into a type error. An error handler defined in the file then passes its own operands to the pending privileged write operator .forceput; .forceput is only supposed to modify internal, write-protected dictionaries.
- According to pwn.ai and the CVE record
Dangling reference
This places a reference to an object in local memory in a global dictionary. After restore, Ghostscript frees the memory, but the reference remains: a use-after-free through which the file reads and writes the interpreter’s memory.
- According to pwn.ai and the CVE record
Protection off, command on
With four write operations, the file clears the path_control_active flag; -dSAFER then only remains on the command line. Via the pipe device %pipe%, a command runs with the privileges of the service, such as www-data or lp in the tests.
What Upload2Shell is not
- Not a classic upload bypass: the file does not need to end up on the server as a script, and it never has to be accessed. What makes it dangerous is simply that it gets rendered.
- Not just a problem for programs that call gs: Ghostscript also works as an embedded library within the application’s process, so searching the code for gs calls falls short.
- Not every kind of image processing: in pwn.ai’s tests, PHP GD, OpenCV, prebuilt Sharp, Jimp, Java ImageIO and the Go standard decoders did not start Ghostscript. Merely storing or copying a file does not render it.
Why the flaw is still urgent
- According to pwn.ai, many chains require neither authentication nor a click: a print job, the preview of an email or a public upload field is enough.
- The technique and a memory PoC have been public since November 21, and since November 22, so have third-party tools that, according to their authors, generate ready-to-use attack files.
- Ghostscript is inside images, appliances and application packages that no package manager on the host covers.
- Fixes are missing for RHEL, SUSE Linux Enterprise and Amazon Linux. VamiSec assessment: the rating as a local attack underestimates the situation for servers that process untrusted files.
From silent fix to public chain
Two months passed between the fix and the CVE number. During that time, individual applications closed their paths, while many servers continued to use a vulnerable Ghostscript.
- Research
- Research
- Vendor
- Vendor
Ghostscript 10.08.0
Artifex releases the version with the note that it addresses “a number of potential security issues”, without a CVE number for this bug. Ken Sharp had written the patch for bug 709684 on September 2, and it had been public since the previous day. Arch Linux builds the package on the same day; it has been in the repository since September 11. [8][9][6][19][50]
- Research
Reports to vendors
On September 17 and 18, reports go out to Debian, Roundcube, Plesk, the Forminator and Essential Addons for Elementor plugins, Mayan EDMS, DokuWiki and Wikimedia. [2]
- Vendor
- Vendor
- Vendor
Ubuntu update without a number
With USN-8949-1, Ubuntu fixes, among other things, a font-loading bug reported by Paulos Yibelo in all maintained versions, without a CVE number. [13]
- Vendor
Debian 12 follows
The LTS team ships DLA-4914-1 for Bookworm, which explicitly names CVE-2026-125396. [12]
- Research
- Threat
Exploit tools on GitHub
Several third parties publish tools on GitHub that, according to their authors, generate working attack files for Ghostscript before 10.08.0, one of them explicitly for versions 9.26 to 10.07.1. Overnight into November 23, the BSI references one of these PoCs in its warning; there are still no known attacks. [58][45]
- Vendor
AlmaLinux tests its own fix
AlmaLinux places packages it has backported itself for versions 8, 9 and 10 in its testing repository; there is still no update for RHEL. [54]
- Vendor
Roundcube, third round
Roundcube 1.7.7 and 1.6.22 once again prevent unsafe attachments (PDF, PostScript, SVG) from reaching ImageMagick. [27]
Where Ghostscript gets to see untrusted files
A system is vulnerable if three conditions coincide. You can check the first here in seconds; the second applies to more applications than you might think.
- Ghostscript before 10.08.0 without a backport
As the gs program, as the libgs library in an application’s process or as a copy in container images and application packages. Distribution packages with a backport often keep the old version number.
- Untrusted files reach the renderer
Uploads, mail attachments, print jobs or document imports that a library converts into thumbnails, PDF or other formats. What matters is the content of the file, not its name.
- No effective safeguard in front of it
No check of the actual file type before rendering, an ImageMagick policy that lets PostScript variants through, and a renderer that is allowed to start a shell. According to pwn.ai, some chains require a permissive ImageMagick configuration.
Ghostscript check
Paste the output of gs --version or gs -v, or a line from dpkg -l, apt policy, rpm -qa or apk. The check shows whether the version contains the fix, including for distribution packages with a backport.
The check runs only in your browser; nothing is transmitted.
The result appears as soon as you enter a Ghostscript version or a package line.
- Fixed as of version
- Ghostscript (Artifex)
10.08.0 - Debian 13
10.05.1~dfsg-1+deb13u2 - Debian 12
10.0.0~dfsg-11+deb12u9 - Ubuntu 26.04
10.06.0~dfsg-3ubuntu1.2 - Ubuntu 24.04
10.02.1~dfsg1-0ubuntu7.10 - Ubuntu 22.04
9.55.0~dfsg1-0ubuntu5.15
Debian and Ubuntu include fixes without a new Ghostscript version number; there, the package version is what counts. Check every copy: host, container images and application packages.
| Platform | Lines | Version with fix | Status |
|---|---|---|---|
| Ghostscript (Artifex) | < 10.08.0 | 10.08.0 | Fix availableRelease of September 8 with the note that it addresses “a number of potential security issues”; the patch validates the operands of .putgstringcopy. Source packages and Windows installers since the same day. [8][9][6] |
| Debian | 12 bookworm13 trixie14 forky · sid | 10.0.0~dfsg-11+deb12u910.05.1~dfsg-1+deb13u210.08.0~dfsg-1 | Fix availableDebian 13 since DSA-6516-1 of September 25 (+deb13u2), which at the time only named CVE-2026-39919; the tracker assigns CVE-2026-125396 to this update. The current version is +deb13u3 from DSA-6550-1 of October 10, which closes another -dSAFER bypass (CVE-2026-101258). Debian 12 since DLA-4914-1 of November 17. The tracker no longer lists Debian 11. [10][11][59][12] |
| Ubuntu | 22.04 LTS24.04 LTS26.04 LTS26.10 | 9.55.0~dfsg1-0ubuntu5.1510.02.1~dfsg1-0ubuntu7.1010.06.0~dfsg-3ubuntu1.210.07.1~dfsg-1ubuntu2.1 | Check noteUSN-8949-1 of October 21, for 18.04 and 20.04 via Ubuntu Pro (ESM), for 16.04 only with the Legacy add-on. The update fixes a font-loading bug reported by Paulos Yibelo, without a CVE number; on November 23, Ubuntu’s CVE page still showed “Needs evaluation”. [13][14] |
| Red Hat Enterprise Linux | RHEL 7RHEL 8RHEL 9RHEL 10 | – | Fix pendingRed Hat rates the flaw as “important” (CVSS 7.8); RHEL 7 to 10 are affected, and an update was still pending on November 23. Rocky Linux and Oracle Linux are based on RHEL and usually follow its updates. [15] |
| AlmaLinux (testing) | AlmaLinux 8AlmaLinux 9AlmaLinux 10 | 9.27-20.el8_10.alma.19.54.0-19.el9_8.3.alma.110.02.1-16.el10_2.3.alma.1 | PartialAlmaLinux backported the fix itself on November 22 and is asking for testing; the packages come from the almalinux-testing repository. Afterwards, restart services and update containers separately. [54] |
| SUSE and openSUSE | TumbleweedSLE 12 SP5 · 15 SP4–SP7 · 16Leap 16.0 · 16.1 | 10.08.0-5.1 | PartialTumbleweed is patched. For SUSE Linux Enterprise 12 SP5 and 15 SP4 to SP7, packages are in quality assurance, and for SLES 16, the fix is in progress; openSUSE Leap 16.0 and 16.1 are affected. As an end-of-life version, Leap 15.6 no longer receives updates. SUSE rates the flaw as “important”. [16] |
| Amazon Linux | AL2AL2023AL2027 Preview | – | Fix pendingAmazon rates the flaw as “important”; for Amazon Linux 2, 2023 and 2027 Preview, the fix is pending (“Pending Fix”). [17] |
| Fedora and Arch Linux | RawhideArchFedora 43–45 | 10.08.0-1.fc4610.08.0-1 | PartialFedora Rawhide and Arch are patched, Arch since September 11. Fedora 43 to 45 ship 10.05.1, 10.06.0 and 10.07.1 without a security advisory. [18][19] |
| Alpine Linux | 3.223.233.24edge | 10.08.0-r0 | Fix availablePackages 10.08.0-r0 for edge, 3.24 and 3.23 since mid-October, and for 3.22 since November 22. [20][1] |
| Gentoo, FreeBSD, NetBSD, Nixpkgs, Kali | GentooFreeBSDNetBSDNixpkgsKali | 10.08.0 | Fix availableUpdated to 10.08.0, according to pwn.ai. [1] |
| Windows and macOS | WindowsHomebrewMacPortsChocolateyconda-forge | 10.08.0 | Fix availableThe installers from Artifex, Homebrew, MacPorts, Chocolatey and conda-forge provide 10.08.0. Programs with their own copy of Ghostscript need an update from their vendor. [9][21][1] |
| Container images, application packages, appliances | Docker · OCISnap · Flatpak · AppImageAppliances | – | Check noteA host update does not reach a separate copy of Ghostscript in images or application packages; rebuild images without the cache. VamiSec assessment: the same applies to snaps, Flatpaks, AppImages and appliances with their own copy; only the vendor’s update helps there. [1] |
Your vendor’s security advisory is what counts. Distributions often build fixes into older version numbers, container images only receive the fix with the next build, and long-running services need a restart.
Which libraries start Ghostscript
pwn.ai tested 29 image interfaces with 145 harmless calls on Ubuntu 24.04. What matters is which function an application calls: identifying a file alone usually does not start Ghostscript, but loading, resizing or converting does. [1]
Started Ghostscript
- Pillow 13.0.0load(), crop() and thumbnail() with EPS content, even in a file ending in .png; Image.open() alone only identifies the file.
- imageio 2.38.2 · scikit-image 0.26.0imread() via Pillow.
- PHP Imagick · ImageMagick 6.9.12-98readImage() passes PostScript on to Ghostscript, even in a file with the extension .pdf.
- libvips 8.15.1 · pyvips 3.2.0 · Ruby Vips 2.3.0Depends on the installed loaders; in Ruby, Ghostscript started, but the preview aborted with an error.
- Qt with KImageFormats 5.115.0The EPS plugin renders on loading; canRead() alone does not.
- Matplotlib 3.11.2Files with the extension .eps reach Ghostscript; the same bytes as .png were rejected.
Did not start Ghostscript
- PHP GD
- OpenCV
- Sharp (prebuilt binaries)
- Jimp
- Java ImageIO
- Go standard decoders
- Storing or copying a file
Results for the tested versions and builds. Other builds may behave differently, for example Sharp with the system libvips or ImageMagick with embedded Ghostscript.
Applications with a demonstrated or possible path
In these products, pwn.ai has demonstrated the path to Ghostscript or traced it in the code. Application updates close their path but do not replace the Ghostscript update.
- WordPress
CVE-2026-65640: users with upload permission, from the Author role upward, could execute code via a PostScript file if Imagick and Ghostscript are installed. Fixed in 7.0.4 of August 12 and in backports down to 4.7, such as 6.9.7 and 4.7.35; newer versions also contain the fix. Patchstack additionally describes paths via XML-RPC and cover images in MP3 files. The update closes the WordPress path; Ghostscript itself still needs to be updated. [22][23][24][48]
- WordPress plugins with public uploads
Via upload fields in Forminator (tested: 1.55.1) and Essential Addons for Elementor (Lite 6.7.0), visitors without authentication reached the renderer; with Forminator, the file ended up in the media library, for which WordPress generates thumbnails. The changelogs do not mention a fix related to Upload2Shell; since 1.58.4, Forminator rejects featured images whose content does not match an allowed image type. The current versions are Forminator 1.58.6 and Essential Addons 6.8.9. [1][55][56]
- Roundcube
According to pwn.ai, in version 1.7.2 with a permissive ImageMagick configuration, viewing a crafted email was enough: ImageMagick used Ghostscript to convert the attachment, declared as a JPEG, into a thumbnail. Fixes in three rounds: 1.7.5 and 1.6.20 (October 19, CVE-2026-114727), 1.7.6 and 1.6.21 (November 9), 1.7.7 and 1.6.22 (November 23). [1][25][26][27][28]
- CUPS (Debian 13)
An anonymous print job to a shared queue went through the gstopdf filter into Ghostscript, and the command ran with the privileges of the print account lp. A queue that requires authentication blocks this path. pwn.ai plans to publish the full chain next. [1][38]
- Wikis, document and media management
MediaWiki 1.46.0 with PdfHandler, DokuWiki 2026-07-14a (with the optional ImageMagick backend and a permissive policy) and ResourceSpace 11.0 (via the API) each showed command execution in five out of five attempts, and Mayan EDMS 4.11.5 (via incoming emails) in one complete run. pwn.ai informed the vendors in September; the report does not state a patch status. [1][2]
- Plesk Obsidian
In the bundled stack of Plesk 18.0.79, Roundcube 1.6.17 and Ghostscript 9.54.0, the chain succeeded in five out of five attempts against the individual components. With AppArmor enforced, the profile blocked the shell; pwn.ai did not test the shipped endpoint. [1][2]
- Google
According to pwn.ai, an unauthenticated request in Google Docs reached a PostScript file supplied by the attacker; uploads in Chat, Drive and Gmail were further paths. The proof read the worker’s /proc/version file; Google closed the path on November 10. [1][2]
- AI, data and automation tools
With Gradio 6.32.0, a file reached the renderer via Pillow even before the application’s function ran. For InvokeAI, AUTOMATIC1111, ComfyUI, CVAT, Paperless-ngx, Frappe/ERPNext, Home Assistant and django-filer, pwn.ai only traced the code path, without proof. Check such tools anyway if they accept untrusted files. [1][2]
As of November 23, 2026, 2 p.m. CET, according to the vendors and pwn.ai. The commands below show which Ghostscript version an application uses.
Not affected
- Ghostscript 10.08.0 or later and distribution packages with the fix, once long-running services have been restarted and images rebuilt
- Systems without Ghostscript, also verified in containers and application packages
- Applications that only store untrusted files or process them exclusively with libraries that have no path to Ghostscript, such as PHP GD, OpenCV or Java ImageIO
Not affected does not mean permanently safe: a new plugin, a preview function or an additional image loader can open up the path. A strict ImageMagick policy reduces the risk but does not replace the update; in March, pwn.ai showed that format lists can be bypassed via variants such as EPSI or EPT.
Find Ghostscript (Linux)
Shows the version on the PATH, lists all Ghostscript binaries and libgs copies, including bundled ones, without executing them, and lists the installed distribution packages.
# Ghostscript on PATH
command -v gs >/dev/null && gs --version
# All Ghostscript binaries and libgs copies, including bundled ones
# (prints paths only, nothing is executed)
find / \( -path /proc -o -path /sys -o -path /dev \) -prune -o \
\( -type f -o -type l \) \( -name gs -o -name gsc -o -name 'libgs.so*' -o -name 'libgs*.dylib' \) \
-print 2>/dev/null
# Distribution packages: backports keep the old upstream number,
# compare them with the fix matrix
dpkg -l 'ghostscript*' 'libgs*' 2>/dev/null | grep '^ii' ||
rpm -qa 'ghostscript*' 'libgs*' 2>/dev/null ||
apk info -vv 2>/dev/null | grep -i ghostscriptCheck containers and images
Queries the Ghostscript version and packages in running containers, including libgs-only copies, and checks an image before rollout without starting the application. Check containers without a shell with an image scanner.
# Ghostscript inside running containers (binary and packages, also libgs-only copies)
for c in $(docker ps -q); do
echo "== $(docker inspect -f '{{.Config.Image}}' "$c")"
docker exec "$c" sh -c 'gs --version 2>/dev/null; dpkg -l 2>/dev/null | grep -E "ghostscript|libgs";
rpm -qa 2>/dev/null | grep -iE "ghostscript|libgs"; apk info -vv 2>/dev/null | grep -iE "ghostscript|libgs"; true' \
2>/dev/null || echo " no shell in container: scan the image instead"
done
# Check an image before rollout without starting the application
IMAGE=registry.example.com/app:latest # adjust
docker run --rm --entrypoint sh "$IMAGE" -c \
'gs --version 2>/dev/null; dpkg -l 2>/dev/null | grep -E "ghostscript|libgs";
rpm -qa 2>/dev/null | grep -iE "ghostscript|libgs"; apk info -vv 2>/dev/null | grep -iE "ghostscript|libgs"; true'Check and harden the ImageMagick policy
Shows the active policy and the formats that ImageMagick hands to Ghostscript. The first entry blocks entire modules instead of individual format names, the second all external helper programs; if you need any, for example for videos, leave it out. Then restart PHP-FPM, workers and other services that use Imagick, because they only read the policy at startup. The test with the command for your ImageMagick version must fail with a policy error; what counts is the policy of the version your application loads.
# Active policy and the formats ImageMagick would hand to Ghostscript
magick -list policy 2>/dev/null || convert -list policy
magick -list format 2>/dev/null | grep -iE 'postscript|pdf|xps|pcl' ||
convert -list format | grep -iE 'postscript|pdf|xps|pcl'
# policy.xml, inside <policymap>: block whole modules instead of single format names,
# because variants such as EPSI, EPI, EPSF or EPT slip past name lists
# <policy domain="module" rights="none" pattern="{PS,EPT,PDF,XPS,PCL}"/>
# <policy domain="delegate" rights="none" pattern="*"/>
# Restart PHP-FPM and workers afterwards: running processes keep the old policy
# Test with a harmless file: the command for your ImageMagick version must now fail with
# "attempt to perform an operation not allowed by the security policy"
printf '%%!PS\nshowpage\n' > /tmp/policy-test.eps
magick /tmp/policy-test.eps /tmp/policy-test.png # ImageMagick 7
convert /tmp/policy-test.eps /tmp/policy-test.png # ImageMagick 6Secure Pillow and libvips
Pillow only accepts the expected formats and never calls Ghostscript. For libvips 8.13 and later, an environment variable blocks all loaders marked as untrusted; set it in the service’s environment, for example in the systemd unit or the PHP-FPM pool, and restart the service.
# Pillow: accept only the raster formats you expect; EPS never reaches Ghostscript
from PIL import Image, EpsImagePlugin
EpsImagePlugin.gs_binary = False # documented switch: never call Ghostscript
ALLOWED = ("PNG", "JPEG", "GIF", "WEBP")
with Image.open(upload_path, formats=ALLOWED) as im: # anything else raises an error
im.thumbnail((512, 512))
# libvips 8.13+ (pyvips, ruby-vips, sharp with system libvips):
# block all loaders marked as untrusted; "vips -l" shows which ones
# export VIPS_BLOCK_UNTRUSTED=1How well prepared are you for Upload2Shell?
Eight questions, answered honestly. “Yes” is always the safe answer. The evaluation stays in your browser.
0 of 8 questions answered
The self-check is no substitute for an assessment of your environment.
What to do now
Three stages: update or harden reachable systems today, cover the full breadth this week, then isolate file processing as a matter of principle. Where no update is available yet, hardening and isolation have to carry the load. [9][22][27][33][34][35][36][37][38][1][2]
Close the exposure
- List systems that render untrusted files from the internet: WordPress, Roundcube and other webmail applications, wikis, document and media management, hosting panels, shared print queues and AI tools with uploads.
- Update Ghostscript to 10.08.0 or the patched package, such as Debian 13 as of +deb13u2 (preferably the current +deb13u3), Debian 12 as of +deb12u9 or Ubuntu with USN-8949-1, then restart workers, PHP-FPM and CUPS.
- Update WordPress to 7.0.4 or later, or to the matching backport, and Roundcube to 1.7.7 or 1.6.22.
- Where no update is available, for example on RHEL, SUSE Linux Enterprise or Amazon Linux: block Ghostscript modules in ImageMagick, set EpsImagePlugin.gs_binary = False in Pillow, temporarily disable thumbnails for untrusted files and configure CUPS queues to accept jobs only after authentication; then restart PHP-FPM and workers so that the blocks take effect.
- Use the queries below to search for child processes of Ghostscript and suspicious files.
Cover the full breadth
- Rebuild container images without the cache and roll them out; track down bundled copies in application packages, appliances and Windows installations.
- Check the actual file type before rendering and reject everything that is not on an allowlist.
- Restrict the renderer: its own account, no credentials, no network, an AppArmor or seccomp profile without a shell. According to pwn.ai, an enforced AppArmor profile blocked the shell in Plesk.
- Ask vendors of wikis, document management systems, hosting panels and plugins about their patch status and record their answers.
- Review public upload fields in WordPress plugins and do not route uploads without authentication directly into the media library.
Secure file processing for the long term
- Keep Ghostscript, ImageMagick and image libraries, along with their dependencies, in your inventory and SBOM, including transitive paths such as Pillow to Ghostscript.
- Convert untrusted documents in isolated, disposable environments, not within the web application’s process.
- Do not let pentests stop at the upload boundary; include the processing chain behind it.
- Set patch deadlines for libraries and renderers, and monitor the distributions’ trackers for fixes that are still outstanding.
- Contractually commit suppliers of appliances and software with embedded Ghostscript to update deadlines.
- Record lessons learned and practice the emergency process for flaws in libraries.
For IT operations and the SOC
- Report the update status daily, systems that accept files from the internet first.
- Monitor child processes of Ghostscript and ImageMagick centrally and assess findings immediately.
- Check upload, mail and spool directories for PostScript content with the wrong file extension.
For executive management and the information security officer
- Make systems that accept files the priority and follow up on progress.
- Where distributions do not yet provide a fix, document the residual risks until the update.
- Clarify whether a suspected incident is reportable under NIS2, DORA or the GDPR and, as a manufacturer, review your obligations under the Cyber Resilience Act.
Isolate the system, preserve logs as well as upload and spool directories, and replace all credentials known to the service, such as database passwords from wp-config.php and mail and API credentials. Search for web shells in upload directories, new cron jobs and new accounts. Our CSIRT supports you around the clock.
Hunting for traces
No attacks are known, but third-party exploit tools have been publicly available since November 22. Search back to at least July 27, the day of discovery, and repeat the search regularly. Advanced hunting in Defender XDR only goes back 30 days by default; for the period from July 27 onward, you need Microsoft Sentinel or another long-term archive. Ghostscript does not normally start a shell when rendering, so this is the strongest signal; an existing Splunk detection for Ghostscript starting a shell also covers this step. For your inventory, scanners such as Tenable and Rapid7 detect affected packages. The queries are examples; test them in your environment before use. [39][40][57][52][53][1]
Ghostscript starts a shell
Finds shells, downloaders and script interpreters in Defender XDR that Ghostscript started as a separate process. If Ghostscript runs as a library within the application’s process, for example via ImageMagick with gslib in PHP-FPM, the parent process is the application itself; in that case, also monitor shells under web, mail and print services. Print filters that deliberately work with pipes may need exceptions.
// Advanced hunting covers the last 30 days; use Microsoft Sentinel or another archive for the period since 27 July
DeviceProcessEvents
| where Timestamp > ago(30d)
| where InitiatingProcessFileName in~ ("gs", "gsc", "gswin64c.exe", "gswin32c.exe")
or InitiatingProcessCommandLine has_any ("-dSAFER", "-sDEVICE=")
| where FileName in~ ("sh", "bash", "dash", "zsh", "busybox", "curl", "wget", "nc", "ncat", "socat",
"perl", "cmd.exe", "powershell.exe", "pwsh.exe")
or FileName startswith "python" or FileName startswith "php" or FileName startswith "nc."
| project Timestamp, DeviceName, AccountName, FileName, ProcessCommandLine,
InitiatingProcessFileName, InitiatingProcessCommandLine, InitiatingProcessParentFileNameRuntime rule for hosts and containers
The Falco rule triggers as soon as gs or gsc starts a shell or a network tool, on servers as well as in Kubernetes; it uses the spawned_process macro from the Falco default rules. It does not apply to Ghostscript as an embedded library; for that, monitor shells under web, PHP-FPM and print services, for example with the default rule “Run shell untrusted”, adapted to your services.
- rule: Shell or downloader started by Ghostscript
desc: >
Ghostscript should never start a shell or network tool while rendering uploads,
mail attachments or print jobs; typical for -dSAFER escapes such as Upload2Shell.
Needs the spawned_process macro from the default Falco rules.
condition: >
spawned_process and proc.pname in (gs, gsc)
and (proc.name in (sh, bash, dash, zsh, busybox, curl, wget, nc, ncat, socat, perl)
or proc.name startswith python or proc.name startswith php)
output: >
Ghostscript child process (user=%user.name parent=%proc.pname cmd=%proc.cmdline
container=%container.id)
priority: CRITICAL
tags: [host, container, process, mitre_execution]Quick check on the server
Shows child processes of running Ghostscript processes and files in upload, mail and spool directories that contain PostScript, regardless of their names. Legitimate EPS uploads do exist, so check the context.
# Children of running Ghostscript processes (normally none)
for p in $(pgrep -x gs; pgrep -x gsc); do pgrep -a -P "$p"; done
# Files whose content is PostScript/EPS, whatever their name
UPLOAD_DIR=/var/www # adjust: upload, attachment and spool directories
find "$UPLOAD_DIR" -type f -size -50M -print0 2>/dev/null |
while IFS= read -r -d '' f; do
case "$(file -b --mime-type "$f")" in
application/postscript|image/x-eps) echo "$f" ;;
esac
doneWeb shells and marker files
pwn.ai’s WordPress chain wrote a PHP file. The query searches for new PHP files in upload directories and for recent files owned by web and print accounts in temporary directories.
# New PHP files in upload directories since the discovery (adjust the date)
find /var/www -path '*/uploads/*' -type f -name '*.php' -newermt '2026-07-27' -print 2>/dev/null
# Fresh files of web and print service accounts in temporary directories
# (existing accounts only: find aborts on unknown user names)
for u in www-data apache nginx lp; do
id -u "$u" >/dev/null 2>&1 || continue
find /tmp /var/tmp /dev/shm -type f -newermt '2026-07-27' -user "$u" -print 2>/dev/null
doneHits are indications, not proof, and their absence does not prove that nothing has happened. If you find something, treat the system as compromised until proven otherwise.
What regulation says about it
The flaw itself is not a reportable incident. What attackers do with it can become reportable, and manufacturers have obligations of their own.
- Handling vulnerabilities is mandatory
NIS2 requires essential and important entities to have risk management in place that includes vulnerability handling. Anyone who knows that servers render untrusted files with a vulnerable Ghostscript and does not act may have to justify it; where the fix is still missing, the hardening should be documented.
- Reporting deadlines in an emergency
If an attack leads to a significant security incident, the following applies in Germany: early warning to the BSI within 24 hours, notification within 72 hours, final report no later than one month after the notification. If personal data is affected, such as emails or documents, the 72-hour notification under the GDPR also applies.
- Manufacturers: Cyber Resilience Act
Since September 11, 2026, manufacturers have had to submit an early warning within 24 hours if a vulnerability in one of their own products with digital elements is actively exploited, even if it lies in bundled Ghostscript, for example in printers, scanners or document appliances. The obligations to handle vulnerabilities and provide updates apply from December 11, 2027.
- Financial sector: DORA
Financial entities assess ICT incidents under DORA and report major ones to their supervisory authority. Service providers that process documents for them are part of ICT third-party risk management.
Learn moreImplementing NIS2 with VamiSec CRA reporting obligations for manufacturers Implementing DORA with VamiSec
Find, secure, prove
From a short-notice exposure check to permanently secure file processing.
CSIRT and Compromise Assessment
If you suspect an incident, we determine whether a server has been compromised via a crafted file: processes, upload and spool directories, credentials and network traffic.
Compromise AssessmentTest upload and preview chains
Within an authorized scope, VamiRedteam checks which upload fields, webmail applications and print services are reachable from the outside and where the files go from there.
VamiRedteamCloud workloads with Wiz
As a member of the Wiz Partner Alliance, we help Wiz customers find and prioritize affected Ghostscript packages in VMs and containers.
VamiSec and WizManaged Detection & Response
We monitor servers and containers for shells and attempts to download additional tools originating from Ghostscript and ImageMagick, and respond around the clock.
MDR at VamiSecSBOM and runtime inventory
We make visible where Ghostscript is contained in your products, images and applications, including behind image libraries, and keep the inventory up to date.
SBOM at VamiSecZero-day monitoring
We promptly match newly disclosed flaws such as Upload2Shell against your attack surface, so that you can act before regular patch cycles take effect.
Zero-day monitoring
Agentic GRC platformVamiGRC: match vulnerabilities against assets, manage deadlines, maintain evidence
VamiGRC matches CISA KEV, NVD and EPSS against your assets, products and SBOMs. When a flaw such as CVE-2026-125396 appears, you see which of your recorded assets are affected and manage actions and deadlines through to evidence.
- CISA KEV, NVD and EPSS are matched against your assets, products and SBOMs.
- Evidence from connected systems is updated along with its source rather than at audit time.
- When an incident is recorded, a deadline timer starts for NIS2; VamiAI drafts notifications, and your team reviews and submits them.
- One control, multiple frameworks: implemented once, mapped to NIS2, ISO 27001 and other standards.
- AI agents handle the routine work according to your approval rules; your team decides.

Let’s talk about your file processing
Whether it is an exposure check, hardening your upload and preview chains or evidence for NIS2 and the CRA, Valeri Milke and the VamiSec team help you derive concrete next steps from this briefing.
“IT security and compliance without AI is a vulnerability.”
Frequently asked questions about Upload2Shell
What is Upload2Shell?
Upload2Shell is the name pwn.ai has given to CVE-2026-125396, a flaw in Ghostscript, the interpreter for PostScript and PDF. A crafted file triggers a type error in the font loader, abuses the internal write operator .forceput and creates a use-after-free through which it switches off the -dSAFER protection mode and executes commands. The name describes the most common path: an uploaded file becomes a shell on the server. The bug is fixed in Ghostscript 10.08.0 of September 8, 2026.
Am I affected?
Systems are affected if they run Ghostscript before 10.08.0 without a distribution backport and render untrusted files: thumbnails for uploads, mail attachments, print jobs or document imports, often via ImageMagick, Pillow, libvips or Qt. pwn.ai demonstrates paths via WordPress, Roundcube, CUPS, MediaWiki, DokuWiki, Plesk and other applications. You can check your version with the Ghostscript check on this page.
Which versions contain the fix?
Ghostscript 10.08.0 of September 8, 2026. Debian 13 is patched as of 10.05.1~dfsg-1+deb13u2, Debian 12 as of 10.0.0~dfsg-11+deb12u9. On October 21, Ubuntu delivered packages for all maintained versions with USN-8949-1, such as 10.02.1~dfsg1-0ubuntu7.10 for 24.04; however, Ubuntu has not yet explicitly assigned the CVE to this update. For RHEL, SUSE Linux Enterprise and Amazon Linux, the fix was still pending on November 23.
Is it enough to check the file extension and MIME type?
No. In pwn.ai’s tests, PostScript in files with the extension .jpg, .png or .pdf was enough, because libraries such as ImageMagick or Pillow recognize the format by its content. Check the actual file type based on its signature before rendering, reject everything that is not on an allowlist and block the Ghostscript formats in the libraries.
Why are WordPress, Roundcube and CUPS affected if the bug is in Ghostscript?
Because they process untrusted files automatically: WordPress uses Imagick to generate thumbnails for uploads, Roundcube converts image attachments for display, and CUPS renders print jobs via Ghostscript filters. WordPress (CVE-2026-65640) and Roundcube (CVE-2026-114727) have closed their paths with their own updates. You still need to update Ghostscript itself, because other programs on the same server use it too.
What is -dSAFER, and why does it not protect here?
-dSAFER is Ghostscript’s protection mode: it prevents a file from reading or writing arbitrary files and from starting programs. The checks run inside the interpreter, not in the operating system. Via the use-after-free, Upload2Shell modifies the interpreter’s memory and switches off the check, even though -dSAFER is still on the command line. That is why Ghostscript should additionally run in an operating system sandbox.
Is Upload2Shell the same as ImageTragick?
No. ImageTragick was a set of flaws in ImageMagick itself in 2016 through which crafted images triggered commands. Upload2Shell is in Ghostscript, which ImageMagick and other libraries call. The pattern, however, is the same: a library processes untrusted files with more capabilities than the application expects.
Does Upload2Shell have anything to do with CVE-2026-39919?
No, that is a different Ghostscript flaw: a heap overflow when processing JPEG 2000 images in PDF files, which Wordfence found with its AI system. It is also fixed in Ghostscript 10.08.0. Debian’s update of September 25 only named this number but, according to the Debian tracker, also contained the fix for Upload2Shell.
Is Upload2Shell already being exploited?
As of November 23, no attacks are known, the flaw is not in CISA’s KEV catalog, and the EPSS score was 0.35% on November 22. The barrier is getting lower, however: the technique and a memory PoC from pwn.ai have been public since November 21, and since November 22, so have third-party tools that, according to their authors, generate ready-to-use attack files. The BSI has updated its warning accordingly. VamiSec assessment: the public tools increase the likelihood of attacks; update or harden systems that accept files from the internet first.
Is there a workaround?
Artifex does not name an official workaround; the update takes priority. As a stopgap, these steps reduce the risk: block Ghostscript modules in the ImageMagick policy, set EpsImagePlugin.gs_binary = False in Pillow, set VIPS_BLOCK_UNTRUSTED for libvips, check the file type before rendering, use AppArmor or seccomp to prevent the renderer from starting a shell, and configure CUPS queues to accept jobs only after authentication.
What about Red Hat, SUSE and Amazon Linux?
Red Hat lists RHEL 7 to 10 as affected, SUSE is working on updates for SUSE Linux Enterprise, and Amazon lists Amazon Linux 2, 2023 and 2027 Preview as “Pending Fix”. As of November 23, no regular update had been released for these systems; openSUSE Tumbleweed is patched, and AlmaLinux has been testing its own backports since November 22. Until then, hardening and isolation have to carry the load; document the residual risk.
Does an operating system update also cover containers?
No. Container images bring their own Ghostscript and only receive the fix when they are rebuilt on a patched base image. The same applies to application packages with a bundled copy, to appliances and to Windows programs with their own Ghostscript. Check every copy with the commands on this page.
What role did AI play in the discovery?
According to pwn.ai, the AI model GPT 5.6 Sol found the bug in .putgstringcopy together with researcher Paulos Yibelo. The CVE record, patch and advisories credit only Yibelo or pwn.ai as the finder; in April, heise described pwn.ai as the AI tool of the security company Octagon Networks. VamiSec assessment: as with Ruby2Shell and Java4Shell, this shows how quickly AI-assisted research is now finding flaws in widely used components. For defenders, this means shorter patch deadlines for components that interpret untrusted data.
How does VamiSec support you?
At short notice, we check which systems render untrusted files with Ghostscript, roll out updates and image rebuilds with you, harden upload and preview chains, build detection rules and investigate suspected cases with a compromise assessment and our CSIRT. With VamiGRC, you manage vulnerabilities, deadlines and evidence for NIS2 and the CRA.
Sources and further information
The information is based on publications by pwn.ai, Artifex, the CVE numbering authority VulnCheck and the BSI, as well as by distributions, vendors, projects and trade media up to November 23, 2026, 2 p.m. CET. Assessments by VamiSec are identified as such.
- [1]pwn.ai (Paulos Yibelo): Upload2Shell: Ghostscript research,
- [2]pwn.ai: Upload2Shell · CVE-2026-125396 · Evidence index,
- [3]CVE Program: CVE Record CVE-2026-125396,
- [4]NIST National Vulnerability Database: CVE-2026-125396 Detail,
- [5]VulnCheck: Ghostscript before 10.08.0 -dSAFER Bypass via .putgstringcopy .forceput Recovery,
- [6]Artifex (GitHub): Commit 1484854: PS interpreter – validate operands to .putgstringcopy,
- [7]Artifex (GitHub): Commit e042176: Implement .putgstringcopy in C,
- [8]Artifex: Ghostscript News: Version 10.08.0,
- [9]Artifex (GitHub): Ghostscript/GhostPDL 10.08.0 (Downloads),
- [10]Debian: Security Tracker: CVE-2026-125396,
- [11]Debian: DSA-6516-1 ghostscript – security update,
- [12]Debian LTS: DLA-4914-1 ghostscript – security update,
- [13]Ubuntu: USN-8949-1: Ghostscript vulnerabilities,
- [14]Ubuntu: CVE-2026-125396,
- [15]Red Hat: CVE-2026-125396,
- [16]SUSE: CVE-2026-125396,
- [17]Amazon Linux Security Center: CVE-2026-125396,
- [18]Fedora: Package ghostscript,
- [19]Arch Linux: ghostscript (extra),
- [20]Alpine Linux: Package index: ghostscript (edge),
- [21]Homebrew: ghostscript (Formula),
- [22]WordPress (GitHub): GHSA-8vr3-7mxf-gx8w: Remote code execution vulnerability via malicious file upload by an Author level user or higher,
- [23]WordPress: WordPress 7.0.4 Release,
- [24]CVE Program: CVE Record CVE-2026-65640,
- [25]Roundcube: Security updates 1.6.20 and 1.7.5 released,
- [26]Roundcube (GitHub): Roundcube Webmail Releases (1.7.6 / 1.6.21),
- [27]Roundcube: Security updates 1.6.22 and 1.7.7 released,
- [28]CVE Program: CVE Record CVE-2026-114727,
- [29]FIRST: Exploit Prediction Scoring System (EPSS): CVE-2026-125396,
- [30]CISA: Known Exploited Vulnerabilities Catalog,
- [31]Openwall oss-security (Jan Schaumann): Re: Ghostscript 10.08.0 fixes multiple CVEs, including “upload2shell”,
- [32]pwn.ai: ImageMagick: From Arbitrary File Read to RCE In Every Policy,
- [33]ImageMagick (GitHub): config/policy-secure.xml
- [34]ImageMagick (GitHub): coders/ps.c (PS module: EPI, EPS, EPSF, EPSI, PS)
- [35]Pillow: Image file formats: EPS
- [36]Pillow: PIL.Image.open (formats)
- [37]libvips: vips_block_untrusted_set
- [38]OpenPrinting CUPS: cupsd.conf: server configuration file
- [39]Falco: Supported fields for conditions and outputs
- [40]Microsoft Learn: DeviceProcessEvents table in the advanced hunting schema,
- [41]ImageTragick: ImageTragick (CVE-2016-3714),
- [42]CERT Coordination Center: VU#332928: Ghostscript contains multiple -dSAFER sandbox bypass vulnerabilities,
- [43]NIST National Vulnerability Database: CVE-2023-36664 Detail,
- [44]Codean Labs (Thomas Rinsma): CVE-2024-29510 – Exploiting Ghostscript using format strings,
- [45]BSI / CERT-Bund: WID-SEC-W-2026-4424: Ghostscript: Schwachstelle ermöglicht Codeausführung (aktualisiert 23.11.2026),
- [46]The Hacker News: Researchers Demonstrate Ghostscript Sandbox-Escape RCE via Crafted File Uploads in Popular Apps,
- [47]iTnews (Juha Saarinen): AI-found Ghostscript flaw turned file uploads into remote code execution,
- [48]Patchstack (Dave Jong): When a PNG Isn’t a PNG: WordPress Patches an Author-Level Imagick RCE,
- [49]heise online (Dirk Knop): KI findet kritische ImageMagick-Lücken in Standardkonfigurationen,
- [50]oss-security (Alan Coopersmith): Ghostscript 10.08.0 fixes multiple CVEs, including “upload2shell”,
- [51]BleepingComputer (Bill Toulas): Ghostscript flaw lets hackers hijack servers via PDF uploads,
- [52]Tenable: CVE-2026-125396: Plugins,
- [53]Rapid7 Vulnerability Database: CVE-2026-125396: Incorrect Use of Privileged APIs,
- [54]AlmaLinux (Andrew Lukoshko): Upload2Shell (CVE-2026-125396): Patched Ghostscript available in testing,
- [55]WordPress.org Plugins: Forminator Forms – Contact Form, Payment Form & Custom Form Builder (Changelog),
- [56]WordPress.org Plugins: Essential Addons for Elementor – Popular Elementor Templates & Widgets (Changelog),
- [57]Splunk Security Content: Linux Ghostscript Exploitation,
- [58]GitHub: Repository search: CVE-2026-125396 (as of 22 Nov 2026),
- [59]Debian: Security Tracker: DSA-6550-1 ghostscript,
This briefing is no substitute for legal advice or an assessment of your environment.
Updating comes first.
Knowing where untrusted files are rendered makes you faster next time.
Arrange a no-obligation initial consultation: together, we will clarify your exposure, update plan and hardening.