Ghostscript sandbox escape CVE-2026-125396 fixed in 10.08.0 after researchers show RCE via file uploads
A use-after-free in Ghostscript's font loader lets crafted documents bypass -dSAFER and run commands; researchers demonstrated it through about ten applications.
Covered by 2 outlets
First reported Summary updated
- Public PoC
- Yes
- Exploited
- No
- CVSS
- 8.5 High
What happened
A use-after-free in the part of Ghostscript that loads fonts allows a crafted document to disable the -dSAFER sandbox and execute commands.1
Security firm pwn.ai showed that upload, preview and print features in about ten common applications could be made to pass a crafted file to Ghostscript.1
The flaw was fixed in Ghostscript 10.08.0 on 8 September 2026 and is tracked as CVE-2026-125396.1
The CVE was published recently and carries a CVSS 4.0 base score of 8.5.NVD
Who is affected
- Ghostscript, before 10.08.0NVD
Is there a public exploit?
Yes, public A public proof-of-concept file exists, but it only demonstrates the core memory trick and does not run a shell command or touch host files.1
- GitHub evenomn/CVE-2026-125396-upload2shell 9 stars
- GitHub 9bie/CVE-2026-125396-bomb 13 stars
PoC code comes from strangers and is not checked by us. Read it before you run it, and only run it in a lab or against targets you are allowed to test.
Exploited in the wild?
Not yet There have been no reports of the flaw being used in attacks.1
What to do
- Update Ghostscript to version 10.08.0 or later, including any copy bundled inside containers or applications.1
- Require authentication on print queues and restrict the file types accepted by image processors until the renderer is updated.1
For bug hunters
The bug class is a sandbox escape built on a use-after-free in font handling, reached through document conversion pipelines. Programs that accept PDF, PostScript, EPS or image uploads and render them server-side are the places to look, especially where ImageMagick, Pillow, libvips or Qt plugins are used. Test whether crafted documents can influence interpreter state or bypass -dSAFER, and check how upload, preview and print features pass files to renderers.
What to test
- Upload PostScript or EPS content disguised as .png, .jpg or .pdf and observe whether Ghostscript is invoked.
- Try crafted font or document files that trigger type errors and custom error handlers in the renderer.
- Check whether anonymous print queues or public upload forms accept files without authentication.
- Verify that container or application-bundled Ghostscript copies are updated, not just the host package.
Written by bugbounty.wiki with AI from the 2 outlets below. Every statement above comes with a quote we checked against the source it cites (the numbers link to it); anything we could not check was left out. It can still be wrong, so read the coverage before relying on a detail.
Coverage
3 articles, oldest first. Each headline opens the outlet's own article.
-
1
-
2
GitHub Unverified code
PoC for CVE-2026-125396 (9bie/CVE-2026-125396-bomb) -
3
GitHub Unverified code
PoC for CVE-2026-125396 (evenomn/CVE-2026-125396-upload2shell)