CVE-2026-39919: Heap-Based Buffer Overflow in Ghostscript JPEG 2000 Output Adapter
- Vendor
- Artifex Software
CVE-2026-39919 is a heap-based buffer overflow in the JPEG 2000 JPXDecode output adapter in Ghostscript versions before 10.08.0. A crafted PDF containing a JPEG 2000 image with mismatched component subsampling factors and a sample depth below eight bits triggers the non-samescale, sub-byte-depth output path. The process_one_trunk() routine writes one byte per output column into a row buffer sized for packed samples, exceeding the allocation. The resulting writes can corrupt internal chunk-allocator metadata and enable arbitrary code execution.
Impact, mitigation & remediation
What it means and what to do now: patch path, interim mitigations, and the assume-compromise checklist.
Impact
What an attacker gets, and what they’ve been doing with it.
Processing a malicious PDF can cause heap corruption, application crashes, denial of service, or arbitrary code execution with the privileges of the Ghostscript process. Successful code execution can compromise the confidentiality, integrity, and availability of data and resources accessible to that process. Applications and services that delegate document rendering or conversion to an affected Ghostscript installation are also exposed when they accept attacker-controlled PDFs.
Mitigation
If you can’t patch tonight, do this now.
Until patched, prevent affected Ghostscript installations from processing untrusted PDFs, including through automated rendering and conversion workflows. Where processing must continue, isolate Ghostscript using operating-system-level sandboxing and least-privileged execution, restrict access to processing services, and limit accessible data and resources. Content filtering or pre-validation that rejects PDFs containing JPEG 2000 images with inconsistent component subsampling parameters can reduce exposure but should not replace patching.
Remediation
Patch, then assume compromise.
Upgrade Ghostscript to version 10.08.0 or later, or install the applicable distribution package containing the backported fix. Fixed Debian versions include 10.0.0~dfsg-11+deb12u9 for Debian 12 and 10.05.1~dfsg-1+deb13u2 for Debian 13. Update the installed Ghostscript and associated libgs packages as applicable. The code correction fixes sample counting and output writes in process_one_trunk() and rejects unsupported bit depths in decode_image().
Exploits
No public exploits tracked yet. Mallory keeps watching.
Affected products & vendors
Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.
References
Frequently asked questions
- Is CVE-2026-39919 exploited in the wild?
- As of Dec 1, 2026, Mallory has no reports of CVE-2026-39919 being exploited in the wild. It is not listed in CISA KEV.
- Is there a public exploit for CVE-2026-39919?
- As of Dec 1, 2026, Mallory has found no public exploit for CVE-2026-39919.
- Is there a patch for CVE-2026-39919?
- Upgrade Ghostscript to version 10.08.0 or later, or install the applicable distribution package containing the backported fix. Fixed Debian versions include 10.0.0~dfsg-11+deb12u9 for Debian 12 and 10.05.1~dfsg-1+deb13u2 for Debian 13.
- What products are affected by CVE-2026-39919?
- Artifex Software Ghostscript.
- How severe is CVE-2026-39919?
- CVE-2026-39919 has a CVSS v4 score of 9.3 (Critical) and an EPSS score of 0.85% (59th percentile) as of Dec 1, 2026.
Recent activity
88 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.