Skip to main content

Ghostscript EUVDEUVD-2026-78584

| CVE-2026-39919 CRITICAL
Heap-based Buffer Overflow (CWE-122)
2026-09-15 VulnCheck GHSA-v865-hp77-22rm
Critical
Disputed · 9.3 Vendor: VulnCheck
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Craft PDF with malformed JPEG 2000 image
  2. Delivery
    Deliver to Ghostscript-backed processing service
  3. Exploit
    Trigger non-samescale sub-byte output path
  4. Execution
    Overflow packed row buffer
  5. Persist
    Corrupt chunk-allocator metadata
  6. Impact
    Execute arbitrary code as process user

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Heap buffer bounds checking
MITRE ATT&CK

1 technique across 1 tactic: Execution

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Exploitation requires that Ghostscript (any version before 10.08.0) process an attacker-supplied PDF containing a JPEG 2000 image whose components declare DIFFERENT (mismatched) subsampling factors AND use a sub-byte output bit depth, which drives execution into the non-samescale sub-byte-depth output path in base/sjpx_openjpeg.c. No authentication is needed (PR:N). The practical limiting factor is delivery: the target must actually render the malicious PDF - this is effectively automatic in server-side pipelines (CUPS/print spoolers, ImageMagick/GhostPDL conversion services, web PDF renderers) but requires a victim action in interactive desktop use. No non-default configuration is otherwise required; the vulnerable JPEG 2000 output adapter is part of the standard code path.

Impact

This is a genuinely high-priority issue that appears well-calibrated to its CVSS 4.0 9.3 score. The vector (AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H) describes a network-reachable, low-complexity, unauthenticated heap-based buffer overflow (CWE-122) that the description credibly ties to code execution via corruption of the chunk-allocator metadata - a classic and exploitable heap-metadata attack primitive. The full C/I/A (VC/VI/VA:H) impact is justified because arbitrary code execution in the Ghostscript process yields read, write, and denial-of-service capability at once. No EPSS score, KEV entry, or public POC is present in the provided data, so at time of analysis this is a serious-but-not-yet-actively-exploited flaw rather than a KEV-confirmed emergency. The strongest counter-signal to the pure network reading is that exploitation requires the target to actually process an attacker-supplied PDF; where Ghostscript runs behind automated server-side conversion/print pipelines (CUPS, ImageMagick/GhostPDF backends, web PDF renderers) the UI:N assumption holds and risk is high, whereas in interactive desktop use a victim must open the file. VulnCheck (a credible research vendor) reported it and a vendor patch exists, which raises the realistic likelihood of a POC or exploit emerging soon. Given Ghostscript's near-ubiquitous footprint in document-processing stacks, defenders should treat this as patch-now priority.

Exploit ScenarioDerived

An attacker crafts a malicious PDF embedding a JPEG 2000 image whose color components declare mismatched (non-samescale) subsampling factors at a sub-byte bit depth, then delivers it to any service or user that renders PDFs through Ghostscript (e.g., an automated document-conversion or print backend). When Ghostscript's JPEG 2000 output adapter processes the image, its under-sized packed-output row buffer is overflowed one full byte per column, corrupting chunk-allocator metadata and steering execution toward attacker code. No public exploit code is identified in the provided data, but the flaw was reported by VulnCheck and is a highly exploitable heap-metadata corruption.

Act Now Prioritize within 24-48h. Why: CRITICAL severity.
Patch available 0.5% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Sep 16, 2026

Heap-based buffer overflow in Ghostscript's JPEG 2000 (JPX) stream decoder (base/sjpx_openjpeg.c) allows unauthenticated remote attackers to corrupt memory, and potentially achieve code execution, by supplying a crafted PDF containing a JPEG 2000 image whose components declare mismatched subsampling factors. All Ghostscript/GhostPDL releases before 10.08.0 are affected; exploitation requires only that the target render the malicious file, which is effectively automatic in server-side pipelines such as CUPS/print spoolers, ImageMagick/GhostPDL conversion services and web PDF renderers, while desktop use requires a victim to open the document. Vendor-released patch: Ghostscript 10.08.0; no public exploit code identified at time of analysis and no confirmed active exploitation (not listed in CISA KEV), though the CVSS 4.0 base score of 9.3 reflects the trivial attack complexity and the high confidentiality, integrity and availability impact of a heap allocator corruption primitive.

RemediationAI

Upgrade to Ghostscript/GhostPDL 10.08.0 or later, available from the vendor release page (https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/tag/gs10080); the fixing change is commit 0a8bf88e39db07b0751a58d6ec1cf992073e4dc1, which adds bit-depth validation and a width bounds check in base/sjpx_openjpeg.c. Until every instance is upgraded, treat any Ghostscript deployment that renders untrusted documents as exposed: run conversions and print pipelines inside an OS-level sandbox (seccomp/AppArmor profiles, containers with restricted syscalls and hard memory limits) so that heap-metadata corruption cannot be turned into reliable control-flow hijack - the trade-off is occasional breakage of legitimate functionality and reduced throughput for heavy conversion workloads. Where JPEG 2000 support is not operationally required, strip or reject JPX/JP2 streams before documents reach Ghostscript (for example, by pre-filtering PDFs in an upload/scanning tier), accepting that this alters or refuses some legitimate documents; do not rely on -dSAFER alone, as it restricts file access rather than this memory-safety bug. Finally, monitor Ghostscript and its wrappers for crashes or anomalous memory growth during document processing, which is consistent with attempted exploitation of this overflow. The upstream bug (https://bugs.ghostscript.com/show_bug.cgi?id=709666), the VulnCheck advisory (https://www.vulncheck.com/advisories/ghostscript-heap-buffer-overflow-via-jpeg-2000-output-adapter) and NVD (https://nvd.nist.gov/vuln/detail/CVE-2026-39919) should be tracked for any updates.

Affected VersionsENISA

ghostscript 0 <10.08.0

Affected Packages

euvd ghostscript fix: 10.08.0

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

The flaw is a classic CWE-122 heap-based buffer overflow inside the OpenJPEG-backed JPX decode stream that Ghostscript uses to interpret JPEG 2000 imagery embedded in PDFs and PostScript files. In base/sjpx_openjpeg.c, the 'non-samescale' output path is taken when the decoded image components declare different subsampling factors (i.e. their relative sampling grids do not match). When that path is combined with a sub-byte output bit depth, process_one_trunk() allocates the destination row buffer sized for packed output while the inner loop writes a full byte per output column, and the column index advances once per byte written without an upper bound check, so writes run past the end of the allocation and into adjacent heap structures. Corrupting the chunk-allocator metadata that Ghostscript maintains lets an attacker influence subsequent allocations and reach code execution. The upstream fix in commit 0a8bf88e39db07b0751a58d6ec1cf992073e4dc1 both rejects unsupported per-component bit depths (only 1, 2, 4, 8 and 16 are now accepted, returning ERRC otherwise) and adds an 'i < state->width' bounds guard inside the byte loop, which removes the write-past-end condition. CPE cpe:2.3:a:artifex_software:ghostscript:*, and the EUVD range 'ghostscript 0 <10.08.0', confirm the entire pre-10.08.0 code line is affected; the vulnerable adapter is part of the standard decoding path, so no non-default configuration is required.

Know when Ghostscript gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Sources disagree (Medium–Critical)
Vendor (VulnCheck) PRIMARY 9.3 CRITICAL
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
vuln.today AI 9.8 CRITICAL

Network-delivered crafted PDF, no auth, and Ghostscript's common automated server-side processing justify UI:N; heap-metadata corruption yields full code execution, so C/I/A:H.

3.1 AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
4.0 AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
SUSE 7.8 HIGH
AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Red Hat 7.8 MEDIUM

vuln.today treats the vendor’s rating as authoritative. A higher third-party CVSS (e.g. CISA-ADP) is shown for transparency but does not drive the headline severity.

CVSS VectorVendor: VulnCheck

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
None
Vulnerable system: Confidentiality
High
Vulnerable system: Integrity
High
Vulnerable system: Availability
High
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

DescriptionCVE.org

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.

Executive ViewAI

Why It Matters

Ghostscript, a widely used PDF and PostScript interpreter, contains a critical heap-based buffer overflow (CVE-2026-39919) that can be triggered by rendering a malicious PDF, potentially leading to code execution. The vulnerability affects all versions before 10.08.0 and poses a severe risk to organizations with automated document processing pipelines, such as print spoolers, web PDF renderers, and conversion services, where exploitation could be automatic. Leadership should prioritize immediate patching because a single crafted document could compromise server availability, data confidentiality, and integrity; no public exploit identified at time of analysis, and a vendor patch is available.

Business Impact: Severe
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
0.5%
Top 59% exploitable
Prevalence
Ubiquitous
Ghostscript underpins PDF/PostScript rendering across Linux, print spoolers, and conversion pipelines
Data Quality
7 sources
Confidence: High

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity CRITICAL
CISA KEV No
Public POC No
EPSS 0.5%
Patch available Yes
Active threat No
Deciding rule
CRITICAL severity
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
Yes
Human Impact
Very High

Priority Score

46
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +46
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

A buffer overflow occurs when a program writes more data to a memory buffer than it was allocated to hold, causing the excess data to spill into adjacent memory regions.

A heap overflow occurs when a program writes data beyond the bounds of a buffer allocated in the heap memory region.

Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.

CVE-2017-8291 HIGH POC
7.8 Apr 27

Artifex Ghostscript through 2017-04-26 allows -dSAFER bypass and remote command execution via .rsdparams type confusion

CVE-2016-7976 HIGH POC
8.8 Aug 07

The PS Interpreter in Ghostscript 9.18 and 9.20 allows remote attackers to execute arbitrary code via crafted userparams

CVE-2018-16509 HIGH POC
7.8 Sep 05

An issue was discovered in Artifex Ghostscript before 9.24. Rated high severity (CVSS 7.8), this vulnerability is no aut

CVE-2012-4405 MEDIUM
6.8 Sep 18

Multiple integer underflows in the icmLut_allocate function in International Color Consortium (ICC) Format library (iccl

CVE-2023-28879 CRITICAL POC
9.8 Mar 31

In Artifex Ghostscript through 10.01.0, there is a buffer overflow leading to potential corruption of data internal to t

CVE-2018-18284 HIGH POC
8.6 Oct 19

Artifex Ghostscript 9.25 and earlier allows attackers to bypass a sandbox protection mechanism via vectors involving the

CVE-2018-17961 HIGH POC
8.6 Oct 15

Artifex Ghostscript 9.25 and earlier allows attackers to bypass a sandbox protection mechanism via vectors involving err

CVE-2016-10317 HIGH POC
7.8 Apr 03

The fill_threshhold_buffer function in base/gxht_thresh.c in Artifex Software, Inc. Rated high severity (CVSS 7.8), this

CVE-2017-9611 HIGH POC
7.8 Jul 26

The Ins_MIRP function in base/ttinterp.c in Artifex Ghostscript GhostXPS 9.21 allows remote attackers to cause a denial

CVE-2017-9835 HIGH POC
7.8 Jul 26

The gs_alloc_ref_array function in psi/ialloc.c in Artifex Ghostscript 9.21 allows remote attackers to cause a denial of

CVE-2017-7948 HIGH POC
7.8 Apr 19

Integer overflow in the mark_curve function in Artifex Ghostscript 9.21 allows remote attackers to cause a denial of ser

CVE-2026-101258 HIGH POC
7.8 Oct 06

Ghostscript can execute arbitrary shell commands with the privileges of its process when it renders a crafted PostScript

Vendor StatusVendor

SUSE

Severity: Important
Product Status
SUSE Linux Enterprise Desktop 15 SP7 Affected
SUSE Linux Enterprise High Performance Computing 12 Affected
SUSE Linux Enterprise Module for Basesystem 15 SP7 Affected
SUSE Linux Enterprise Server 15 SP7 Affected
SUSE Linux Enterprise Server 16.0 Affected

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy