Upload2Shell: Ghostscript CVE-2026-125396 lets uploads run code
Part of the CVE-2026-125396 story · since 21 Nov
- Sat 21 Nov, 18:47 UTC. cybersixt, first report. Upload2Shell: Ghostscript CVE-2026-125396 lets uploads run code. This article, 1st of 1.
Researchers at pwn.ai have published the details of Upload2Shell, a Ghostscript flaw tracked as CVE-2026-125396 that lets a crafted file escape Ghostscript's -dSAFER sandbox and run commands on the server that renders it. Paulos Yibelo, who led the research, calls it a reliably exploitable bug "affecting almost every application with an upload box that I tested" in a post on X on Saturday 21 November. The team says it reached remote command execution through print jobs, email attachments and file uploads in Debian 13, Roundcube, WordPress, MediaWiki and a Google document-processing service, all of which received reports before publication.
Ghostscript 10.08.0, released by Artifex on 8 September 2026, fixes the flaw, according to pwn.ai's disclosure page. Systems running older Ghostscript builds without a distribution backport remain exposed.
How the flaw works
The CVE record, published on 9 November by VulnCheck, says the .putgstringcopy procedure in gs_fonts.ps calls the privileged .forceput operator without checking operand types. A crafted PostScript or PDF document can trigger a type error, recover .forceput through a custom error handler and cause a use-after-free across save and restore to execute arbitrary code. VulnCheck scores it 8.5 (high) under CVSS 4.0. pwn.ai's technical writeup says the use-after-free in the Type 1 font loader gave it a write-what-where primitive, which it used to switch off the state that enforces -dSAFER. The exploit carries its own Type 1 font and does not need one on the server. Artifex's fix is commit 1484854e for upstream bug 709684.
Why uploads reach Ghostscript
Most affected applications never call Ghostscript themselves. pwn.ai shows that a file named .png or .pdf containing PostScript or EPS is handed to Ghostscript by common image code: Pillow when an image is loaded, cropped or thumbnailed, PHP Imagick through ImageMagick's PostScript delegate, and some libvips builds through ImageMagick. In its tests, generating a preview or resizing an image was enough to start the interpreter.
The confirmed paths include an anonymous IPP print job to a shared CUPS queue on Debian 13, which ran a command as the lp user; a Roundcube attachment thumbnailed when the email was viewed, with no click on the attachment; signed-out upload forms in the Forminator and Essential Addons for Elementor WordPress plugins; anonymous PDF uploads on MediaWiki with PdfHandler; DokuWiki, Mayan EDMS, ResourceSpace and the Roundcube shipped with Plesk Obsidian. Google mitigated the affected path in its service on 10 November, pwn.ai says. WordPress fixed its upload route separately under CVE-2026-65640, and Roundcube restricted image types before conversion under CVE-2026-114727.
Fixes
Debian lists the flaw as fixed in Debian 13 by DSA-6516-1 and in Debian 12 by DLA-4914-1, according to its security tracker. Ubuntu shipped fixed packages for seven releases in USN-8949-1 on 21 October, which credits Paulos Yibelo with finding that Ghostscript "did not properly validate certain operands when loading fonts"; Ubuntu's CVE page still lists the new identifier as under investigation. SUSE lists SUSE Linux Enterprise Server 15 SP7, 16.0 and 16.1 and openSUSE Leap 16.0 and 16.1 as affected with no fix released. Red Hat had no record of the CVE when we checked.
What to do
Update Ghostscript to 10.08.0 or a distribution build that includes the fix, rebuild container images that bundle it, and find every place where uploads, attachments, print jobs or document imports are converted or thumbnailed, including indirect routes through Pillow, ImageMagick and libvips. Where Ghostscript cannot be updated yet, stop those paths from handing PostScript, EPS or PDF content to it, for example by blocking those formats in ImageMagick's policy.
What is not known
pwn.ai has not published its proof-of-concept exploits or the individual case studies, and says other Ghostscript findings from the same research, including ones that reached Dropbox, are separate and still being fixed. Neither pwn.ai nor the CVE record reports exploitation in the wild.
How the story developed
1 article from 1 outlet since 21 Nov. Still developing; the latest report was 54 minutes ago. This was the first report.
- Sat 21 Nov, 18:47 UTC. cybersixt, first report. Upload2Shell: Ghostscript CVE-2026-125396 lets uploads run code. This article, 1st of 1.
- CVE not in KEV
- No CVE
- Larger: an outlet’s first report
- Coverage over time
Show all 1 articles as a listHide the list
- Sat 21 NovDay 01
- Upload2Shell: Ghostscript CVE-2026-125396 lets uploads run code18:47 · cybersixt · First report · This article, 1st of 1
Sources
- pwn.ai: Upload2Shell disclosure and affected applicationsPrimary sourcepwn.ai
- pwn.ai: How We Hacked the Pipes, Upload2Shell technical writeupPrimary sourcepwn.ai
- Paulos Yibelo on X: Upload2Shell releasePrimary sourcex.com
- VulnCheck: CVE-2026-125396 Ghostscript -dSAFER bypassPrimary sourcevulncheck.com
- Artifex ghostpdl fix commit 1484854egithub.com
- Ubuntu USN-8949-1: Ghostscript vulnerabilitiesubuntu.com
- Debian security tracker: CVE-2026-125396security-tracker.debian.org
- SUSE: CVE-2026-125396suse.com
More reporting
- GL.iNet GoodCloud flaw used to plant malware on routers, KVMs21 Nov
- FBI hacked again as NCIC crime database is breached21 Nov
- 1984 Hosting hack takes sites offline, blamed for XMR1 theft21 Nov
- Hugendubel cyberattack knocks shop and tolino cloud offline21 Nov
- Chainflip hack drains $4.86M from Ethereum vault21 Nov
Written by CyberSIXT from the sources above.How we reportCorrectionsRSS