# CVE-2026-39919: Ghostscript < 10.08.0 Heap Buffer Overflow via JPEG 2000 Output Adapter

> Attackers can achieve code execution by supplying a crafted PDF with mismatched JPEG 2000 subsampling factors to vulnerable Ghostscript versions.

- **Severity:** Critical 9.3 (`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`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 15 Sep 2026
- **Updated:** 1 Oct 2026
- **Also known as:** ALPINE-CVE-2026-39919, ALSA-2026:74457, ALSA-2026:74464, ALSA-2026:76877, BELL-CVE-2026-39919, CLSA-2026-1791226276, CLSA-2026-1792073622, CLSA-2026-1792074631, CLSA-2026-1792075420, CLSA-2026-1792576567, CLSA-2026-1792576797, CLSA-2026-1792577303, DEBIAN-CVE-2026-39919, ECHO-99aa-3b52-a804, GHSA-v865-hp77-22rm, MGASA-2026-0545, RHSA-2026:74457, RHSA-2026:74464, RHSA-2026:76877, RLSA-2026:74457, RLSA-2026:74464, RLSA-2026:76877, SUSE-SU-2026:24214-1, SUSE-SU-2026:4598-1, SUSE-SU-2026:4632-1, UBUNTU-CVE-2026-39919, USN-8791-1, openSUSE-SU-2026:11959-1, openSUSE-SU-2026:22063-1

## What is CVE-2026-39919?

CVE-2026-39919 is a critical memory corruption vulnerability in Artifex Software Ghostscript, published on 15 Sep 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official 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.

Weakness: CWE-122 (Heap-based Buffer Overflow)

## Which versions are affected by CVE-2026-39919?


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `ghostscript` | AlmaLinux:10 | All versions | 10.02.1-16.el10_2.1 |
| `ghostscript-doc` | AlmaLinux:10 | All versions | 10.02.1-16.el10_2.1 |
| `ghostscript-tools-dvipdf` | AlmaLinux:10 | All versions | 10.02.1-16.el10_2.1 |
| `ghostscript-tools-fonts` | AlmaLinux:10 | All versions | 10.02.1-16.el10_2.1 |
| `ghostscript-tools-printing` | AlmaLinux:10 | All versions | 10.02.1-16.el10_2.1 |
| `libgs` | AlmaLinux:10 | All versions | 10.02.1-16.el10_2.1 |
| `libgs-devel` | AlmaLinux:10 | All versions | 10.02.1-16.el10_2.1 |
| `ghostscript` | AlmaLinux:8 | All versions | 9.27-18.el8_10 |
| `ghostscript-doc` | AlmaLinux:8 | All versions | 9.27-18.el8_10 |
| `ghostscript-tools-dvipdf` | AlmaLinux:8 | All versions | 9.27-18.el8_10 |
| `ghostscript-tools-fonts` | AlmaLinux:8 | All versions | 9.27-18.el8_10 |
| `ghostscript-tools-printing` | AlmaLinux:8 | All versions | 9.27-18.el8_10 |
| `ghostscript-x11` | AlmaLinux:8 | All versions | 9.27-18.el8_10 |
| `libgs` | AlmaLinux:8 | All versions | 9.27-18.el8_10 |
| `libgs-devel` | AlmaLinux:8 | All versions | 9.27-18.el8_10 |
| `ghostscript` | AlmaLinux:9 | All versions | 9.54.0-19.el9_8.1 |
| `ghostscript-doc` | AlmaLinux:9 | All versions | 9.54.0-19.el9_8.1 |
| `ghostscript-tools-dvipdf` | AlmaLinux:9 | All versions | 9.54.0-19.el9_8.1 |
| `ghostscript-tools-fonts` | AlmaLinux:9 | All versions | 9.54.0-19.el9_8.1 |
| `ghostscript-tools-printing` | AlmaLinux:9 | All versions | 9.54.0-19.el9_8.1 |
| `ghostscript-x11` | AlmaLinux:9 | All versions | 9.54.0-19.el9_8.1 |
| `libgs` | AlmaLinux:9 | All versions | 9.54.0-19.el9_8.1 |
| `libgs-devel` | AlmaLinux:9 | All versions | 9.54.0-19.el9_8.1 |
| `libgs` | Red Hat:enterprise_linux:10.2 | All versions | 0:10.02.1-16.el10_2.1 |
| `ghostscript` | Red Hat:enterprise_linux:8::appstream | All versions | 0:9.27-18.el8_10 |
| `libgs` | Red Hat:enterprise_linux:8::appstream | All versions | 0:9.27-18.el8_10 |
| `libgs` | Red Hat:enterprise_linux:9::appstream | All versions | 0:9.54.0-19.el9_8.1 |
| `ghostscript` | Rocky Linux:10 | All versions | 0:10.02.1-16.el10_2.1 |
| `ghostscript` | Rocky Linux:8 | All versions | 0:9.27-18.el8_10 |
| `ghostscript` | Rocky Linux:9 | All versions | 0:9.54.0-19.el9_8.1 |
| `ghostscript` | SUSE:Linux Enterprise High Performance Computing 15 SP4-ESPOS | All versions | 9.52-150000.214.1 |
| `ghostscript` | SUSE:Linux Enterprise High Performance Computing 15 SP4-LTSS | All versions | 9.52-150000.214.1 |
| `ghostscript` | SUSE:Linux Enterprise High Performance Computing 15 SP5-ESPOS | All versions | 9.52-150000.214.1 |
| `ghostscript` | SUSE:Linux Enterprise High Performance Computing 15 SP5-LTSS | All versions | 9.52-150000.214.1 |
| `ghostscript` | SUSE:Linux Enterprise Module for Basesystem 15 SP7 | All versions | 9.52-150000.214.1 |
| `ghostscript` | SUSE:Linux Enterprise Server 12 SP5-LTSS | All versions | 9.52-23.100.1 |
| `ghostscript` | SUSE:Linux Enterprise Server 15 SP4-LTSS | All versions | 9.52-150000.214.1 |
| `ghostscript` | SUSE:Linux Enterprise Server 15 SP5-LTSS | All versions | 9.52-150000.214.1 |
| `ghostscript` | SUSE:Linux Enterprise Server 15 SP6-LTSS | All versions | 9.52-150000.214.1 |
| `ghostscript` | SUSE:Linux Enterprise Server 16.0 | All versions | 10.08.0-160000.1.1 |

## How do I fix CVE-2026-39919?

Upgrade to a fixed version.

## Is CVE-2026-39919 being exploited?

There is no known exploitation of CVE-2026-39919 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-39919 and fix it if it is affected.

What it is: CVE-2026-39919 is a critical memory corruption vulnerability in Artifex Software Ghostscript, published on 15 Sep 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2026-39919 in the wild and no public exploit code.

Affected product: Artifex Software Ghostscript. No package-level version data is available, so check the vendor advisory linked from the reference page.

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-39919/ (Markdown: https://insights.sbomify.com/CVE-2026-39919/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-39919
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-39919
- OSV: https://osv.dev/vulnerability/CVE-2026-39919

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-39919/
Summaries are generated and may contain mistakes; the official description above is the record.
