Description
Artifex Ghostscript through 2017-04-26 allows -dSAFER bypass and remote command execution via .rsdparams type confusion with a "/OutputFile (%pipe%" substring in a crafted .eps document that is an input to the gs program, as exploited in the wild in April 2017.
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 14 | ghostscript | 9.20~dfsg-3.1 | — |
| Debian 13 | ghostscript | 9.20~dfsg-3.1 | — |
| Debian 12 | ghostscript | 9.20~dfsg-3.1 | — |
| Debian 8 | ghostscript | 9.06~dfsg-2+deb8u5 | DSA-3838-1 |
| Debian 7 | ghostscript | 9.05~dfsg-6.3+deb7u6 | DLA-932-1 |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 16.04 LTS | ghostscript | 9.18~dfsg~0-0ubuntu2.4 | USN-3272-1 |
| Ubuntu 14.04 LTS | ghostscript | 9.10~dfsg-0ubuntu10.7 | USN-3272-1 |
Red Hat
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| RHEL 7 | ghostscript +4 | 9.07-20.el7_3.5 | RHSA-2017:1230 |
| RHEL 6 | ghostscript +3 | 8.70-23.el6_9.2 | RHSA-2017:1230 |
SUSE
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| SLES 12 SP2 | ghostscript | 9.15-20.1 | SUSE-SU-2017:1404-1, SUSE-SU-2017:1138-1 |
| SLES 12 SP1 | ghostscript | 9.15-20.1 | SUSE-SU-2017:1404-1, SUSE-SU-2017:1138-1 |
| SLES 12 | ghostscript | 9.15-22.1 | SUSE-SU-2017:1404-1 |
| SLES 11 SP4 | ghostscript-library | 8.62-32.44.1 | SUSE-SU-2017:1322-1, SUSE-SU-2017:1153-1 |
| SLES 11 SP3 | ghostscript-library | 8.62-32.46.1 | SUSE-SU-2017:1322-1 |
Show 6 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| SLES for SAP 12 SP2 | ghostscript | 9.15-20.1 | SUSE-SU-2017:1404-1, SUSE-SU-2017:1138-1 |
| SLES for SAP 12 SP1 | ghostscript | 9.15-20.1 | SUSE-SU-2017:1404-1, SUSE-SU-2017:1138-1 |
| SLES for SAP 12 | ghostscript | 9.15-22.1 | SUSE-SU-2017:1404-1 |
| SLES for SAP 11 SP4 | ghostscript-library | 8.62-32.44.1 | SUSE-SU-2017:1322-1, SUSE-SU-2017:1153-1 |
| SUSE OpenStack Cloud 5 | ghostscript-library | 8.62-32.46.1 | SUSE-SU-2017:1322-1 |
| SUSE Linux Enterprise Point of Sale 11 SP3 | ghostscript-library | 8.62-32.46.1 | SUSE-SU-2017:1322-1 |
openSUSE
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| openSUSE Tumbleweed | ghostscript | 9.54.0-2.2 | openSUSE-SU-2024:10783-1 |
Alpine
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Alpine v3.24 | ghostscript | 9.21-r2 | — |
| Alpine v3.23 | ghostscript | 9.21-r2 | — |
| Alpine v3.22 | ghostscript | 9.21-r2 | — |
| Alpine v3.21 | ghostscript | 9.21-r2 | — |
| Alpine v3.20 | ghostscript | 9.21-r2 | — |
Show 18 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Alpine v3.19 | ghostscript | 9.21-r2 | — |
| Alpine v3.18 | ghostscript | 9.21-r2 | — |
| Alpine v3.17 | ghostscript | 9.21-r2 | — |
| Alpine v3.16 | ghostscript | 9.21-r2 | — |
| Alpine v3.15 | ghostscript | 9.21-r2 | — |
| Alpine v3.14 | ghostscript | 9.21-r2 | — |
| Alpine v3.13 | ghostscript | 9.21-r2 | — |
| Alpine v3.12 | ghostscript | 9.21-r2 | — |
| Alpine v3.11 | ghostscript | 9.21-r2 | — |
| Alpine v3.10 | ghostscript | 9.21-r2 | — |
| Alpine v3.9 | ghostscript | 9.21-r2 | — |
| Alpine v3.8 | ghostscript | 9.21-r2 | — |
| Alpine v3.7 | ghostscript | 9.21-r2 | — |
| Alpine v3.6 | ghostscript | 9.21-r2 | — |
| Alpine v3.5 | ghostscript | 9.21-r0 | — |
| Alpine v3.4 | ghostscript | 9.21-r0 | — |
| Alpine v3.3 | ghostscript | 9.21-r0 | — |
| Alpine v3.2 | ghostscript | 9.21-r0 | — |
Oracle Linux
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Oracle Linux 7 | ghostscript +4 | 9.07-20.el7_3.5 | ELSA-2017-1230 |
Public exploits
Exploit or proof-of-concept code for this vulnerability is publicly available, which lowers the bar for attackers. Treat it as a reason to patch sooner.
Metasploit 1 module
-
Ghostscript Type Confusion Arbitrary Command Execution
exploit/unix/fileformat/ghostscript_type_confusion
Exploit-DB 1
- Ghostscript 9.21 - Type Confusion Arbitrary Command Execution (Metasploit) EDB-41955 · local · May 2, 2017 · verified
GitHub 2 repositories
-
DaniilOrchikov/PIL-CVE-2017-8291 ★ 0 · Dec 3, 2025
-
hkcfs/PIL-CVE-2017-8291 ★ 0 · Jun 13, 2025
CVE-2017-8291 CTF with docker and examples
Sources: PoC-in-GitHub, Metasploit Framework, Exploit-DB — updated daily. Only links are listed; no exploit code is hosted here.
Advisories 10
- RHSA-2017:1230 Red Hat Security Advisory: ghostscript security update Red Hat Security Advisories (RHSA) · Sep 16, 2026
- USN-3272-1 ghostscript vulnerabilities Ubuntu Security Notices (USN) · Apr 22, 2026
- DLA-932-1 ghostscript - security update Debian Security (DSA / DLA) · Mar 9, 2026
- DSA-3838-1 ghostscript - security update Debian Security (DSA / DLA) · Mar 9, 2026
- openSUSE-SU-2024:10783-1 ghostscript-9.54.0-2.2 on GA media SUSE / openSUSE Security Updates · Feb 4, 2026
- SUSE-SU-2017:1153-1 Security update for ghostscript-library SUSE / openSUSE Security Updates · Feb 4, 2026
- SUSE-SU-2017:1404-1 Security update for ghostscript SUSE / openSUSE Security Updates · Feb 4, 2026
- SUSE-SU-2017:1138-1 Security update for ghostscript SUSE / openSUSE Security Updates · Feb 4, 2026
- SUSE-SU-2017:1322-1 Security update for ghostscript-library SUSE / openSUSE Security Updates · May 2, 2025
- ELSA-2017-1230 Important: ghostscript security update (Oracle Linux 7) Oracle Linux Security Advisories (ELSA) · May 12, 2017
References
- DSA-3838 vendor-advisory
- https://bugzilla.suse.com/show_bug.cgi?id=1036453
- RHSA-2017:1230 vendor-advisory
- 98476 vdb-entry
- 41955 exploit
- http://openwall.com/lists/oss-security/2017/04/28/2
- GLSA-201708-06 vendor-advisory
- https://bugzilla.redhat.com/show_bug.cgi?id=1446063
- https://git.ghostscript.com/?p=ghostpdl.git%3Ba=commit%3Bh=04b37bbce174eed24edec7ad5b920eb93db4d47d
- https://bugs.ghostscript.com/show_bug.cgi?id=697808