A Ghostscript vulnerability, CVE-2026-39919, lets a crafted PDF corrupt memory on the server that turns it into a thumbnail. Artifex fixed it in Ghostscript 10.08.0, released September 8, 2026. The public write-up came on October 13, when BleepingComputer reported that Wordfence had shown how a PDF upload to WordPress can reach the flaw.
Most CMS sites never call Ghostscript on purpose. They reach it through ImageMagick, which hands PDFs to Ghostscript whenever a site makes a preview image. WordPress does this for PDFs in the Media Library. Drupal sites can do it through the ImageMagick toolkit and PDF preview modules. This piece covers what the Ghostscript vulnerability is, how to tell if your server runs Ghostscript, how to patch it, and what to switch off if you cannot patch today. Facts are as of October 14, 2026.
The short version: update the Ghostscript package on every server that accepts PDF uploads. On Debian and Ubuntu, the fixed package keeps an older version number, so check the full package version as well as gs --version. If you cannot patch yet, block PDF handling in ImageMagick’s policy file or turn off PDF thumbnails in WordPress. No plugin or module update fixes this, because the flaw sits in a server package.
What the Ghostscript vulnerability is
Ghostscript is the open source PDF and PostScript interpreter from Artifex. The Ghostscript vulnerability is in the code that decodes JPEG 2000 images inside a PDF.
The VulnCheck advisory describes a heap-based buffer overflow. A PDF carries a JPEG 2000 image whose color components use mismatched subsampling factors. Ghostscript sizes a row buffer for packed output, then writes a full byte per column. The overflow corrupts the memory allocator, which can lead to code execution.
The fix commit is a small change to one file, seven lines added and three removed. Its message credits Alex Thomas of Wordfence Argus, Wordfence’s AI-assisted research system, with the report.
Key facts:
- CVE: CVE-2026-39919, published September 15, 2026.
- Affected: Ghostscript before 10.08.0. BleepingComputer, citing Wordfence, narrows it to 9.21 through 10.07.1.
- Fixed: Ghostscript 10.08.0, plus backported fixes in distribution packages.
- Severity: CVSS 4.0 score of 9.3 from VulnCheck. Ubuntu also lists a CVSS 3.1 score of 9.8.
Is the Ghostscript vulnerability being exploited?
Not that anyone has reported. According to BleepingComputer, Wordfence has not seen attacks in the wild.
Wordfence did build two proof-of-concept exploits. It ran them 10,240 times against Linux distribution packages and did not get code execution. It did get code execution on a test server built for the purpose, though not every time.
Patch soon. The research is now public, and the fix commit shows where the bug is.
The scores also disagree. Red Hat rates it Moderate at 7.8, because someone has to process a crafted PDF. On a website that makes previews of every upload, the upload itself is that step. For CMS servers, treat it as high priority.
How a PDF upload reaches Ghostscript in WordPress and Drupal
WordPress has made PDF previews since version 4.7. The WordPress core announcement says the previews come from the Imagick image editor. They need the PHP Imagick extension, ImageMagick and Ghostscript on the server. When all three are present, WordPress renders the first page of each PDF in the Media Library as an image.
BleepingComputer lists four conditions for an attack on WordPress:
- An attacker can upload a PDF, either anonymously or with a low-level account.
- The site makes a preview or thumbnail from it.
- The processing reaches Ghostscript.
- The vulnerable decoding code is still on the server.
Stock WordPress does not allow anonymous Media Library uploads. The risk comes from plugins and roles that let more people upload. Think of membership sites where members can post files, job boards that accept resumes, abstract and award submission forms, and document libraries.
Drupal works the same way through a different path. The ImageMagick module lets Drupal’s image system use ImageMagick. Its project page says Ghostscript must be installed if PDF or PostScript support is needed. Core Drupal image styles do not turn PDFs into images on their own. A Drupal site is exposed when a contributed module makes PDF previews through ImageMagick or Ghostscript.
How to tell if your site uses Ghostscript
Start with the server. If Ghostscript is not installed, the flaw cannot be reached through it.
| Check | Command or location | What it tells you |
|---|---|---|
| Is Ghostscript installed? | gs --version |
The upstream version, or “command not found” |
| Is the package patched? (Debian, Ubuntu) | dpkg -l ghostscript |
The full package version to compare with your distribution’s advisory |
| Is the package patched? (Red Hat family) | rpm -q ghostscript |
The package release to compare with Red Hat’s errata |
| Can ImageMagick read PDFs? | convert -list format | grep -i pdf (ImageMagick 6) or magick -list format | grep -i pdf (ImageMagick 7) |
Whether a PDF coder is registered |
| Is PDF blocked by policy? | identify -list policy or magick identify -list policy |
The active policy file and any rules on PDF |
| What WordPress sees | Tools, Site Health, Info, Media Handling | The “Ghostscript version” line |
WordPress fills that Site Health line by running gs --version. If the host blocks PHP’s exec function, it shows that it cannot tell. In that case, ask the host or check from a shell.
A quick practical test is to upload a small PDF to the Media Library on staging. If a preview image appears, the full chain is in place. If you see only a generic document icon, WordPress did not reach Ghostscript for that file.
How to patch the Ghostscript vulnerability
The fix for the Ghostscript vulnerability goes into the operating system or the container image. A WordPress plugin or a Drupal module update does not change the Ghostscript package.
Debian and Ubuntu backport the fix into older version numbers. An Ubuntu 24.04 server can report Ghostscript 10.02.1 and still be patched. Compare the full package version with the table below.
| Distribution | Fixed package | Status as of October 14 |
|---|---|---|
| Ubuntu 26.04 LTS | 10.06.0~dfsg-3ubuntu1.1 | Fixed |
| Ubuntu 24.04 LTS | 10.02.1~dfsg1-0ubuntu7.9 | Fixed |
| Ubuntu 22.04 LTS | 9.55.0~dfsg1-0ubuntu5.14 | Fixed |
| Ubuntu 20.04, 18.04, 16.04 | None listed | Needs evaluation |
| Debian 13 (trixie) | 10.05.1~dfsg-1+deb13u2 | Fixed (DSA-6516-1) |
| Debian 12 (bookworm) | None listed | Vulnerable |
The Ubuntu rows come from the Ubuntu CVE page, which points to USN-8791-1. The Debian rows come from the Debian security tracker. Red Hat’s page did not show its errata list when we checked, so confirm your RHEL release in the Red Hat Customer Portal.
Debian 12 matters for agencies. Many older WordPress and Drupal servers still run it, and it had no fixed package on October 14. Those servers need the mitigations in the next section until a fix ships.
For Docker deployments, rebuild from a patched base image and redeploy. Wordfence found the vulnerable code in an official WordPress Docker image snapshot, according to BleepingComputer. A running container does not pick up host updates.
On managed platforms such as Pantheon or WP Engine, the host controls the server packages. The fix is theirs to install. Check their status page or ask support for a statement on CVE-2026-39919, and keep the reply in the client file.
Short-term mitigations if you cannot patch today
There are two levels. The ImageMagick policy blocks PDF processing for everything on the server. The WordPress filter stops WordPress core from making PDF previews. Use the first if you can.
Block PDF in ImageMagick’s policy file. ImageMagick reads a policy.xml file that can deny whole formats. On Debian and Ubuntu, it usually sits in /etc/ImageMagick-6/. The identify -list policy command shows the exact path. Add a line inside the <policymap> block:
<policy domain="coder" rights="none" pattern="{PS,PS2,PS3,EPS,PDF,XPS}" />
This uses the coder syntax from the ImageMagick security policy guide. It covers PDF and the other formats ImageMagick hands to Ghostscript. Restart PHP-FPM or Apache afterward, then test a PDF upload on staging. Check first whether your policy file already has a rule like this.
Turn off PDF previews in WordPress. The fallback_intermediate_image_sizes filter sets which image sizes WordPress makes for PDFs. Returning an empty array stops them. WordPress core then skips loading the PDF into the image editor at all. Put this in a small must-use plugin:
add_filter( 'fallback_intermediate_image_sizes', '__return_empty_array' );
This covers WordPress core only. A plugin that builds its own PDF previews through Imagick can still reach Ghostscript, so the policy file is the broader fix. Previews already created stay in place.
Limit who can upload PDFs. Review which roles and forms accept PDF files. Remove upload rights that are no longer needed. We covered this kind of review after the WordPress file upload flaws under attack in September, and the same audit applies here.
What this means for Drupal sites
Drupal sites with PDF previews need the same server patch. The Drupal version does not matter for this Ghostscript vulnerability. Check composer.json for ImageMagick, Imagick or PDF preview modules, then run the server checks above.
This also lands in the same weeks as other Drupal patching. The Drupal core security release on October 14 still needs to go out on many sites. Bundle the Ghostscript check into that maintenance window.
We explained the deadline in what Drupal 10 end of life means for your site. For the questions to send a vendor, see our plain-language Webform advisory guide.
A Ghostscript vulnerability checklist for agencies
- List every server that accepts PDF uploads: WordPress, Drupal, document libraries, job boards, submission systems.
- Run the checks in the table above on each one, and record the package version.
- Patch the package or rebuild the container image. Debian 12 servers have no fix yet, so they go to the next step.
- Apply the policy file rule on any server you cannot patch this week.
- Ask managed hosts for a written answer, and keep it.
- Review upload rights for members, applicants and anonymous visitors.
Association, nonprofit and university sites tend to collect PDFs from people they do not know. Abstracts, resumes, grant applications and award nominations all arrive that way. That is the same exposure pattern as the Gravity Forms upload flaw, one layer further down the stack.
Frequently Asked Questions
What is CVE-2026-39919?
It is a heap buffer overflow in Ghostscript’s JPEG 2000 decoding code. A crafted PDF can corrupt memory and may lead to code execution. It is fixed in Ghostscript 10.08.0.
Which Ghostscript versions are affected?
The CVE lists all versions before 10.08.0. BleepingComputer, citing Wordfence, gives the range as 9.21 through 10.07.1. Distribution packages with backported fixes are safe even with older version numbers.
Is the Ghostscript vulnerability being exploited?
As of October 14, 2026, no attacks using the Ghostscript vulnerability have been reported. Wordfence built proof-of-concept exploits, but they did not get code execution against Linux distribution packages in testing.
Does my WordPress site use Ghostscript?
Check Tools, Site Health, Info, Media Handling for the Ghostscript version. You can also upload a PDF on staging. If WordPress shows a preview image, it used Imagick, ImageMagick and Ghostscript to make it.
Will a WordPress plugin or Drupal module update fix this?
No. The Ghostscript vulnerability is in the Ghostscript package on the server. The fix comes from an operating system update or a rebuilt container image.
Why does my patched Ubuntu server still show an old Ghostscript version?
Ubuntu and Debian backport security fixes into the version they ship. Ubuntu 24.04 stays on 10.02.1 with a new package suffix. Check the full package version with dpkg.
What if my server runs Debian 12?
As of October 14, the Debian tracker lists no fixed package for bookworm. Block PDF handling in ImageMagick’s policy file and limit PDF uploads until a fix ships.
Does turning off PDF thumbnails in WordPress fully protect the site?
It stops WordPress core from sending PDFs to Imagick. Other plugins can still do it. The ImageMagick policy rule is the broader protection until the package is patched.
Do managed hosts like Pantheon or WP Engine handle this?
They control the server packages, so the patch is theirs to apply. Ask support or check their status page for a statement on CVE-2026-39919.