Ghostscript Type 1 use-after-free escapes -dSAFER (CVE-2026-125396)
Researchers confirmed command execution via Google, WordPress uploads, Debian CUPS, Roundcube thumbnails and other preview paths.
-dSAFER bypass and code execution in Ghostscript before 10.08.0
Ghostscript before 10.08.0 has a -dSAFER bypass in .putgstringcopy (gs_fonts.ps), which calls privileged .forceput without checking operand types. A local attacker can supply a crafted PostScript or PDF that a user opens, force a type error, recover .forceput through a custom error handler, and trigger a use-after-free across save/restore to run arbitrary code. Anyone processing untrusted documents with an affected Ghostscript build is at risk.
What to do: Upgrade Ghostscript to 10.08.0.
| Product | Affected | Fixed in |
|---|---|---|
| Ghostscript | before 10.08.0 | 10.08.0 |
Order-of-magnitude estimate by the model from install counts, market share and public scan data it knows; verify before quoting.
Ghostscript before 10.08.0 contains a -dSAFER bypass vulnerability in the .putgstringcopy procedure in gs_fonts.ps, which calls the privileged .forceput operator without checking operand types. Attackers can supply crafted PostScript or PDF documents that trigger a type error, recover .forceput via a custom error handler, and cause a use-after-free across save/restore to execute arbitrary code.
Researchers confirmed command execution via Google, WordPress uploads, Debian CUPS, Roundcube thumbnails and other preview paths.
Researchers say ordinary image uploads can reach Ghostscript and turn a font-loader bug into command execution.
Researchers reached Ghostscript before 10.08.0 through WordPress, Roundcube, and unauthenticated CUPS jobs; no wild attacks are confirmed.
CVE-2026-125396 scores 8.5; several Linux distributions still had vulnerable packages or pending fixes.
Today 838 readers · 918 views · 88 reads · all time 215K views