Critical Ghostscript PDF Decoding Flaw Enables Remote Code Execution on Vulnerable Builds
Vulnerability Disclosure · 6 sources · Updated 2mo ago · First seen Oct 12, 2026

A critical heap-based buffer overflow in Ghostscript’s JPEG 2000 decoding path, CVE-2026-39919, can allow attackers to execute code by submitting a crafted PDF to an application that processes it. The flaw has a reported CVSS score of 9.8 and affects upstream versions 9.21 through 10.07.1 when the OpenJPEG decoder path is present. Wordfence demonstrated unauthenticated remote code execution in a purpose-built WordPress deployment, with code running under the PDF-processing account’s permissions. Its two exploits were build-specific and failed across ten other Linux package environments; researchers reported no public evidence of exploitation in the wild or a universal exploit PDF.
Exposure extends beyond WordPress thumbnail generation to any service that passes untrusted PDFs to an affected Ghostscript build. Artifex fixed the vulnerability in the final Ghostscript 10.08.0 release on September 8, 2026. Organizations should install fixed system packages, verify distribution backports against the full package revision, and rebuild and redeploy affected containers. Where patching is delayed, temporarily block untrusted PDF uploads or disable PDF processing; Ghostscript’s safer execution mode does not prevent this memory-corruption flaw.
Why it matters
CVE-2026-39919 exposes services that render untrusted PDFs through vulnerable Ghostscript builds to memory corruption and potential remote code execution under the PDF-processing account. Exposure spans WordPress preview generation, document portals, invoice processors, mail gateways, print services, and conversion APIs; successful exploitation could compromise application data and credentials, while crashes can disrupt document processing. Wordfence demonstrated build-specific exploitation in a controlled deployment, but reported no public evidence of exploitation in the wild and no universal exploit PDF.
- Severity: Critical, with reported CVSS 3.1 score 9.8 and CVSS 4.0 score 9.3; code execution does not automatically grant root access.
- Exposure prerequisites: Attacker-controlled PDFs must reach an unpatched Ghostscript build using the affected OpenJPEG decoding path. Storing PDFs without rendering them does not expose this path.
- WordPress scope: Requires an accessible upload route, PDF preview generation, and an Imagick → ImageMagick → Ghostscript processing chain. Stock WordPress does not permit anonymous Media Library uploads.
- Exploit reliability: Two build-specific exploits achieved no code execution in 10,240 attempts across ten other Linux package environments. Identical vulnerable binaries across a container or server fleet create repeatable exposure if an exploit is adapted to that build.


