Cybersecurity News
Cybersecurity News Alert: If It Renders a PDF, It Runs Code
By Nattapong Sukkasem · Published · Updated .
TL;DR — Researchers at pwn.ai have published Upload2Shell, CVE-2026-125396, a use-after-free in the Ghostscript Type 1 font loader that escapes the -dSAFER sandbox and runs operating system commands as whichever account does the rendering. Artifex fixed it in Ghostscript 10.08.0 on 8 September; the CVE appeared on 9 November and the research on 21 November. This cybersecurity news report is about what happens when an upload form hands a file to a programming language.
Every product in this cybersecurity news story did the same unremarkable thing. It accepted an uploaded file and made a small picture of it. A wiki built a thumbnail, a webmail client previewed an attachment, a print queue converted a job, a contact form dropped a PDF into a media library. In each case the picture was produced by Ghostscript. In each case the file was not a picture. It was a PostScript program, and the server ran it.
That is the whole of CVE-2026-125396. The fix has been shipping since 8 September; the description of what the bug is good for appeared on 21 November, which is why anyone is reading about it now.

What the researchers actually showed
pwn.ai describes Upload2Shell as a use-after-free in the Ghostscript Type 1 font loader. That loader is not entirely written in C. Parts of it are written in PostScript and executed by the same interpreter that executes the document, and one of those parts is a helper named .putgstringcopy, in Resource/Init/gs_fonts.ps.
A document reaches it by registering a Type 1 font in Fontmap and asking for it with findfont. The helper stores into a protected dictionary using a privileged operator, .forceput, that document code is not supposed to invoke, and it did not check its operands first. Put an array where a string is expected and the copy fails with a typecheck error; supply your own errordict handler, clear the wreckage off the stack, and the pending privileged write resumes with your dictionary, your key and your value. The hidden operator is never called; it is left running.
So a local object can be stored in a dictionary that outlives it, and once restore frees it the dictionary still points at the address. The write-up puts it in two sentences: “The reference in the dictionary had not changed. What occupied the address had.”
What follows is careful rather than lucky. The proof fills fresh arrays with a marker value and finds which landed in the freed block by altering a single byte, locating the memory without guessing an absolute address. A Ghostscript ref on the tested 64-bit build is sixteen bytes; replacing its eight pointer bytes substitutes one operator for another. The published file multiplies 29 by 11 and prints 319, hijacks the reference so the same expression prints 18, then restores it and prints 319 again. One credit line no secondary carried: pwn.ai attributes the find to GPT 5.6 Sol working with Paulos Yibelo; Ostorlab names only Yibelo.

How a thumbnail becomes a shell
The last step is a pointer walk. currentdevice leads to the device structure, then the memory manager, then the library context, and 156 bytes into its core structure sits path_control_active, the native flag behind the file-path checks. Four PostScript put operations change those bytes from 1,0,0,0 to 0,0,0,0. The command line still said -dSAFER. The researchers' own explanation is the line worth keeping: the flag “relies on checks inside the interpreter rather than a kernel-enforced system-call filter.”
Two further values move before anything useful happens. The PostScript-side PermitFileWriting list is force-written to accept everything, and a cached LockFilePermissions flag is flipped and resynchronised with save and restore. Then %pipe% works. On a Debian 13 print server the proof ran a command and left a marker file in /var/tmp — “as uid=7(lp), the renderer's account, not as the person who submitted the job.”
A zero-day vulnerability is a race between a vendor and an attacker, with the defender watching from the touchline. This is a three-party problem. Upstream fixed it in September, every distribution rebuilt on its own schedule, and a great many applications ship a copy of the interpreter that no distribution will ever touch.
Server infrastructure that renders what strangers send
Most demonstrations required no account. A Debian 13 CUPS queue accepted an anonymous IPP Print-Job and executed as uid=7(lp). Roundcube 1.7.2 needed only that the recipient open a message: an attachment declared image/jpeg but containing PostScript travelled through ImageMagick into Ghostscript and ran as uid=33(www-data). WordPress with Forminator, and WordPress with Essential Addons for Elementor, both took a signed-out visitor's upload to that same account. MediaWiki with PdfHandler and DokuWiki did it on open wikis. Mayan EDMS imported the file from a mailbox and ran as uid=1000 in its own container. Google Docs, Drive and Gmail were reached too, and Google has since closed that path.
The common thread is a hand-off, not a product. ImageMagick, Pillow, libvips, Qt's EPS plugin and CUPS all pass files to Ghostscript, and the applications above pass files to them. This is server infrastructure whose job description is turning one file format into another, which sounds clerical and is in practice a programming language interpreter with a filesystem attached.
Cloud security tooling will struggle with this, because the answer to “are we patched” depends on something a host scan does not see. Updating the operating system does not update a separate copy of Ghostscript baked into a container image built in July, and that image reports the version it was built with for as long as it runs.

IT security measured in version strings
The upstream fix is 10.08.0, and on most Linux estates comparing a running binary against that number tells you something untrue. Distribution teams backport the change and leave the leading version alone.
| Platform | Tested or affected build | Fixed build | Note |
|---|---|---|---|
| Ghostscript upstream | All releases before 10.08.0 | 10.08.0 | Root fix, released 8 September 2026 |
| Debian 13 | 10.05.1~dfsg-1+deb13u1 | 10.05.1~dfsg-1+deb13u2 | DSA-6516-1, 25 September; number sits below 10.08.0 |
| Debian 12 | 10.0.0~dfsg-11 | 10.0.0~dfsg-11+deb12u9 | Still listed vulnerable as of 12 November |
| Debian 14 and unstable | — | 10.08.0~dfsg-2 | Carries the upstream release directly |
| Ubuntu 26.04 LTS | — | 10.06.0~dfsg-3ubuntu1.2 | USN-8949-1, 21 October, covers seven releases |
| Ubuntu 24.04 LTS | — | 10.02.1~dfsg1-0ubuntu7.10 | Same notice |
| Ubuntu 22.04 LTS | — | 9.55.0~dfsg-1ubuntu5.15 | Same notice; four major versions behind and patched |
| RHEL, Rocky, AlmaLinux, Oracle Linux | — | Not established | Researchers could not confirm status at publication |
| Container images and bundled copies | Whatever was current at build time | Rebuild required | A host update does not reach them |
IT security counts in version numbers, and the awkward part of this cybersecurity news cycle is what one is worth. Debian 13 is patched at 10.05.1, four releases below the fix; Ubuntu 22.04 is patched at 9.55.0. A scanner set to flag “Ghostscript below 10.08.0” will fill a queue with systems that are already fine and miss the container that is not.
What to do now
Start with the calling path. Ask which services turn an uploaded or emailed file into a preview and which library performs it — ImageMagick, Pillow, libvips and CUPS are the usual four. Check the installed Ghostscript against your distribution advisory rather than the upstream number, then check container images and vendor bundles separately, because that is where the stale copies are.
The researchers are explicit that validating a file's real type after generating its thumbnail hands the renderer the first chance to interpret it. The ordering is the finding. A review confirming that an upload handler accepts only trusted extensions will pass and mean nothing: the attack arrives named .png, .jpg or .pdf and the library sniffs the contents anyway.
Two measures reduced the damage in their own tests. Authentication on the CUPS queue blocked the unauthenticated submission outright. And, in their words, “A policy that prevents a renderer from starting a shell can limit what happens even after the interpreter is compromised.”
There is a name-resolution step buried in the remediation. The fix arrives over a package mirror, and a mirror is a hostname. Where DNS over HTTPS moves that resolution off the host, the name your patch came from stops appearing in your own resolver records, which matters on the day somebody asks when a server was updated and from where. A network diagnostic tool is worth running before the rebuild rather than after: the DNS lookup tool records what the mirror and any callback names answer today. Confirm too what address the host presents outbound, because that is the string that turns up in somebody else's log.
A DDoS attack is the one threat everybody can quantify, because the unit is obvious: packets per second, gigabits, requests. This has no volume at all. One file, a few hundred lines of PostScript, through the upload field the application advertises.


Why it matters
The durable point of this cybersecurity news cycle is not the use-after-free, which is fixed. It is what an upload field is. PostScript has been a programming language since 1982, and a PDF carries enough of one to matter; an application that renders either has agreed, on your behalf, to execute what a stranger sends. The September release closes a specific hole in a specific helper and does not change that arrangement. The question worth carrying into next week is not whether Ghostscript is patched everywhere you run it. It is which of your applications decided, years ago, that a thumbnail was worth running a program for.
Sources
- The Hacker News — Researchers demonstrate Ghostscript sandbox-escape RCE via crafted file uploads in popular apps
- pwn.ai — How we hacked the pipes: Upload2Shell (CVE-2026-125396)
- Ostorlab — Upload2Shell: Ghostscript sandbox escape to RCE
- Daily CyberSecurity — Ghostscript RCE CVE-2026-125396, proof of concept published
- Cyber Press — Upload2Shell Ghostscript flaw lets attackers execute commands through malicious file uploads
- NVD — CVE-2026-125396 detail
Related articles
Browse every DNS news article by month →
DNS angle
Review resolver logs for the systems discussed above and compare unexpected names with your approved services. A successful lookup does not establish that a destination is safe. Use the DNS lookup tool to inspect current answers, then compare them with your own resolver and incident records.