← Vulnerability feed

Vulnerability record · CVE-2017-8291 · published 27 April 2017

CVE-2017-8291: Ghostscript -dSAFER bypass and command execution via type confusion

Artifex · Ghostscript

Ghostscript through 2017-04-26 contains a type confusion in .rsdparams handling that lets a crafted .eps document bypass the -dSAFER sandbox. A "/OutputFile (%pipe%" substring in the EPS triggers the flaw, allowing remote command execution when the file is processed by gs. It matters because Ghostscript is widely embedded in document conversion and print pipelines, so a malicious document can turn a file-processing step into code execution.

7.8 CVSS 3.1 High CISA KEV since 24 May 2022 EPSS 97% · top 0.1% CWE-843 · Type confusion
7.8CVSS 3.1 base score, v2 6.8
97%EPSS exploitation probability, 30 days
YesIn CISA KEV, fix deadline passed
8Affected product versions listed by NVD
21References, 4 tagged exploit
17 Jun 2026Last modified by NVD

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.

CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H

Automated analysis

Generated by VULONE's analysis model from the NVD record, CISA KEV and EPSS data on 16 September 2026. Confidence: high.

critical priorityThe flaw is in CISA KEV with confirmed in-the-wild exploitation, a public exploit, and an EPSS score near 0.97, and it yields command execution through a common document-processing path.

What it is

Ghostscript through 2017-04-26 contains a type confusion in .rsdparams handling that lets a crafted .eps document bypass the -dSAFER sandbox. A "/OutputFile (%pipe%" substring in the EPS triggers the flaw, allowing remote command execution when the file is processed by gs. It matters because Ghostscript is widely embedded in document conversion and print pipelines, so a malicious document can turn a file-processing step into code execution.

Impact

An attacker gains arbitrary command execution in the context of the user or service running Ghostscript, with high impact to confidentiality, integrity and availability. The -dSAFER protection that is meant to contain such documents is defeated.

Attack surface

Reached by supplying a crafted .eps document as input to the gs program; the CVSS vector is local with user interaction required, meaning a victim or automated pipeline must open or process the malicious file. No authentication is needed, but the attacker must get the file into a processing path.

Exploitation

Listed in CISA KEV (added 2022-05-24) and described as exploited in the wild in April 2017, with public exploit references (Exploit-DB 41955, SUSE bug tagged Exploit). EPSS is 0.96968 (99.887th percentile), indicating very high predicted exploitation activity.

What to do

  • Apply vendor updates for Ghostscript and the listed Linux distributions (Debian DSA-3838, Red Hat RHSA-2017:1230, Gentoo GLSA 201708-06) and confirm the fixed build is running.
  • Where patching is not immediate, disable or restrict Ghostscript processing of untrusted EPS/PS/PDF input, especially in automated conversion and print pipelines.
  • Run Ghostscript with the most restrictive sandbox settings available and avoid invoking it with elevated privileges or on shared services.
  • Block or quarantine documents containing suspicious "/OutputFile (%pipe%" patterns at mail and file-ingest gateways.
  • Inventory all embedded Ghostscript instances (print servers, document converters, image libraries) that may not be covered by OS package updates.

Detection

  • Monitor process creation where gs or a Ghostscript-embedding application spawns unexpected child processes such as shells or command interpreters.
  • Search file-ingest and mail logs for EPS/PS attachments containing "/OutputFile" and "%pipe%" substrings.
  • Alert on Ghostscript crashes or type-confusion related errors in application and system logs.
  • Audit hosts for Ghostscript versions older than the vendor-fixed builds and flag unpatched instances.

This assessment is produced automatically and is not human-reviewed. Verify against the vendor advisory before acting on it.

Exploitation in the wild

CISA added CVE-2017-8291 to the Known Exploited Vulnerabilities catalog on 24 May 2022 as "Artifex Ghostscript Type Confusion Vulnerability". Required action: Apply updates per vendor instructions. Federal deadline 14 June 2022.

Affected products

8 vulnerable configurations from NVD's CPE data, grouped by vendor and product.

References

LinkTags
http://openwall.com/lists/oss-security/2017/04/28/2 Mailing ListPatchThird Party Advisory
http://www.debian.org/security/2017/dsa-3838 Mailing ListThird Party Advisory
http://www.securityfocus.com/bid/98476 Broken LinkThird Party AdvisoryVDB Entry
https://access.redhat.com/errata/RHSA-2017:1230 Third Party Advisory
https://bugs.ghostscript.com/show_bug.cgi?id=697808 Issue TrackingThird Party AdvisoryVDB Entry
https://bugzilla.redhat.com/show_bug.cgi?id=1446063 Issue TrackingPatchThird Party AdvisoryVDB Entry
https://bugzilla.suse.com/show_bug.cgi?id=1036453 ExploitIssue TrackingThird Party AdvisoryVDB Entry
https://git.ghostscript.com/?p=ghostpdl.git%3Ba=commit%3Bh=04b37bbce174eed24edec7ad5b920eb93db4d47d Broken Link
https://security.gentoo.org/glsa/201708-06 Third Party Advisory
https://www.exploit-db.com/exploits/41955/ ExploitThird Party AdvisoryVDB Entry
http://openwall.com/lists/oss-security/2017/04/28/2 Mailing ListPatchThird Party Advisory
http://www.debian.org/security/2017/dsa-3838 Mailing ListThird Party Advisory
http://www.securityfocus.com/bid/98476 Broken LinkThird Party AdvisoryVDB Entry
https://access.redhat.com/errata/RHSA-2017:1230 Third Party Advisory
https://bugs.ghostscript.com/show_bug.cgi?id=697808 Issue TrackingThird Party AdvisoryVDB Entry
https://bugzilla.redhat.com/show_bug.cgi?id=1446063 Issue TrackingPatchThird Party AdvisoryVDB Entry
https://bugzilla.suse.com/show_bug.cgi?id=1036453 ExploitIssue TrackingThird Party AdvisoryVDB Entry
https://git.ghostscript.com/?p=ghostpdl.git%3Ba=commit%3Bh=04b37bbce174eed24edec7ad5b920eb93db4d47d Broken Link
https://security.gentoo.org/glsa/201708-06 Third Party Advisory
https://www.exploit-db.com/exploits/41955/ ExploitThird Party AdvisoryVDB Entry
https://www.cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2017-8291 US Government Resource

Track CVE-2017-8291 inside VULONE

Watch it alongside the ransomware crews, C2 infrastructure and forum chatter that reference it, query it through the API and pull it into your SIEM over TAXII.

Start free Open in platform

Related vulnerabilities

Same products first, then exploited flaws of the same weakness class.

10.0CVE-2025-32433Erlang/OTP SSH server missing authentication allows remote code executionErlang/OTP SSH servers before OTP-27.3.3, OTP-26.2.5.11 and OTP-25.3.2.20 mishandle SSH protocol messages, letting an unauthenticated attacker execut…KEVEPSS 99%analysed10.0CVE-2025-24201Apple WebKit out-of-bounds write allows sandbox escapeCVE-2025-24201 is an out-of-bounds write in Apple's WebKit that was addressed with improved checks. Maliciously crafted web content may break out of …KEVEPSS 3.8%analysed10.0CVE-2021-44228Apache Log4j2 JNDI lookup remote code executionApache Log4j2 versions 2.0-beta9 through 2.15.0 (excluding 2.12.2, 2.12.3, and 2.3.1) do not protect against attacker-controlled LDAP and other JNDI …KEVEPSS 100%analysed9.8CVE-2026-24061GNU Inetutils telnetd argument injection allows remote auth bypasstelnetd in GNU Inetutils through 2.7 fails to sanitize the USER environment variable, so a value such as "-f root" is passed as an argument to login …KEVEPSS 99%analysed9.8CVE-2025-39682Linux kernel TLS zero-length record handling flaw on rx_listThe Linux kernel TLS receive path mishandles zero-length records that arrive from the rx_list, breaking the assumption that a record type change cann…KEVEPSS 2.9%analysed9.8CVE-2025-24813Apache Tomcat Default Servlet path equivalence enables RCE and file disclosureApache Tomcat mishandles path equivalence for names containing an internal dot, letting a remote unauthenticated attacker write files through the Def…KEVEPSS 100%analysed9.8CVE-2024-9680Mozilla Firefox and Thunderbird use-after-free in Animation timelinesA use-after-free flaw in Animation timelines allows an attacker to execute code in the content process of Firefox and Thunderbird. Mozilla reports ex…KEVEPSS 23%analysed9.8CVE-2023-46604Apache ActiveMQ OpenWire deserialization remote code executionThe Java OpenWire protocol marshaller in Apache ActiveMQ deserializes untrusted data, letting an attacker manipulate serialized class types so the br…KEVEPSS 100%analysed

Source: NIST National Vulnerability Database (record CVE-2017-8291), CISA KEV, FIRST EPSS (scores of 2026-09-24). This page is refreshed as NVD updates the record.