CVE-2026-39919
Critical · 9.8CVSS
9.8
EPSS
0.8%
Published
Sep 15, 2026
CISA due date
—
Cloudanix analysis
A flaw in a widely used PDF processing tool lets attackers who send specially made documents take over the affected computer.
- Exploitation
- Remote Unauthenticated
- Attacker needs
- None
- Complexity
- Low
- Impact
- Remote Code Execution
- Component
- Library
- Class
- Buffer Overflow
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
Heap-based buffer overflow in the JPEG 2000 output adapter that miscalculates row buffer size for packed output when component subsampling factors differ, allowing out-of-bounds writes that corrupt chunk-allocator metadata and enable arbitrary code execution.
Why it matters to the business
Attackers can remotely execute code on systems processing untrusted PDFs, leading to full system compromise, data theft, or deployment of malware; high prevalence of Ghostscript in document processing pipelines increases exposure across many organizations.
How an attack unfolds
An attacker crafts a PDF embedding a JPEG 2000 image whose color components declare mismatched subsampling values, then supplies the file to any Ghostscript invocation that renders or converts the document; the vulnerable output path in sjpx_openjpeg.c allocates an undersized buffer yet writes full bytes per column, overflowing into allocator metadata to hijack control flow.
How to fix it
Upgrade Ghostscript to the fixed versions provided by Red Hat: 10.02.1-16.el10_2.1 on EL10, 9.27-18.el8_10 on EL8, or 9.54.0-19.el9_8.1 on EL9 via the referenced RHSA-2026:74464 advisories; rebuild or redeploy any containers or packages that embed vulnerable Ghostscript binaries.
How to confirm the fix worked
Verify installed package versions match the fixed releases listed above, re-run any PDF conversion or rendering workflows with test files containing varied subsampling JPEG 2000 images, and confirm no crashes or unexpected memory behavior occur.
Typical attack path
- Craft malicious PDF containing JPEG 2000 image with mismatched subsampling factors
- Deliver PDF via email, web download, or file share to target environment
- Trigger Ghostscript processing through document viewers, converters, or print pipelines
- Overflow occurs during component output, corrupting heap metadata
- Achieve code execution and establish persistence or exfiltrate data
How to detect it
Review application and system logs for Ghostscript crashes or segmentation faults during PDF handling; inspect file-processing pipelines for unexpected process terminations or memory errors when ingesting JPEG 2000 content; no public exploit artifacts are known at this time.
What your security team should do
- Apply the Red Hat updates immediately given the 9.8 CVSS and remote code execution potential
- Inventory all systems and containers using Ghostscript and prioritize those exposed to untrusted PDFs
- Disable or sandbox Ghostscript processing of untrusted documents until patches are deployed
- Monitor vulnerability feeds for any future exploit maturity increase
The record
Ghostscript before 10.08.0 contains a heap-based buffer overflow vulnerability in the JPEG 2000 output adapter (base/sjpx_openjpeg.c) that allows attackers to cause memory corruption by supplying a crafted PDF containing a JPEG 2000 image with mismatched component subsampling factors. When image components declare different subsampling values, the non-samescale sub-byte-depth output path allocates a row buffer sized for packed output but writes a full byte per output column regardless of bit depth, overflowing the allocation and corrupting internal chunk-allocator metadata to achieve code execution.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|
Related vulnerabilities
- CVE-2026-120775 Tanium addressed a heap-based buffer overflow vulnerability in Deploy. CWE-122
- CVE-2026-121517 A vulnerability was detected in IrfanView 4.76.0.0 on Win64. CWE-122
- CVE-2026-121247 Buffer overflow in Dawn in Google Chrome on on Android prior to 157.0.8103.38 allowed a… CWE-122
- CVE-2026-121180 Buffer overflow in Media in Google Chrome prior to 157.0.8103.38 allowed a remote… CWE-122
- CVE-2026-121156 Buffer overflow in Dawn in Google Chrome prior to 157.0.8103.38 allowed a remote attacker… CWE-122
- CVE-2026-121113 Buffer overflow in PDFium in Google Chrome prior to 157.0.8103.38 allowed a remote… CWE-122
- CVE-2026-121086 Buffer overflow in Skia in Google Chrome prior to 157.0.8103.38 allowed a remote attacker… CWE-122
- CVE-2026-121047 Buffer overflow in Media in Google Chrome prior to 157.0.8103.38 allowed a remote… CWE-122