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.
- 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
- Last modified
- A 0-100 score for how much a CVE matters across the industry: exploitation, exposure, how widely the software is used, severity and whether a fix exists.What do these mean? →
- 14/100 · provisional
- How many real-world setups can hit the bug, from the vendor's advisory and CISA data. It does not know your setup.What do these mean? →
- Specific setups only
- Whether working attack code is public (Exploit-DB, Metasploit, Nuclei or GitHub). Public code makes attacks easier.What do these mean? →
- 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
- 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 handlerUpgrade to a fixed version: 10.08.0.
Workaround: Do not pass untrusted PostScript or EPS to Ghostscript until patched.
Timeline
- CVE published
- First seen by cve.now
Affected versions
- ArtifexSoftware ghostpdl
fixed in 10.08.0
Evidence 5
- Patch
- Report
- Repository
- Repository
- 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