CVE-2026-39919

Ghostscript < 10.08.0 Heap Buffer Overflow via JPEG 2000 Output Adapter

Published Sep 15, 2026 CVSS 4.0 · 9.3 Critical EPSS < 1% KEV · Not listed
Description
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.

Analysis

AI-generated

Technical impact

Ghostscript versions earlier than 10.08.0 contain a heap‑based0 output adapter. The flaw occurs when JPEG 2000 images declare different subsampling values for their components. The non‑same‑scale sub‑byte‑depth output path allocates a full byte per output column regardless of the image’s bit depth internal chunk‑allocator metadata and allows the attacker to execute arbitrary code with the privileges of the Ghostscript process.

Affected Systems

Artifex Software Ghostscript running any version before 10.08.0. This includes all installations that process PDFs containing JPEG 2000 images. Use cases such as print services, document converters, or web servers are inferred from the description and are not explicitly stated.

Risk and Exploitability

The vulnerability has a CVSS score of 9.3, indicating critical severity. The EPSS score is 0.00486 (less than 1%), and it is not yet listed in CISA’s KEV catalogue. The attack requires an attacker to supply a malicious PDF that Ghostscript will process, typically through local actions or by exploiting a service that runs Ghostscript. Because the flaw is memory corruption in a commonly used who can influence the input that Ghostscript processes.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade Ghostscript to version 10.08.0 or later.
  • If an update is not immediately possible, restrict Ghostscript usage to trusted input only, run it in a sandboxed environment, and avoid processing, disable JPEG 2000 image processing if the application allows disabling the output adapter; alternatively, filter out JPEG 2000 images with mismatched subsampling before they reach Ghostscript.
  • If the application permits, disable the JPEG 2000 output adapter to eliminate the vulnerability path entirely.

Generated by OpenCVE AI on September 17, 2026 at 16:14 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Debian DLA Debian DLA DLA-4914-1 ghostscript security update
Debian DSA Debian DSA DSA-6516-1 ghostscript security update
History
Type Values Removed Values Added
First Time appeared Artifex
Artifex ghostscript
CPEs cpe:2.3:a:artifex:ghostscript:*:*:*:*:*:*:*:*
Vendors & Products Artifex
Artifex ghostscript
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'none', 'Technical Impact': 'total'}, 'version': '2.0.3'}

Type Values Removed Values Added
Description 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.
Title Ghostscript < 10.08.0 Heap Buffer Overflow via JPEG 2000 Output Adapter
Weaknesses CWE-122
References
Metrics cvssV3_1

{'score': 9.8, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H'}

cvssV4_0

{'score': 9.3, 'vector': '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'}

Weaknesses
  • CWE-122

    Heap-based Buffer Overflow

Sources

Status
PUBLISHED
Assigner
VulnCheck
Published
Updated
Oct 1, 2026, 3:19 PM
Reserved
Apr 7, 2026, 8:57 PM
Status
Awaiting Analysis
Published
Sep 15, 2026, 3:17 PM
Modified
Sep 24, 2026, 9:04 PM
Severity
Moderate
Public date
Sep 15, 2026, 2:26 PM