ghostscript — security advisory
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.
- Products
- ghostscript
- Affected versions
- Not specified
- Fixed versions
- 10.08.0-r0
- CVEs
- CVE-2026-39919
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 31 Oct 2026, 08:45 UTC · Revision 1
Source evidence
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.
osv:ALPINE-CVE-2026-39919
ghostscript
Fixed versions: 10.08.0-r0
Complete source record
{
"id": "818fec817e2d278c82dcbaea747701d45ee941b0614d92a6ba82dbd0b073a841",
"url": "https://osv.dev/vulnerability/ALPINE-CVE-2026-39919",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "ALPINE-CVE-2026-39919",
"summary": "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.",
"evidence": "osv:ALPINE-CVE-2026-39919",
"products": [
{
"name": {
"value": "ghostscript",
"evidence": "/affected/0/package/name"
},
"prerequisites": [],
"fixed_versions": [
{
"value": "10.08.0-r0",
"evidence": "/affected/0/ranges"
}
],
"affected_versions": []
}
],
"severity": "critical",
"structured": {
"id": "ALPINE-CVE-2026-39919",
"aliases": [
"ALPINE-CVE-2026-39919"
],
"metrics": [
{
"type": "CVSS_V4",
"score": "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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X"
}
],
"affected": [
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
},
{
"fixed": "10.08.0-r0"
}
]
}
],
"package": {
"name": "ghostscript",
"purl": "pkg:apk/alpine/ghostscript?arch=source",
"ecosystem": "Alpine:v3.23"
},
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/alpine/ALPINE-CVE-2026-39919.json"
},
"ecosystem_specific": {}
}
],
"modified": "2026-10-20T00:30:02.695200339Z",
"provider": "osv",
"upstream": [
"CVE-2026-39919"
],
"references": [
"https://security.alpinelinux.org/vuln/CVE-2026-39919"
]
},
"related_cves": [
{
"value": "CVE-2026-39919",
"evidence": "/upstream"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 376859,
"published_at": "2026-09-15T15:17:14.723+00:00"
}