A proof of concept has been published for Ghostscript flaw CVE-2026-125396, known as Upload2Shell. A specially crafted PDF with PostScript triggers a bug in the Type 1 font loader and reuses freed memory. The published example demonstrates memory control but does not run a shell command. Versions before 10.08.0 are affected, and distributions such as AlmaLinux have already shipped fixed packages.

What it means: Ghostscript is one of those pieces of software that is rarely visible but present everywhere. It is used to create document thumbnails, convert PDFs, print and process images on web servers, often through libraries such as ImageMagick. The name Upload2Shell describes the risk precisely: an application that accepts user uploads and passes them through Ghostscript can give an attacker code execution. The fact that the published code does not yet run commands is no reason for complacency, because the gap between memory control and full exploitation often closes within days. Businesses running online shops, customer portals or document management systems should check whether Ghostscript exists anywhere on their servers. It is often installed as a dependency without anyone knowing. Upgrading to 10.08.0 or to the distribution's fixed package is the main fix. Where that is not immediately possible, it helps to disable PostScript and PDF handling in ImageMagick policies and to run conversion in an isolated environment. Uploaded files should also never be processed with permissions that reach databases or keys. Containers built on old base images are a common blind spot.

Read the original on Sophos

Related service: Custom software

Related stories