CVE-2016-10317
High · 7.8CVSS
7.8
EPSS
2.3%
Published
Apr 3, 2017
CISA due date
—
Cloudanix analysis
A flaw in an old document-processing tool can let a specially made file crash the program or take over the computer when opened.
- Exploitation
- Requires User Interaction
- Attacker needs
- User Interaction
- Complexity
- Low
- Impact
- Full Compromise
- Component
- Application
- Class
- Memory Corruption
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
Heap-based buffer overflow in the fill_threshhold_buffer function triggered by specially crafted PostScript input leading to memory corruption.
Why it matters to the business
Processing untrusted documents can crash the application or allow arbitrary code execution, disrupting document workflows and risking full system compromise on affected hosts.
How an attack unfolds
An attacker supplies a malicious PostScript file that reaches the vulnerable threshold buffer logic during rendering; the overflow corrupts heap memory and can be leveraged for code execution or denial of service.
How to fix it
Upgrade to a Ghostscript release after 9.20 that contains the corrected gxht_thresh.c logic; remove or sandbox older interpreters where feasible.
How to confirm the fix worked
Confirm Ghostscript version is newer than 9.20, run regression tests with known trigger documents, and verify the application no longer crashes on the crafted input.
Typical attack path
- Attacker creates a crafted PostScript document containing malformed threshold data.
- Victim or automated process opens the document with an affected Ghostscript version.
- fill_threshhold_buffer processes the input and overflows the heap buffer.
- Memory corruption is used to achieve code execution or crash the interpreter.
How to detect it
Review process execution logs and application crashes for Ghostscript invocations on unexpected PostScript files; correlate with file creation or download events preceding the crash.
What your security team should do
- Immediately replace any Ghostscript 9.20 or earlier installations with a supported version.
- Disable or restrict PostScript processing for untrusted input sources.
- Add file-type filtering or sandboxing around document conversion pipelines.
The record
The fill_threshhold_buffer function in base/gxht_thresh.c in Artifex Software, Inc. Ghostscript 9.20 allows remote attackers to cause a denial of service (heap-based buffer overflow and application crash) or possibly have unspecified other impact via a crafted PostScript document.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| Debian:11 | ghostscript | 0 | 9.22~dfsg-2.1 |
| Debian:12 | ghostscript | 0 | 9.22~dfsg-2.1 |
| Debian:13 | ghostscript | 0 | 9.22~dfsg-2.1 |
| Mageia:5 | ghostscript | 0 | 9.22-1.2.mga5 |
| Mageia:6 | ghostscript | 0 | 9.22-1.2.mga6 |
| SUSE:Linux Enterprise Desktop 12 SP2 | ghostscript | 0 | 9.15-23.7.1 |
| SUSE:Linux Enterprise Desktop 12 SP3 | ghostscript | 0 | 9.15-23.7.1 |
| SUSE:Linux Enterprise Server 12 SP2 | ghostscript | 0 | 9.15-23.7.1 |
| SUSE:Linux Enterprise Server 12 SP3 | ghostscript | 0 | 9.15-23.7.1 |
| SUSE:Linux Enterprise Server for Raspberry Pi 12 SP2 | ghostscript | 0 | 9.15-23.7.1 |
| SUSE:Linux Enterprise Server for SAP Applications 12 SP2 | ghostscript | 0 | 9.15-23.7.1 |
| SUSE:Linux Enterprise Server for SAP Applications 12 SP3 | ghostscript | 0 | 9.15-23.7.1 |
| SUSE:Linux Enterprise Software Development Kit 12 SP2 | ghostscript | 0 | 9.15-23.7.1 |
| SUSE:Linux Enterprise Software Development Kit 12 SP3 | ghostscript | 0 | 9.15-23.7.1 |
| Ubuntu:14.04:LTS | ghostscript | 0 | 9.10~dfsg-0ubuntu10.12 |
| Ubuntu:16.04:LTS | ghostscript | 0 | 9.18~dfsg~0-0ubuntu2.8 |
| Ubuntu:18.04:LTS | ghostscript | 0 | 9.22~dfsg+1-0ubuntu1.1 |
| openSUSE:Tumbleweed | ghostscript | 0 | 9.54.0-2.2 |
Related vulnerabilities
- CVE-2024-46956 An issue was discovered in psi/zfile.c in Artifex Ghostscript before 10.04.0. Also affects ghostscript
- CVE-2024-46955 An issue was discovered in psi/zcolor.c in Artifex Ghostscript before 10.04.0. Also affects ghostscript
- CVE-2024-46953 An issue was discovered in base/gsdevice.c in Artifex Ghostscript before 10.04.0. Also affects ghostscript
- CVE-2024-46952 An issue was discovered in pdf/pdf_xref.c in Artifex Ghostscript before 10.04.0. Also affects ghostscript
- CVE-2024-46951 An issue was discovered in psi/zcolor.c in Artifex Ghostscript before 10.04.0. Also affects ghostscript
- CVE-2024-29508 Artifex Ghostscript before 10.03.0 has a heap-based pointer disclosure (observable in a… Also affects ghostscript
- CVE-2023-52722 An issue was discovered in Artifex Ghostscript before 10.03.1. Also affects ghostscript
- CVE-2023-38559 A buffer overflow flaw was found in base/gdevdevn.c:1973 in devn_pcx_write_rle() in… Also affects ghostscript