← All articles

Ghostscript vulnerability let crafted uploads run commands on

Ghostscript vulnerability let crafted uploads run commands on

The Ghostscript vulnerability CVE-2026-125396 allowed a crafted file to escape the program’s security sandbox, a set of restrictions intended to stop a document from running commands or accessing files, and execute commands on the server processing it. The flaw was fixed in Ghostscript 10.08.0 on September 8, and there are no reports that attackers used it in the wild.

Ghostscript is a document and image interpreter used by many Linux servers to convert PDFs, PostScript files and images into other formats. Applications do not always call it directly. ImageMagick, Pillow, libvips and a Qt plugin can pass PostScript or EPS content to Ghostscript for rendering, even when a file is named .png, .jpg or .pdf. Creating a thumbnail, cropping an image, generating a preview or printing a document can therefore start the vulnerable interpreter.

Security firm pwn.ai demonstrated the issue through about ten common applications. The underlying problem is a use-after-free in Ghostscript’s font-loading code. That means the program continues using a piece of memory after it has released it, creating an opportunity for a specially prepared document to alter the interpreter’s behaviour. In the demonstration, the file disabled checks enforced by Ghostscript’s -dSAFER sandbox and caused a command to run on the server. Each command ran under the low-privilege account used for rendering, which limits access but does not make command execution harmless.

Several tested routes required no login. They included an anonymous print job sent to a shared Debian 13 queue, an attachment processed by Roundcube webmail as soon as the recipient opened the message, and public upload forms in the WordPress plugins Forminator and Essential Addons for Elementor. WordPress Core required an account allowed to upload files, a permission that Authors and higher roles have by default. Although the CVE is classified as a local flaw, pwn.ai reached Ghostscript over the network through print jobs, email and web uploads. Its impact index records the tested version and access requirements for each application.

Artifex, the developer of Ghostscript, moved the vulnerable internal step into safer code in version 10.08.0. The bug report described the affected code as an old component known to create security problems but difficult to remove. The CVE was published last week and received a score of 8.5 out of 10 in the security advisory.

WordPress had separately closed its own upload path in version 7.0.4 on August 12, under CVE-2026-65640. The WordPress and Ghostscript fixes address different parts of the same chain, so installing one does not replace the other. A website can still reach a vulnerable renderer through another application or library if that copy has not been updated.

Administrators also need to check which Ghostscript installation is actually used. Updating the host operating system does not update a separate copy bundled inside a container image or an application, meaning a document-processing worker can continue running vulnerable code after the host package has been replaced.

Coverage differed among Linux distributions when pwn.ai surveyed them last week. Debian 12, also known as Bookworm, was listed as vulnerable. Amazon Linux 2, Amazon Linux 2023 and Amazon Linux 2027 Preview had fixes pending. SUSE Linux Enterprise 12 SP5 and parts of version 15 had fixes in progress, as did SUSE Linux Enterprise Server 16.0 and 16.1. openSUSE Leap 16.0 and 16.1 were listed as affected. The firm did not establish whether current Red Hat, Rocky Linux, AlmaLinux, an enterprise Linux distribution or stable Fedora packages included the fix. The package list describes update status, not a tested attack path for every system.

Until the renderer is updated, organisations can reduce exposure by requiring authentication for print queues and limiting the file types accepted by image-processing tools. Other system controls can help: in one test, an AppArmor profile stopped the compromised interpreter from starting a shell. A published proof-of-concept file demonstrates only the central memory technique. It changes a value inside the running interpreter and then restores it, without launching a shell or accessing host files, and it fails before that point on patched version 10.08.0.

The wider research also examined production services. Google fixed the affected path last week. pwn.ai’s reports about similar problems at Dropbox and other unnamed services concern separate Ghostscript bugs, not CVE-2026-125396. For website owners, AEU Hosting provides managed WordPress hosting secured end to end, which is relevant when WordPress upload paths and the software processing uploaded files both need careful protection.

Also available in: DeutschItalianoShqip