Karen IT Security Response Center (KSRC) Advisory

Advisory ID: KSRC-2026-11241 | Publication Date: 24 November 2026

Critical Ghostscript Sandbox Escape – Upload2Shell
CVE-2026-125396 – Remote Code Execution via Crafted Documents

Summary

A high-severity sandbox escape vulnerability has been identified in Ghostscript, tracked as CVE-2026-125396 and publicly referred to as Upload2Shell.

The flaw is a use-after-free in Ghostscript’s Type 1 font loader. A specially crafted PostScript, PDF, or image file can bypass the -dSAFER sandbox and execute arbitrary commands with the privileges of the process running Ghostscript.

Because Ghostscript is widely used behind the scenes for document and image processing, the vulnerability can be reached through common application features such as file uploads, email attachment previews, thumbnail generation, and print services.

CVSS Score: 8.5 (High – CVSS 4.0)

Affected Versions

  • Ghostscript versions prior to 10.08.0

Fixed Version

  • Ghostscript 10.08.0 and later (released 8 September 2026)
  • Distribution packages that have backported the fix (check your vendor’s security tracker)

Impact & Attack Vectors

Researchers have demonstrated working attack paths through multiple widely used platforms, including:

  • WordPress (core and popular plugins such as Forminator and Essential Addons for Elementor)
  • Roundcube webmail (attachment preview)
  • MediaWiki
  • CUPS print queues
  • ImageMagick-based processing pipelines
  • Other applications that pass user-supplied files to Ghostscript

In some cases, simply viewing an email or uploading a file with a trusted extension (e.g. .jpg, .png, .pdf) is sufficient to trigger the vulnerability.

Recommendations

  1. Immediate action: Upgrade Ghostscript to version 10.08.0 or a distribution package that includes the security fix.
  2. Verify the installed version after upgrading (note that some distributions report an older version number even after applying a backport).
  3. If immediate upgrade is not possible, apply temporary mitigations:
    • Restrict Ghostscript handling in ImageMagick policy (disable PS, PDF, EPS, XPS coders and the gs delegate).
    • Limit or disable automatic document/image processing features that invoke Ghostscript.
  4. Review applications that process user-uploaded files or email attachments and ensure they are updated.
  5. Monitor for suspicious file processing activity and review logs related to document conversion services.

Additional Notes

Proof-of-concept code is publicly available. No widespread exploitation in the wild has been confirmed at the time of this advisory. However, the combination of easy reachability through common web and mail features and the availability of public exploits makes prompt patching strongly recommended.

Support from KSRC

KSRC (Karen IT Security Response Center) is available to assist organizations with impact assessment, mitigation guidance, and verification related to this vulnerability.


Karen IT
We make the Internet harder to abuse.