Cybersecurity

Critical Ghostscript Vulnerability Could Allow Malicious Code Execution Through PDF Files

The CVE-2026-39919 vulnerability in Ghostscript allows remote code execution when specially crafted PDF files are processed and could affect WordPress sites and applications that display files uploaded by users. Artifex released the fix in version 10.08.0, while Wordfence has not observed actual exploitation of the vulnerability so far.

2026-10-13
4 min read
45 views
certi.news Editorial Team
Critical Ghostscript Vulnerability Could Allow Malicious Code Execution Through PDF Files

A critical vulnerability in the Ghostscript interpretation and rendering engine could allow remote code execution on servers that process specially crafted PDF files. The vulnerability is tracked as CVE-2026-39919 and exploits a heap buffer overflow when handling low-bit-depth JPEG 2000 images with differences in component resolutions.

Researchers from Defiant’s Wordfence platform discovered the flaw on August 23 using the AI-powered Argus system. According to testing, the malicious file can force Ghostscript to write 1,024 bytes to a buffer no larger than 256 bytes, causing memory corruption and theoretically enabling unauthenticated remote code execution under certain conditions.

How Is the Flaw Related to WordPress Sites?

WordPress can use the PHP Imagick extension to invoke ImageMagick when generating previews or thumbnails for PDF files, while ImageMagick relies on Ghostscript to perform the rendering. Therefore, uploading a PDF file could become an attack entry point if the attacker can upload the file and the system processes it automatically through the affected software chain.

Wordfence identified four main conditions for successful exploitation in WordPress environments: allowing the attacker to upload a PDF file, processing the file to create a preview, the processing chain reaching Ghostscript with policies that allow PDF rendering, and using an unpatched version of the engine. It noted that WordPress, in its default configuration, does not allow anonymous uploads to the media library.

Scope of Impact and Test Results

The affected range extends from Ghostscript versions 9.21 through 10.07.1 and is not limited to WordPress; any application that renders user-controlled PDF files through affected versions may be at risk. The researchers tested Linux environments including Debian, Ubuntu, Fedora, Alpine, and AlmaLinux, as well as an official WordPress Docker image, and found that all of them contained the affected code.

The two proof-of-concept attempts did not achieve remote code execution during 10,240 attempts on Linux packages in a laboratory environment, but the researchers succeeded in executing code on a server specifically configured for testing. Exploitation success also depended on modifications to fonts, language settings, font configuration, and a core system library, and execution was not always reliable.

What Should Operators Do?

Artifex released the fix on September 8 in Ghostscript 10.08.0, and the fixes were also backported to older versions. WordPress administrators should verify that their hosting provider is using version 10.08.0 or later and rebuild and redeploy Docker images that rely on older base images.

If updating is not possible, the guidance recommends blocking PDF uploads to the server or disabling PDF rendering in ImageMagick. As of the time of reporting, Wordfence said it had not observed exploitation of the vulnerability in real-world attacks.

Why Does This Matter?

The significance of the flaw lies in the fact that a PDF file, which appears to be a content input rather than a program, can reach a native component with processing privileges on the server. The existence of the vulnerability does not mean that every WordPress site is automatically vulnerable, as the risk depends on the upload and processing path, policy settings, and version in use. However, these conditions make updating Ghostscript and disabling the path when updating is not possible two direct measures for reducing the attack surface.

News source
BleepingComputer
Open original source ↗
c
Author

certi.news Editorial Team

What you need to know

The CVE-2026-39919 vulnerability in Ghostscript could allow remote code execution when specially crafted PDF files are processed, particularly in workflows that upload and automatically display files. Artifex released the fix in Ghostscript 10.08.0, and Wordfence had not observed active exploitation at the time of the report.

  • The vulnerability affects Ghostscript versions 9.21 through 10.07.1 and is associated with a heap overflow during JPEG 2000 image processing.
  • WordPress sites may be at risk when they allow PDF uploads and process them automatically through ImageMagick, PHP Imagick, and Ghostscript.
  • Successful exploitation requires several conditions, including use of an unpatched version, policies that allow PDF rendering, and an appropriate upload and processing path.
  • Artifex released the fix in Ghostscript 10.08.0, with the fixes also backported to older versions.
  • When updating is not possible, the guidance recommends blocking PDF uploads or disabling PDF rendering in ImageMagick.
  • Two proof-of-concept attempts did not achieve remote code execution on Linux packages in 10,240 attempts, but execution succeeded on a specially configured test server.

FAQ

Which Ghostscript versions are affected?

Versions 9.21 through 10.07.1 are affected according to the article, while the fix is included in version 10.08.0.

Are all WordPress sites automatically vulnerable to compromise?

No. The risk depends on allowing PDF uploads, automatically processing the files, the processing pipeline reaching Ghostscript, and using an unpatched version.

What action is recommended for operators?

Update to Ghostscript 10.08.0 or later and rebuild Docker images based on outdated base images. If updating is not possible, PDF uploads can be blocked or PDF rendering can be disabled in ImageMagick.

Has active exploitation of the vulnerability been observed?

Wordfence said it had not observed exploitation of the vulnerability in real-world attacks at the time of the report.

In the same category

You may also like

View all news