Site Security
Estimated reading time: 8 min read

Ghostscript CVE-2026-39919: Check WordPress PDF Uploads

Ben Marshall Ben Marshall Full-stack Developer & Engineering Manager
Bug graphic illustrating the Ghostscript CVE-2026-39919 flaw in WordPress PDF upload thumbnails
On this page
A Ghostscript flaw lets crafted PDFs corrupt memory when servers make thumbnails. How to check whether your WordPress site renders PDF uploads, and how to lock it down.

CVE-2026-39919 is a critical Ghostscript flaw that lets a crafted PDF corrupt server memory when the file is turned into a preview image.[1][4] If your WordPress site accepts PDF uploads from strangers and makes thumbnails, ask your host to confirm the fix.[2] No attacks have been reported in the wild yet.[1]

This is not a WordPress bug. It sits one layer below, in a tool your host installs, which is why many site owners won’t see it in their plugin update list.[2] Here is how to tell in a few minutes whether your site is in the chain, and what to do if it is.

TL;DR: What to do right now

  1. Open Tools, then Site Health, then Info, then Media Handling. Note the Active editor and the Ghostscript version.
  2. Ask your host whether the CVE-2026-39919 fix is installed. Don’t rely on the version number alone, because Linux distributions often backport fixes.[2][3]
  3. If you run Docker, rebuild from an updated base image and redeploy. Restarting the old container keeps the old Ghostscript.[2]
  4. Until you have confirmation, stop anonymous PDF uploads on your forms, or turn off PDF previews (snippets below).[1][7]
  5. Rate limits and upload limits help, but they don’t remove the flaw.[2]

What happened

Wordfence researchers found the flaw with their Argus testing system and reported it to Artifex, Ghostscript’s maintainer, on August 23. Artifex confirmed it the next day.[3] The fix shipped in Ghostscript 10.08.0 on September 8, and the Ghostscript CVE list shows CVE-2026-39919 as fixed in 10.08.0.[1][5] Public write-ups followed on October 13.[1][2]

DetailWhat we know
AffectedGhostscript 9.21 through 10.07.1[1]
Fixed in10.08.0, plus backported fixes in some Linux packages[1][5]
SeverityCVSS 4.0 score 9.3 (VulnCheck); 9.8 under CVSS 3.1 per Cyber Press[4][2]
TriggerA PDF with a crafted JPEG 2000 image inside[1][4]
Login needed?No, if the site accepts PDFs from anonymous visitors[2]
Exploited in the wild?Not reported as of October 13[1][3]

How hard is it to exploit?

Harder than the 9.3 score suggests, for now. BleepingComputer reports the researchers ran their two proof-of-concept exploits 10,240 times against stock Linux packages without getting code execution, but succeeded on a purpose-built test server.[1] Cybersecurity News adds that an exploit tuned to one build still worked on other systems using the same Ghostscript executable.[3] So the risk grows once someone builds an exploit for a common hosting image.

When it does work, the code runs with the permissions of the web server or Ghostscript process, not root.[2] On many WordPress servers, that user can write to site files, which is enough to plant a backdoor.

Why it matters for your site

Since WordPress 4.7, the Media Library creates an image of a PDF’s first page when you upload one.[7] That feature needs Imagick, ImageMagick and Ghostscript on the server.[7] The chain looks like this: WordPress hands the PDF to Imagick, Imagick calls ImageMagick, and ImageMagick runs Ghostscript to draw the page.[2]

Stock WordPress doesn’t let anonymous visitors upload to the Media Library.[1] The exposure comes from what you add on top. Cyber Press lists form plugins, membership sites, document portals and custom upload endpoints as ways an untrusted PDF can reach that chain.[2]

You are likely exposed if all four are true

  • Someone you don’t trust can upload a PDF, without logging in or with a low-level account.[1]
  • Your site, or a plugin, creates a preview or thumbnail of that PDF.[1]
  • The server’s Ghostscript is reachable from that process.[1]
  • Ghostscript hasn’t been patched.[1]

If your job-application form, quote request form or client portal takes PDF attachments, check how those files are handled. Some plugins store attachments as plain files and never preview them. Others add them to the Media Library, which can trigger a thumbnail. Your plugin’s settings or support team can tell you which applies.

How to check your site for CVE-2026-39919

1. Look at Site Health

Go to Tools, then Site Health, then the Info tab, and open Media Handling. Two lines matter:

  • Active editor. If it says WP_Image_Editor_Imagick, WordPress can use Imagick, which is the route to Ghostscript.[7] If it says GD, WordPress won’t render PDF previews.
  • Ghostscript version. WordPress fills this in by running gs --version. “Not available” usually means WordPress couldn’t find or run Ghostscript.

2. Upload a harmless test PDF

Upload any ordinary PDF to Media, then Add New. If the Media Library shows a picture of the first page, your server is rendering PDFs. If it shows a generic document icon, it isn’t, because WordPress falls back to saving the file without previews.[7]

3. Don’t trust the version number alone

A version below 10.08.0 doesn’t always mean you’re unpatched. Linux distributions often backport security fixes to older-looking versions, so gs --version can’t confirm you’re safe.[2][3] Debian is a good example. On October 14, its security tracker listed CVE-2026-39919 as fixed for Debian 13 and unstable, but still vulnerable with no fixed package for Debian 12.[6]

On managed hosting, the simplest move is to ask. Here’s a message you can send:

Hi, can you confirm whether the Ghostscript package on my server includes the fix for CVE-2026-39919? If not, when will it be patched?

If you manage your own server, check your distribution’s security tracker for the ghostscript package and install the update it lists. For containers, rebuild and redeploy, since restarting an existing container doesn’t replace its Ghostscript package.[2] BleepingComputer reports that Wordfence found the vulnerable code in all ten Linux environments it tested and in an official WordPress Docker image snapshot.[1]

Stopgaps until your host confirms the fix

Option A: Turn off PDF previews in WordPress

WordPress has a filter for this.[7] Returning an empty list means no preview sizes are requested, and WordPress only loads a PDF into the image editor when it has sizes to make. Add this to a small must-use plugin or your child theme’s functions.php:

add_filter( 'fallback_intermediate_image_sizes',
  '__return_empty_array' );

The trade-off: new PDFs show a generic icon in the Media Library. This only covers WordPress’s own preview. A plugin that renders PDFs itself needs its own setting.

Option B: Block PDF rendering in ImageMagick

If you control the server, ImageMagick’s security policy can refuse PDFs entirely.[1][2] Add this line inside the <policymap> section of policy.xml, usually under /etc/ImageMagick-6/ or /etc/ImageMagick-7/:[8]

<policy domain="coder" rights="none" pattern="PDF" />

If PDF previews still appear afterwards, restart PHP. This change affects every app on the server that converts PDFs, not only WordPress.

Option C: Stop taking PDFs from strangers

If a form doesn’t need attachments, remove the upload field. If it does, require a login, limit the file types, or have people email files to a staffed inbox instead. Don’t lean on Ghostscript’s -dSAFER mode, because Wordfence reached the vulnerable code with it switched on.[2][3]

It’s not only WordPress

Any tool that feeds visitor PDFs to Ghostscript is worth checking: document management systems, mail gateways, print services, invoice processors and file conversion APIs.[2] If your helpdesk or CRM previews attachments, ask its vendor too.

Upload forms also attract spam. If your contact form is drowning in junk, our guide on how to stop WordPress contact form spam covers the basics.[9] For another case where an upload field became the risk, see our check for hidden Gravity Forms upload fields.

Zero Spam doesn’t patch Ghostscript or inspect the contents of uploaded files. What it does is check form submissions, comments and registrations against known bad actors, through the free WordPress plugin or the API, so fewer junk submissions reach your forms in the first place. If it fits, start on the free Explorer plan.

FAQ

Frequently Asked Questions

Is CVE-2026-39919 a WordPress vulnerability?

No. The bug is in Ghostscript, which WordPress can reach through Imagick and ImageMagick when it makes PDF previews.[2]

Is CVE-2026-39919 being exploited?

As of October 13, 2026, no in-the-wild attacks had been reported. Researchers did get code execution on a purpose-built test server.[1]

Which Ghostscript version fixes CVE-2026-39919?

Ghostscript 10.08.0, released September 8. Many Linux distributions ship the fix as a backport, so ask your host or check your distribution’s tracker.[1][2]

Does turning off PDF thumbnails in WordPress protect me?

It stops WordPress’s own PDF previews, which removes the usual WordPress route to Ghostscript. Plugins that render PDFs themselves need their own setting, and patching is still the real fix.[7]

My Site Health page says Ghostscript is not available. Am I safe?

Probably from this WordPress route, since WordPress can’t run Ghostscript there. Other apps on the same server may still use it, so a quick question to your host is still worth it.

Sources & References