Researchers Demonstrate Ghostscript Sandbox Escape Through Crafted File Uploads

· Original article ↗

Summary

Researchers demonstrated that CVE-2026-125396, a Ghostscript font-loading use-after-free, can disable -dSAFER and run commands through file-processing features in about ten apps. Ghostscript 10.08.0 fixes it; no exploitation was reported.

Key points

  • pwn.ai demonstrated that a crafted document can exploit Ghostscript’s font-loading use-after-free to disable the -dSAFER sandbox and run commands as the renderer’s low-privilege account.
  • File-processing libraries can invoke Ghostscript indirectly, so uploads, previews, thumbnails, and image conversions may expose the vulnerable path even when files use extensions such as .png or .jpg.
  • Tested paths included unauthenticated print jobs, Roundcube email attachments processed when opened, and public upload forms in the Forminator and Essential Addons for Elementor WordPress plugins.
  • Ghostscript fixed CVE-2026-125396 in version 10.08.0 on September 8. The article says there were no reports of exploitation.
  • WordPress 7.0.4 separately fixed its upload path under CVE-2026-65640; that fix does not replace updating Ghostscript in the renderer actually used.
  • Bundled copies in containers or applications may remain vulnerable after the host package is updated. Suggested interim measures include requiring print-queue authentication, limiting accepted file types, and applying system controls such as AppArmor.
  • A published proof of concept demonstrates the memory trick but does not run a shell command or access host files; the researchers also said related issues at Dropbox and other services were separate Ghostscript bugs.

Article Details

Vulnerability Types
  • Use-after-free
  • Sandbox escape
  • Remote code execution
Severity
8.5/10
Exploitation Status
not_reported
Exploit Availability
public_poc
Patch Status
available
Workarounds
  • Require authentication on print queues.
  • Limit which file types an image processor accepts.
  • Use an AppArmor profile; in one test, it stopped the compromised interpreter from starting a shell.

MITRE ATT&CK

CVE

People

Vendors

Products

Related Articles