CVE-2026-39919

NameCVE-2026-39919
DescriptionGhostscript 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.
SourceCVE (at NVD; CERT, ENISA, LWN, oss-sec, fulldisc, Debian ELTS, Red Hat, Ubuntu, Gentoo, SUSE bugzilla/CVE, GitHub advisories/code/issues, web search, more)
ReferencesDSA-6516-1

Vulnerable and fixed packages

The table below lists information on source packages.

Source PackageReleaseVersionStatus
ghostscript (PTS)bookworm, bookworm (security)10.0.0~dfsg-11+deb12u8vulnerable
trixie10.05.1~dfsg-1+deb13u1vulnerable
trixie (security)10.05.1~dfsg-1+deb13u2fixed
forky, sid10.08.0~dfsg-2fixed

The information below is based on the following data on fixed versions.

PackageTypeReleaseFixed VersionUrgencyOriginDebian Bugs
ghostscriptsourcetrixie10.05.1~dfsg-1+deb13u2DSA-6516-1
ghostscriptsource(unstable)10.08.0~dfsg-1

Notes

https://bugs.ghostscript.com/show_bug.cgi?id=709666
Fixed by: https://cgit.ghostscript.com/cgi-bin/cgit.cgi/ghostpdl.git/commit/?id=8ddaa67d13daeca55aa13e9e3262172fa93b72f7 (ghostpdl-10.08.0)

Search for package or bug name: Reporting problems