Cyber Security News

Critical Ghostscript Vulnerability Lets Malicious PDFs Trigger Remote Code Execution

A critical vulnerability in Ghostscript could allow attackers to execute code on vulnerable servers by uploading a specially crafted PDF containing a malicious JPEG 2000 image.

Tracked as CVE-2026-39919, the vulnerability is a heap-based buffer overflow rated 9.8 out of 10 under CVSS v3.1 and 9.3 under CVSS v4.0, reflecting a worst-case unauthenticated, network-reachable remote code execution scenario.

Artifex released Ghostscript 10.08.0 on September 8, 2026, to address the issue after Wordfence Threat Intelligence discovered and privately reported it during a WordPress 7.1 security assessment.

The vulnerability affects Ghostscript versions before 10.08.0 and resides in the JPEG 2000 output adapter, specifically the code handling images whose components use mismatched subsampling factors.

The affected code allocates memory for packed image output but subsequently writes a full byte for each output column, regardless of bit depth.

This mismatch lets attacker-controlled data overflow the heap buffer and corrupt Ghostscript’s internal memory-management metadata. Under suitable conditions, the memory corruption can be developed into code execution.

Wordfence researchers demonstrated unauthenticated remote code execution on a purpose-built WordPress deployment.

The attack chain does not exploit WordPress itself; rather, it abuses the document-processing stack commonly used by WordPress installations.

When a PDF is added to the Media Library, WordPress may use Imagick, which invokes ImageMagick, which in turn calls Ghostscript to render a preview image of the document’s first page.

A malicious PDF can therefore reach the vulnerable Ghostscript process without directly targeting PHP or WordPress core.

This makes the issue particularly relevant for websites that accept PDFs from anonymous visitors, customers, contributors, or low-privileged users.

Upload forms, document portals, invoice-processing systems, print services, mail gateways, preview generators, and file-conversion APIs may all expose a similar attack surface if they render untrusted PDFs through Ghostscript.

Wordfence Researchers said that, the vulnerability arises when Ghostscript processes a JPEG 2000 image with sub-byte sample precision and different component resolutions.

Ghostscript Vulnerability

The severity score should not be mistaken for a claim that one exploit file compromises every server. Wordfence’s testing found that proof-of-concept exploits were build-specific: files developed for one Ghostscript environment did not succeed unchanged across ten different Linux package environments.

However, that limitation does not eliminate the risk. Attackers can target a known software build, identify hosts running a shared container image, or adapt payloads for common hosting environments.

Build-specific exploitation is more difficult than universal exploitation, but it remains dangerous for organizations operating repeatable infrastructure.

The official WordPress Docker image snapshot tested by Wordfence reportedly contained a vulnerable Ghostscript package and a functioning PDF-preview path.

Stock WordPress does not permit anonymous users to upload PDF files by default, but plugins, custom forms, membership features, application routes, and authenticated user roles can provide the missing upload path.

Administrators should review every workflow that accepts and processes PDFs, not only the WordPress Media Library.

There is no WordPress plugin update that fixes CVE-2026-39919. The remediation must occur at the operating-system or container-image layer.

Administrators should install the fixed Ghostscript package provided by their Linux distribution, follow vendor restart guidance, and rebuild containers from an updated base image.

The reported Ghostscript version alone may be misleading because distributions can backport security fixes while retaining an older upstream version string.

Organizations unable to patch immediately should suspend untrusted PDF uploads or disable PDF rendering in ImageMagick’s security policy.

Running document conversion in an isolated, minimally privileged service can reduce post-exploitation impact, but it does not remediate the underlying memory-corruption vulnerability.

The incident highlights a broader supply-chain reality for web applications: a routine file-upload feature can invoke multiple hidden dependencies beneath the application layer.

In this case, WordPress may hand a PDF to Imagick, ImageMagick, and finally Ghostscript meaning a vulnerability in a native document-rendering component can become a server compromise risk far above the code where the upload originally occurs.

Stops Cyber threats before impact with 21 min faster MTTR. Integrate ANYRUN’s Sandbox in your SOC.

Mayura Kathir

Mayura Kathir is a cybersecurity reporter at GBHackers News, covering daily incidents including data breaches, malware attacks, cybercrime, vulnerabilities, zero-day exploits, and more.

Recent Posts

Hackers Use ConnectWise SkyKick Credentials to Access Microsoft 365, Halting Cloud Backups

Attackers abused compromised ConnectWise Cloud Backup credentials to access Microsoft 365 customer environments, prompting ConnectWise…

1 day ago

Anthropic’s Claude AI Uncovers Origins of NSA-Provided Cryptographic Keys After 25 Years

Anthropic says an internal Claude research model reconstructed how the National Security Agency generated seeds…

1 day ago

Critical WordPress Flaws Allow Attackers to Execute Remote Code Without Authentication

Two WordPress Core vulnerabilities can be chained to execute remote code without authentication, according to…

1 day ago

OpenBSD Kernel Flaw Dating Back 37 Years Enables Local Privilege Escalation to Root

A newly disclosed OpenBSD kernel exploitation chain combines a shared memory accounting flaw with a…

1 day ago

GhostAction Hackers Hide Credential-Stealing Malware in Fake Font Files Across 94 GitHub Repositories

GhostAction attackers have expanded their GitHub credential theft campaign with a second stage that disguises…

1 day ago

SideCopy Hackers Target Indian Organizations With ReverseRAT Malware to Steal Data

Indian authorities have warned that SideCopy hackers are targeting Indian organizations, including academic institutions, with…

1 day ago