CVE-2026-125396: Ghostscript -dSAFER bypass in font loader

CVE-2026-125396 · Severity: high · CVSS 7.8 · Published 2026-11-10

Ghostscript, a widely-used tool for processing PostScript and PDF documents, contains a security bypass that allows attackers to circumvent the -dSAFER sandbox protection. An attacker can craft a malicious PDF or PostScript file that exploits a flaw in the font-loading code to achieve arbitrary code execution with full system access, bypassing all intended safety restrictions.

Technologies: Artifex Ghostscript. Vendors: Artifex.

Quick answers

Is CVE-2026-125396 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2026-125396 being exploited in the wild.
How severe is CVE-2026-125396?
High severity, with a CVSS score of 7.8, published 10 November 2026.
Which products and versions are affected?
Artifex Ghostscript before 10.08.0.
Is there a fix for CVE-2026-125396?
Yes: fixed in 10.08.0. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2026-125396 attacked?
It is attacked with local access, in a software library.
Am I affected by CVE-2026-125396?
Check whether you run Artifex Ghostscript at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

How to fix

  • Fixed in: 10.08.0

Technical details

The vulnerability is a use-after-free in the .putgstringcopy procedure (gs_fonts.ps) that fails to validate operand types before calling the privileged .forceput operator. An attacker-controlled PostScript document can trigger a typecheck error, install a custom error handler to recover .forceput with attacker-supplied operands, and cause .forceput to store a post-save local string in protected systemdict. When restore() frees the local allocation, a dangling reference persists in the protected dictionary. Allocator grooming and careful memory manipulation create an arbitrary native read/write primitive that allows hijacking C function pointers, bypassing -dSAFER entirely.

Affected products

  • Artifex Ghostscript before 10.08.0

Timeline

  • 2026-11-10: disclosed
  • 2026-10-31: other: Marked RESOLVED FIXED in bug tracker
  • 2026-09-01: other: Initial report

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.