What happened
Researchers at pwn.ai demonstrated that a crafted file can escape Ghostscript's security sandbox and run commands on the server that processes it. The flaw is tracked as CVE-2026-125396 and scored 8.5. It is already patched in Ghostscript 10.08.0, released September 8. The Hacker News reported the research on November 22.
How it works
The bug is a use-after-free in Ghostscript's font-loading code. A malicious document uses it to switch off the -dSAFER checks, then runs commands as the low-privilege account that does the rendering.
Applications do not need to call Ghostscript directly. ImageMagick, Pillow, libvips and Qt plugins hand PostScript or EPS content to it, even when the file is named .png, .jpg or .pdf.
What pwn.ai tested
- An anonymous print job sent to a shared Debian 13 print queue, with no login.
- Roundcube webmail, triggered by opening an emailed attachment.
- The Forminator and Essential Addons for Elementor WordPress plugins, through public upload forms with no login.
- WordPress core, which needs an account with upload rights (Authors and above by default). WordPress has a separate upload-path fix tracked as CVE-2026-65640.
Distribution status
Per the report, Debian 12 is vulnerable. Amazon Linux 2, 2023 and 2027 Preview have fixes pending. SUSE Linux Enterprise 12 SP5 and parts of 15 and 16 are in progress, and openSUSE Leap 16.0 and 16.1 are affected. Red Hat, Rocky, AlmaLinux, Oracle Linux and Fedora status was unverified. No attacks have been reported.
What to do
- Update Ghostscript to 10.08.0 or a distribution build that backports the fix.
- Look for Ghostscript copies bundled inside containers and applications. A host update will not reach them.
- Require authentication on shared print queues.
- Restrict which file types your image processors accept, and disable PostScript/EPS handling in ImageMagick policy if you do not need it.
- Use AppArmor or similar controls. One test showed a profile stopped the compromised interpreter from starting a shell.