Skip to main content
← Vulnerabilities

Ghostscript before 10.08.0 -dSAFER Bypass via .putgstringcopy .forceput Recovery

Ghostscript before 10.08.0 is affected when run with -dSAFER while loading attacker-controlled Type 1 fonts. The fix is in 10.08.0.

Written by anthropic/claude-haiku-5.5 from the sources below. Verify against them.

8.5HighCNA
Exploited
No known exploitation
Fix
Fixed in 10.08.0
Who is exposed
Specific setups only

Do first: Check whether your setup matches what the bug needs. Ghostscript before 10.08.0 Ghostscript run with -dSAFER Attacker-controlled Type 1 font loading with a custom errordict typecheck handler

Published
Last modified
14/100 · provisional
Specific setups only
None on Exploit-DB, Metasploit or GitHub

Summary

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.

cve.now Index

14Pcve.now Index 14 of 100 · methodology v3 · provisional
  • Exploitation?/40Unknown. No CISA SSVC exploitation rating yet
  • Exposure5/25Specific setups only
  • Reach?/20Unknown. No tracked technology or package matched
  • Severity8.5/10CVSS 8.5
  • No patch0/5No signal

What would change the score

  • Would score about 64 if added to CISA KEV
  • Would score about 59 if CISA's SSVC rates exploitation active
  • Would score about 24 if CISA's SSVC rates it automatable

What to do

  • Check whether your setup matches what the bug needs.

    Ghostscript before 10.08.0 Ghostscript run with -dSAFER Attacker-controlled Type 1 font loading with a custom errordict typecheck handler
  • Upgrade to a fixed version: 10.08.0.

  • Workaround: Do not pass untrusted PostScript or EPS to Ghostscript until patched.

Timeline

  1. CVE published
  2. First seen by cve.now

Affected versions

  • ArtifexSoftware ghostpdl

    fixed in 10.08.0

Evidence 5

  1. Patch
  2. Report
  3. Repository
  4. Repository
  5. Link

Corrections

None so far.

Something wrong on this page? Report an error. Every fix is listed here.

Questions about CVE-2026-125396

Is CVE-2026-125396 being exploited?

It is not in CISA's Known Exploited Vulnerabilities catalog, and CISA's SSVC assessment does not mark exploitation as active. That does not mean it has not been attacked: vendors and researchers can report attacks before CISA lists them. No public exploit code is tracked.Source: cve.now feed data

What does this mean?

The -dSAFER setting, which restricts what Ghostscript can do with files and the system, can be bypassed. An attacker can recover the .forceput operator, causing a use-after-free across save and restore that can lead to arbitrary code execution.Source: vulncheck.com, bugs.ghostscript.com

Which versions are affected by CVE-2026-125396?

ghostpdl: before 10.08.0.Source: cve.now feed data

Am I affected, and how do I check?

Ghostscript versions before 10.08.0 are affected when run with -dSAFER and loading attacker-controlled Type 1 fonts with a custom errordict typecheck handler. To check a installed version, run gs --version and compare it with 10.08.0.Source: vulncheck.com, bugs.ghostscript.com

How do I fix CVE-2026-125396?

Upgrade to Ghostscript 10.08.0 or later. Until then, do not pass untrusted PostScript or EPS files to Ghostscript.Source: vulncheck.com, bugs.ghostscript.com