The Library

Ghostscript Vulnerability CVE-2026-125396: Upload2Shell Lets a Crafted Document Escape -dSAFER and Run Commands, and the Fixed Version to Install

Upload2Shell (CVE-2026-125396) lets a crafted document switch off Ghostscript's -dSAFER sandbox and run commands as the rendering process. Any system that renders documents with Ghostscript before 10.08.0 needs the update, including bundled copies.

Elite Performance Exclusive LLC 6 min read

Where Worldwide

Ghostscript Vulnerability CVE-2026-125396: Upload2Shell Lets a Crafted Document Escape -dSAFER and Run Commands, and the Fixed Version to Install
On this page 7 sections

A flaw in Ghostscript, tracked as CVE-2026-125396 and nicknamed Upload2Shell, lets a crafted document turn off the program's -dSAFER sandbox and run operating system commands as the process doing the rendering. If a website, customer portal or internal system you run renders documents with Ghostscript, it needs version 10.08.0, and that fix has to reach the copy your application actually uses. Updating some other copy on the same server does not count.

What happened with the Ghostscript vulnerability

Researchers at pwn.ai published a write-up on the flaw they call Upload2Shell. Their report says GPT 5.6 Sol, working with Paulos Yibelo, found the issue in .putgstringcopy, a helper in the file Resource/Init/gs_fonts.ps.

The two primary sources describe the bug a little differently:

  • The researchers call it a use-after-free in Ghostscript's Type 1 font loader.
  • Debian's security tracker says "Ghostscript before 10.08.0 contains a -dSAFER bypass vulnerability in the .putgstringcopy procedure".

Both descriptions point to the same helper. They also agree on the outcome. According to the researchers, a crafted document could use the bug to change the state that enforces -dSAFER, then run commands with the permissions of the rendering process.

The researchers score the flaw 8.5 under CVSS 4.0. They say Artifex released the root fix in Ghostscript 10.08.0 on 8 September 2026, and that the CVE was published on 9 November, US Eastern time. So the fix was out about two months before the CVE number was public. A team that skipped the September release because no CVE was attached to it may still be running an affected version.

Upload2Shell: what is confirmed and what is only claimed

Point What the sources say Source
Affected versions Ghostscript before 10.08.0 Debian security tracker
Type of flaw A -dSAFER bypass in the .putgstringcopy procedure Debian security tracker
Debian fixed package 10.08.0~dfsg-2 Debian security tracker
Root cause A use-after-free in the Type 1 font loader Researchers' report
Severity 8.5 under CVSS 4.0 Researchers' report
Fix Ghostscript 10.08.0, released 8 September 2026 Researchers' report
Remote reach Their demonstrations reached the interpreter remotely, through production services and applications Researchers' report
Release notes "This release addresses a number of potential security issues." Ghostscript News

What is not known from these sources:

  • Whether attackers are using it. The researchers describe their own demonstrations. None of the sources we read report attacks in the wild.
  • Which commercial products ship a vulnerable copy. The researchers mention production services and applications, but we could not confirm a list of named products to pass on.
  • A workaround. The sources do not list any setting that blocks the flaw short of updating.
  • Whether the release notes name this CVE. The passage we checked only talks about security issues in general terms.

Who is affected by the Ghostscript -dSAFER bypass

Any system running Ghostscript before 10.08.0 is in scope, and the risk is highest where an outsider can get a document in front of it. The researchers named the flaw Upload2Shell for a reason. Check these places first:

  • Websites that accept uploaded files and generate previews or thumbnails
  • Customer portals that take invoices, claims, forms or signed documents
  • Print servers and document management systems
  • Custom web apps whose libraries call Ghostscript behind the scenes
  • Container images and appliances that ship their own copy

The commands run as the rendering process. How much damage an attacker can do depends on what that account can read, write and reach on your network.

What to do this week about CVE-2026-125396

Step How Done when
1. Find every copy List servers, containers and apps that render documents. Ask developers which libraries call Ghostscript You have a written list
2. Check the version Run gs --version on each host and inside each container Every copy reads 10.08.0 or later
3. Update Debian systems Install the fixed package; the tracker lists 10.08.0~dfsg-2 Package version matches or is newer
4. Update other systems Check your distribution's or vendor's own security tracker for its 10.08.0 package Vendor confirms the fixed build
5. Rebuild bundled copies Rebuild container images and redeploy, then restart the services that render Old images are gone from production
6. Ask your vendors Ask SaaS and software vendors which Ghostscript version their renderer uses You have their answer in writing
7. Limit the renderer Run rendering under an account with no access it does not need The account cannot reach secrets or other systems

Step 5 matters more than it looks. In the researchers' words: "The fix has to reach the renderer the application actually uses." A server can show a patched system package while an app or container keeps calling an older copy it brought along. We covered that pattern in Updated Is Not the Same as Patched.

Why the Ghostscript flaw matters for a business website or network

An upload form exists to take files from people you do not know. Rendering usually runs on its own, with nobody watching, the moment a file arrives. If the renderer can be tricked into running commands, the person who uploaded the file gets a foothold on your server with whatever access the rendering account has. Depending on your setup, that could include other customers' uploads, configuration files or credentials.

The fix itself was not simple. Ken Sharp of Artifex, speaking about how hard it was, said "it isn't easy to undo 30 years worth of assumptions in the code." Old, deeply embedded components like this tend to sit inside other software, where nobody thinks to check them. If you are not sure who updates those buried parts of your stack, read Who Is Patching the Software That Runs Your Business?

Ghostscript vulnerability questions people are asking

What is Upload2Shell?

It is the researchers' name for CVE-2026-125396, a Ghostscript flaw that lets a crafted document bypass -dSAFER and run commands as the rendering process.

Which Ghostscript version fixes CVE-2026-125396?

Ghostscript 10.08.0. Debian's tracker lists the fixed Debian package as 10.08.0~dfsg-2.

Is CVE-2026-125396 being exploited?

The sources we read do not report attacks in the wild. The researchers say their own demonstrations reached the interpreter remotely through production services and applications.

How serious is the Ghostscript flaw?

The researchers score it 8.5 under CVSS 4.0.

How do I check my Ghostscript version?

Run gs --version on the host, and also inside every container or app bundle that renders documents. Anything below 10.08.0 is affected.

Is there a workaround without updating?

None of the sources we read lists one. Update to 10.08.0.

If I updated the server, am I done?

Not necessarily. Apps and containers can carry their own copy, and the fix has to reach the renderer the application actually uses.

The bigger lesson

The riskiest software in a business is often the part nobody remembers installing. A document converter buried under a website's upload form doesn't show up on a dashboard, but it handles files from strangers all day. Keep a list of every component that touches outside input, and make sure someone is responsible for updating each one.

For help finding and locking down those components, see security hardening or request a quote.

Get security alerts like this by email, with the free checklist, at security alerts.

Sources: pwn.ai, Upload2Shell research; Debian security tracker, CVE-2026-125396; Ghostscript News.

Share X LinkedIn Facebook

Was this article helpful?

We only keep the note with this article. No name, no email.

Protected by reCAPTCHA - Privacy and Terms.

Have a question about this article?

Ask it here and we will answer you directly by email. Questions are private, never posted.

Protected by reCAPTCHA - Privacy and Terms.

Security alerts by email

Hear about the next one first.

When attackers start using a flaw in software businesses run on, we email what it is, whether it touches you and what to do that week, with a round-up of our latest security writing. Free, one-click unsubscribe. You get the checklist straight away: 12 things to secure this week.

Protected by reCAPTCHA - Privacy and Terms.

Want a result like this?

Security alerts, breaches and the technology a business runs on: what happened, who it affects and what to do.

Get a Tech Quote

Security alerts by email

The next security hole is already out there. Hear about it from us first.

When attackers start using a flaw in software businesses run on, we email what it is, whether it touches you and what to do that week, with a round-up of our latest security writing. Free, one-click unsubscribe. You get the checklist straight away: 12 things to secure this week.

Protected by reCAPTCHA - Privacy and Terms.