Upload2Shell (CVE-2026-125396) is a Ghostscript -dSAFER bypass in .putgstringcopy, and the fix has been public since September 8, 2026. The CVE only appeared on November 10. If you patched WordPress or Roundcube and stopped there, you closed one door into Ghostscript and left the others open. I read both Artifex commits, the WordPress changeset and every distribution tracker I could reach. Five things stood out that I have not seen written up elsewhere:

  1. Ghostscript 10.08.0 ships only the first fix. The C rewrite that removes .forceput from this code path (commit e0421767) is not in the 10.08.0 tag. The released fix is a type check in front of the same .forceput call.
  2. WordPress 7.0.4 still hands any file that starts with %PDF- to Imagick, and Imagick hands it to Ghostscript. The CNA says a crafted PDF can trigger this bug.
  3. If you applied Red Hat’s RHSA-2026:83551 for the two sibling Ghostscript CVEs last month, you are most likely still exposed to this one.
  4. The CNA score says local attack vector. The researcher’s own paths are an HTTP upload, an email attachment and an anonymous IPP print job.
Upload2Shell (CVE-2026-125396)

CVE-2026-125396 Ghostscript

  • CVSS v4 8.5, scored local, reachable over HTTP, SMTP and IPP
  • Public PoCs since November 22
  • EPSS 0.0013 to 0.0035 on November 22
  • Not in CISA KEV 2026.11.20, SSVC exploitation none

Patch to 10.08.0 or distribution build

Patch Ghostscript and verify by package version, not gs --version.

Root cause

CVE-2026-65640 WordPress Core

  • Needs upload_files, Author role or higher
  • Real PDF files still reach Ghostscript after the fix

7.0.4 or branch backport

Closes disguised PostScript, not the PDF path.

Entry point

CVE-2026-114727 Roundcube

  • Attachment content passed to ImageMagick on resize

1.6.20 or 1.7.5

Patch Roundcube and Ghostscript together.

Entry point

Upload2Shell at a glance, November 22, 2026

Upload2Shell (CVE-2026-125396): Root Cause

The bug is in .putgstringcopy, a ten-line PostScript procedure in Resource/Init/gs_fonts.ps that the font loader uses to store a string into a dictionary. This is the pre-fix code, the same lines the CVE record links at the ghostpdl-10.07.0 tag:

/.putgstringcopy  %   <dict> <name> <string> .putgstringcopy -
{ 2 index gcheck currentglobal
  2 copy eq {
    pop pop .forceput
  } executeonly {
    5 1 roll setglobal
    dup length string copy
    .forceput setglobal
  } executeonly ifelse
} .forcebind odef % must be bound and hidden for .forceput

Nothing checks the operand types. If length or copy fails on the wrong type, execution stops with the privileged .forceput next in line and the allocation mode still switched. That is my reading of the code. It fits the CNA text: a custom error handler recovers .forceput, and a use-after-free across save and restore follows. Artifex’s bug title says the result is native read and write and controlled dispatch.

The fix in 10.08.0 adds one type check in front of the same .forceput call. I confirmed this by dumping the compiled init code out of my 10.07.0 and 10.08.0 builds. Artifex also wrote a C replacement with no .forceput (commit e0421767), but it is not in the 10.08.0 release.

Upload2Shell (CVE-2026-125396) – Attack Path

Upload2Shell (CVE-2026-125396): Reachability Analysis

The CNA scored this as a local attack. Nobody opens these files by hand on a server: a thumbnailer, a mail preview or a print filter does it on arrival. The researcher confirmed these paths:

Entry point What the attacker needs Ghostscript runs as Application fix version
WordPress media upload An account with upload_files (Author or higher) Web server user 7.0.4 and backports to 4.7.35
Roundcube attachment preview A mail the user opens www-data 1.6.20, 1.7.5
CUPS shared queue on Debian 13 Network reach to IPP, no login lp None; only Ghostscript fixes it

The same research reached Ghostscript through public upload widgets in Forminator and Essential Addons for Elementor, MediaWiki PdfHandler, DokuWiki, Mayan EDMS, ResourceSpace, Plesk’s Roundcube and a Google production renderer (fixed by Google on November 10). The trick is old: the application trusts the extension, ImageMagick trusts the first bytes, so holiday.png that starts with %! is rendered as PostScript.

WordPress 7.0.4 (changeset 63214) now refuses Imagick format prefixes such as PS:, PostScript-family extensions, PostScript, EPS and WPG magic bytes, and compressed files. It still loads any file that starts with %PDF-, through Imagick’s PDF coder, which uses Ghostscript. The CNA says a crafted PDF can trigger the bug. I have not seen that shown for Ghostscript 10.x, so treat an unpatched Ghostscript behind WordPress 7.0.4 as reachable by anyone who can upload a PDF.

Upload2Shell (CVE-2026-125396) – Attack Reachability

In-process renderers (Pillow, libvips, Qt plugins) never start a gs process, so process-based detection does not see them.

Timeline: CVE-2026-125396 was assigned 63 days after the fix

The researcher found the bug on July 27 and told WordPress first, which is why WordPress shipped its fix 20 days before Artifex had a bug report. Artifex then took seven days from report to release. Everything after that was slow, and three vendors still had no released fix on November 22.

Upload2Shell (CVE-2026-125396) – CVE Timeline

Days from the Ghostscript 10.08.0 release

  • Researcher finds the bug: -43
  • WordPress 7.0.4: -27
  • Artifex bug 709684 filed: -7
  • Debian DSA-6516-1: 17
  • Roundcube 1.6.20 and 1.7.5: 41
  • Ubuntu USN-8949-1: 43no CVE listed
  • CVE published: 63
  • First public PoCs: 75
  • Amazon Linux, SUSE Enterprise, RHEL: 75no released fix

Negative = before the release

As of November 22, 2026

Am I patched? Affected versions and the caveats

Status read from each vendor page on November 22, 2026. The last column is where “we already patched Ghostscript” goes wrong.

Platform Fixed build Caveats
Ghostscript upstream 10.08.0 Everything before 10.08.0 is affected
Debian 13 trixie 10.05.1~dfsg-1+deb13u3 Still reports 10.05.1. The tracker also lists deb13u2 (DSA-6516-1); the researcher calls u3 the current fixed build
Debian 12 bookworm 10.0.0~dfsg-11+deb12u9 (DLA-4914-1) deb12u8 is vulnerable
Debian forky, sid 10.08.0~dfsg-2
Ubuntu 16.04 to 26.10 USN-8949-1 builds (16.04 to 20.04 through Ubuntu Pro) Still report the old version, and Ubuntu’s CVE page still says Needs evaluation for every release
RHEL 10 None for this CVE RHSA-2026:83551 (10.02.1-16.el10_2.3) covers two sibling CVEs, not this one. Red Hat’s bug has no fixed version and the CVE page does not load
Fedora None for this CVE yet The October 16 update (10.05.0-7) names CVE-2026-39919 and CVE-2026-101258 only
openSUSE Tumbleweed 10.08.0-5.1
SUSE Enterprise 12 SP5, 15 SP4 to SP7, 16 In QA or in progress No released update
Amazon Linux 2, 2023, 2027 Preview Pending No released update
WordPress 7.0.4, 6.9.7 and every branch down to 4.7.35 Real PDFs still reach Ghostscript
Roundcube 1.6.20, 1.7.5

Container images, appliances and anything that bundles its own libgs carry their own version, which this table cannot show.

Public PoCs, and which checker you can trust

On November 22, 2026 I counted six GitHub repositories with the CVE or the nickname in their name, description or topics, plus two more that cover it inside a larger project. Every one is original work: no copied files, and no shared code beyond boilerplate.

PoC Type Repository Safety status
Exploit-side (PoC lab, payload generator, fuzzer) 3 Clear: no prebuilt binaries, no decode-and-run, no hard-coded callback hosts. Not scored, by design
Version checkers 3 Clear; lab-tested
Impact write-up 1 Clear
Detection hunt (KQL, CrowdStrike CQL) 1 Clear

The researcher’s own write-up also links a proof-of-concept PDF that demonstrates memory control without running commands.

I built four Ghostscript targets and ran every version checker against each, as an unprivileged user with no network: vulnerable 10.07.0, patched 10.08.0, patched with the version hidden, and back-patched (10.07.0 source with the 10.08.0 fix, still reporting 10.07.0, which is what a Debian or Ubuntu backport looks like).

Target (truth) Mahgal/upload2shell-check ashrafzaryouh/CVE-2026-125396 tearbu/daily-vuln-lab
10.07.0 (vulnerable) Vulnerable Vulnerable Vulnerable
10.08.0 (fixed) Patched Safe Patched
Version hidden (fixed) Unknown, exit code 0 Cannot parse, exit code 2 Unknown, exit code 1
Back-patched (fixed) Vulnerable Vulnerable Vulnerable, with a backport warning

Three findings from the lab:

  • No public checker can tell a backport from a vulnerable build: They all read gs --version. On Debian and Ubuntu that means every patched host is reported vulnerable. Check the package version against the tracker instead.
  • Mahgal’s exposure check misses ImageMagick 6: Its parser splits delegate lines at =>, and ImageMagick 6 writes them as eps<=>pdf, so on stock Debian or Ubuntu it never reports the ImageMagick path into Ghostscript, the feature its README leads with.
  • Exit codes matter in CI: With the version hidden, Mahgal exits 0, so a pipeline treats an unknown host as clean.

Reliability scores use my published method (content 50, provenance 30, hygiene 20, content cap), compared within a class only. Owner account age, organization and commit signatures cannot be collected from my environment, so they are left out and the coverage is shown in the CSV.

Upload2Shell repository reliability scores

  • tearbu/daily-vuln-lab (scanner): 65backport warning in output
  • ashrafzaryouh/CVE-2026-125396 (scanner): 60backport note in README only
  • Mahgal/upload2shell-check (scanner): 50misses ImageMagick 6, exits 0 on unknown
  • 0xDTC/0xUPLOAD2SHELL-Impact-Analysis (docs): 90only repository in its class
  • indocanadian416/CyberDetect CD-033 (detection): 70queries not load-tested

Compare within a class only

Snapshot November 22, 2026; scanners lab-tested

How hard is it to exploit Upload2Shell (CVE-2026-125396)?

One crafted document, no traffic volume, no race and no heap grooming in the public sources. The researcher reproduced it on Ghostscript 9.54.0, 10.05.1 and 10.07.0. The gate in front of Ghostscript decides who can use it:

Shared CUPS queue

  • Network reach to IPP only

Mass scanning

Runs as lp. Fix this first if it exists on your network.

No login

Roundcube

  • The user opens the message

Targeted phishing

Runs as www-data.

A mail

WordPress

  • upload_files, or a plugin with a public upload field

Account needed

Runs as the web server user. Root needs a second bug.

Author role

Who can reach Ghostscript

Exploitation is not reported. CVE-2026-125396 is not in CISA KEV (catalog 2026.11.20, 1,790 entries), and CISA’s SSVC entry says exploitation none. The same catalog lists older bugs of this class, Ghostscript CVE-2017-8291 and ImageMagick CVE-2016-3714.

Detection

No request-level exploit detail is public, so the content rules look for the file-type mismatch and the two operator names in the CNA text, and the process rules hunt for what happens after. The full rules (YARA, Sigma, Zeek) are in my Sigma repository.

Stage What to look for Where Tested
Delivery PostScript, EPS or WPG magic bytes in a file named like an image or PDF Upload and mail temp directories (YARA) Yes, benign samples
Delivery Clear-text .forceput or .putgstringcopy in an uploaded file YARA Yes, benign samples
Delivery application/postscript posted under an image name, or a PS: prefix in the file name Zeek No
Trigger gs running as www-data, apache, nginx or lp Process creation (Sigma) Converts cleanly
After gs starting sh, curl or wget Process creation, Sysmon for Linux (Sigma) Converts cleanly

Read-only host triage. Judge the package version, not gs --version:

dpkg-query -W ghostscript libgs10 2>/dev/null; rpm -q ghostscript 2>/dev/null
find / -xdev \( -name 'libgs.so*' -o -name gs \) -type f 2>/dev/null
convert -list policy 2>/dev/null | grep -iE 'PS|PDF|EPS|XPS'
find /var/www -path '*uploads*' -type f \( -iname '*.png' -o -iname '*.jp*g' -o -iname '*.pdf' \) -print0 | xargs -0 file --mime-type | grep -i postscript
ps -eo pid,ppid,user,etime,cmd --forest | grep -B2 -A3 -E '[g]s |[m]agick|[c]onvert'

These miss compressed or obfuscated PostScript, files the thumbnailer already deleted, and in-process rendering.

What to do, in order

Order Action Operational impact
1 Copy upload and mail temp directories, /var/log/cups and web logs before you change anything Low
2 Patch Ghostscript everywhere, including container images and bundled libgs, then restart PHP-FPM, CUPS and queue workers Medium
3 Patch WordPress and Roundcube Low
4 No fix yet (Amazon Linux, SUSE Enterprise, RHEL): deny PS, EPS, PDF and XPS in ImageMagick policy.xml, require login on CUPS queues, block outbound traffic from renderers High: PDF thumbnails and print-to-PDF stop
5 After patching, rotate WordPress salts and end Roundcube sessions Medium
6 If gs started a shell: rebuild the host and rotate database credentials and wp-config.php secrets High

This is my advice and does not come from a vendor. None of the three vendors lists a workaround. Check the coder names your build exposes with magick -list format first:

<policy domain="coder" rights="none" pattern="{PS,PS2,PS3,EPS,EPI,EPSF,EPSI,EPT,PDF,XPS}" />
<policy domain="delegate" rights="none" pattern="*"/>
Upload2Shell (CVE-2026-125396) – decision path