Ghostscript font loader sandbox bypass allows command execution (Upload2Shell)
CVE-2026-125396
Servers that process documents or images can be hacked with a bad file.
- CVE
- CVE-2026-125396 (opens in a new tab)
- Score
- CVSS 8.5
- Public date
- 2026-09-02
- First seen
Mitigation
Update to Ghostscript 10.08.0 or later. Debian 13 users should update to 10.05.1~dfsg-1+deb13u3 or later, and Ubuntu users to the fixed packages in USN-8949-1. Until then, require authentication on shared CUPS print queues, and set application policy so the renderer cannot start a shell.
Summary
A flaw in Ghostscript's Type 1 font loader lets a crafted PDF or PostScript document escape the -dSAFER sandbox and run commands. Web services, email tools and print servers that process documents or images can be affected.
Exploit code is public
Affected when
- Ghostscript before 10.08.0
- A service or program that passes documents or images to Ghostscript
Incidents by product: ghostpdl
Distribution packages (10) (every link below opens in a new tab)
- Debian 13 (trixie)ghostscript · fixed in 10.05.1~dfsg-1+deb13u2
- Debian 12 (bookworm)ghostscript · fixed in 10.0.0~dfsg-11+deb12u9
- RHEL 10ghostscript · fixed in 10.02.1-17.el10_3.1
- RHEL 9ghostscript · fixed in 9.54.0-20.el9_9.1
- RHEL 8ghostscript · fixed in 9.27-21.el8_10
- SLES 16.1ghostscript · not fixed yet
- SLES 16.0ghostscript · not fixed yet
- SLES 15 SP7ghostscript · not fixed yet
- openSUSE Leap 16.0ghostscript · not fixed yet
- openSUSE Tumbleweedghostscript · fixed in 10.08.0-5.1
Sources: Debian Security Tracker · Red Hat Security Data (CC BY 4.0) · SUSE CSAF VEX (CC BY 4.0)
Read the write-up · github.com (opens in a new tab)
Write-up (4): github.com, vulncheck.com and more
- CVE record: cve.org (opens in a new tab)
Discussion (4): news.ycombinator.com, sophos.com
- Upload2Shell, RCE in GhostScript (opens in a new tab)
- Upload2Shell · CVE-2026-125396 (opens in a new tab)
- One Vulnearbility Hacks Google, WordPress, Roundcube, Debian 13, Zoom, Box, etc. (opens in a new tab)
- Advisory: Ghostscript Sandbox Bypass Vulnerability - Upload2Shell (CVE-2026-125396) (opens in a new tab)
- Newsletter: Risky Bulletin: Security products start moving out of the Windows kernel (opens in a new tab)
- Newsletter: Srsly Risky Biz: America Needs Homegrown Open-Weight Models (opens in a new tab)
Repository (8): github.com
- Mahgal/upload2shell-check (opens in a new tab)
- 9bie/CVE-2026-125396-bomb (opens in a new tab)
- dinosn/upload2shell-poc-generator (opens in a new tab)
- ashrafzaryouh/CVE-2026-125396 (opens in a new tab)
- evenomn/CVE-2026-125396-upload2shell (opens in a new tab)
- mainaamos/CVE-2026-125396-Upload2Shell (opens in a new tab)
- vatansingh677-a11y/Upload2shell (opens in a new tab)
- Luscious8/Upload2shell (opens in a new tab)