{"id":"CVE-2017-8291","published":"2017-04-27T01:59:02Z","modified":"2026-06-17T01:26:08Z","title":"Artifex Ghostscript Type Confusion Vulnerability","vendor":"Artifex","product":"Ghostscript","tier":"core","eol":null,"description":{"text":"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.","provenance":"source","from":"NVD"},"summary":null,"cvss":{"score":7.8,"severity":"HIGH","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","provenance":"source","from":"NVD"},"epss":{"score":0.96968,"percentile":0.99889,"date":"2026-10-28","provenance":"source"},"kev":{"dateAdded":"2022-05-24","dueDate":"2022-06-14","ransomware":false,"requiredAction":"Apply updates per vendor instructions.","notes":"https://nvd.nist.gov/vuln/detail/CVE-2017-8291","provenance":"source"},"vulncheckKev":{"dateAdded":"2017-04-27","exploitedFirstSeen":"2017-04-27","ransomware":false,"evidence":[{"url":"https://docs.google.com/spreadsheets/d/1lkNJ0uQwbeC1ZTRrxdtuPLCIl7mlUreoKfSIgajnSyY/edit","date":"2017-04-27"},{"url":"https://www.cve.org/CVERecord?id=CVE-2017-8291","date":"2017-04-27"},{"url":"https://www.cisa.gov/sites/default/files/feeds/known_exploited_vulnerabilities.json","date":"2022-05-24"},{"url":"https://asec.ahnlab.com/ko/47622/","date":"2023-02-14"},{"url":"https://www.fsec.or.kr/bbs/detail?menuNo=244&bbsNo=11839","date":"2025-12-22"},{"url":"https://asec.ahnlab.com/en/94847/","date":"2026-08-03"}],"evidenceTotal":6,"provenance":"source"},"exploited":true,"otx":{"pulseCount":50,"pulses":[{"name":"Actively_Exploited_Kev | Oct 29, 2026","url":"https://otx.alienvault.com/pulse/6ae20c1db17e7057ae7d9ad1","created":"2026-10-28"},{"name":"Actively_Exploited_Kev | Oct 28, 2026","url":"https://otx.alienvault.com/pulse/6ae0ba7e0e2a97ff7b218819","created":"2026-10-27"},{"name":"Actively_Exploited_Kev | Oct 27, 2026","url":"https://otx.alienvault.com/pulse/6adf68b85c3e852f3c111d18","created":"2026-10-26"},{"name":"Actively_Exploited_Kev | Oct 24, 2026","url":"https://otx.alienvault.com/pulse/6adb740e397c3ad4799aa4cd","created":"2026-10-23"},{"name":"Actively_Exploited_Kev | Oct 23, 2026","url":"https://otx.alienvault.com/pulse/6ada236fcfba2dfa730ea482","created":"2026-10-22"},{"name":"Actively_Exploited_Kev | Oct 22, 2026","url":"https://otx.alienvault.com/pulse/6ad8d33a077cbb5cab524d80","created":"2026-10-21"},{"name":"Actively_Exploited_Kev | Oct 21, 2026","url":"https://otx.alienvault.com/pulse/6ad78130c4d1ac2be83a8b6d","created":"2026-10-20"},{"name":"Actively_Exploited_Kev | Oct 20, 2026","url":"https://otx.alienvault.com/pulse/6ad62f63c24a405a3423cc13","created":"2026-10-19"},{"name":"Actively_Exploited_Kev | Oct 19, 2026","url":"https://otx.alienvault.com/pulse/6ad4dda174e5797d0bd238b7","created":"2026-10-18"},{"name":"Actively_Exploited_Kev | Oct 18, 2026","url":"https://otx.alienvault.com/pulse/6ad38c22e1848f8189d1c121","created":"2026-10-17"}],"provenance":"machine"},"cwes":[{"id":"CWE-843","name":"Access of Resource Using Incompatible Type"},{"id":"CWE-704","name":"Incorrect Type Conversion or Cast"}],"references":[{"url":"http://openwall.com/lists/oss-security/2017/04/28/2","tags":["Mailing List","Patch","Third Party Advisory"]},{"url":"http://www.debian.org/security/2017/dsa-3838","tags":["Mailing List","Third Party Advisory"]},{"url":"http://www.securityfocus.com/bid/98476","tags":["Broken Link","Third Party Advisory","VDB Entry"]},{"url":"https://access.redhat.com/errata/RHSA-2017:1230","tags":["Third Party Advisory"]},{"url":"https://bugs.ghostscript.com/show_bug.cgi?id=697808","tags":["Issue Tracking","Third Party Advisory","VDB Entry"]},{"url":"https://bugzilla.redhat.com/show_bug.cgi?id=1446063","tags":["Issue Tracking","Patch","Third Party Advisory","VDB Entry"]},{"url":"https://bugzilla.suse.com/show_bug.cgi?id=1036453","tags":["Exploit","Issue Tracking","Third Party Advisory","VDB Entry"]},{"url":"https://git.ghostscript.com/?p=ghostpdl.git%3Ba=commit%3Bh=04b37bbce174eed24edec7ad5b920eb93db4d47d","tags":["Broken Link"]},{"url":"https://security.gentoo.org/glsa/201708-06","tags":["Third Party Advisory"]},{"url":"https://www.exploit-db.com/exploits/41955/","tags":["Exploit","Third Party Advisory","VDB Entry"]},{"url":"http://openwall.com/lists/oss-security/2017/04/28/2","tags":["Mailing List","Patch","Third Party Advisory"]},{"url":"http://www.debian.org/security/2017/dsa-3838","tags":["Mailing List","Third Party Advisory"]},{"url":"http://www.securityfocus.com/bid/98476","tags":["Broken Link","Third Party Advisory","VDB Entry"]},{"url":"https://access.redhat.com/errata/RHSA-2017:1230","tags":["Third Party Advisory"]},{"url":"https://bugs.ghostscript.com/show_bug.cgi?id=697808","tags":["Issue Tracking","Third Party Advisory","VDB Entry"]},{"url":"https://bugzilla.redhat.com/show_bug.cgi?id=1446063","tags":["Issue Tracking","Patch","Third Party Advisory","VDB Entry"]},{"url":"https://bugzilla.suse.com/show_bug.cgi?id=1036453","tags":["Exploit","Issue Tracking","Third Party Advisory","VDB Entry"]},{"url":"https://git.ghostscript.com/?p=ghostpdl.git%3Ba=commit%3Bh=04b37bbce174eed24edec7ad5b920eb93db4d47d","tags":["Broken Link"]},{"url":"https://security.gentoo.org/glsa/201708-06","tags":["Third Party Advisory"]},{"url":"https://www.exploit-db.com/exploits/41955/","tags":["Exploit","Third Party Advisory","VDB Entry"]},{"url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2017-8291","tags":["US Government Resource"]}],"techniques":[{"id":"T1190","name":"Exploit Public-Facing Application","tactics":["initial-access"],"provenance":"source","basis":"ctid-cve","bases":["ctid-cve"],"basisDetail":"CTID attack_to_cve (Phase 1)","mappingType":"uncategorized","evidence":[],"confidence":"low","confidenceNote":"needs user interaction; not a public-facing exploit"},{"id":"T1204.002","name":"Malicious File","tactics":["execution"],"provenance":"ai","basis":"ai-mapping","bases":["ai-mapping"],"basisDetail":"claude-haiku-5-5: user opens crafted document","mappingType":"exploitation_technique","evidence":[{"from":"description","quote":"crafted .eps document that is an input to the gs program","start":164,"end":220}],"model":"claude-haiku-5-5","confidence":"medium","confidenceNote":"AI-mapped from the description (quote-validated, not expert-reviewed)"},{"id":"T1059","name":"Command and Scripting Interpreter","tactics":["execution"],"provenance":"ai","basis":"ai-mapping","bases":["ai-mapping"],"basisDetail":"claude-haiku-5-5: remote command execution via pipe","mappingType":"primary_impact","evidence":[{"from":"description","quote":"allows -dSAFER bypass and remote command execution","start":39,"end":89}],"model":"claude-haiku-5-5","confidence":"medium","confidenceNote":"AI-mapped from the description (quote-validated, not expert-reviewed)"}],"reports":[],"affected":[],"advisories":[],"euvd":{"id":"EUVD-2017-17253","url":"https://euvd.enisa.europa.eu/vulnerability/EUVD-2017-17253","exploited":true,"exploitedSince":"2022-05-24","provenance":"source"},"exploits":[{"id":41955,"url":"https://www.exploit-db.com/exploits/41955","title":"Ghostscript 9.21 - Type Confusion Arbitrary Command Execution (Metasploit)","type":"local","platform":"linux","date":"2017-05-02","verified":true,"provenance":"source"},{"id":41955,"url":"https://www.exploit-db.com/exploits/41955","title":"Ghostscript 9.21 - Type Confusion Arbitrary Command Execution (Metasploit)","type":"local","platform":"linux","date":"2017-05-02","verified":true,"provenance":"source"}],"exploitSources":{"exploitdb":{"count":2,"earliest":"2017-05-02"},"pocGithub":{"count":1,"skipped":1,"earliest":"2025-06-13","earliestUrl":"https://github.com/hkcfs/PIL-CVE-2017-8291","repos":[{"name":"hkcfs/PIL-CVE-2017-8291","url":"https://github.com/hkcfs/PIL-CVE-2017-8291","stars":0,"created":"2025-06-13"}]},"metasploit":[{"name":"Ghostscript Type Confusion Arbitrary Command Execution","module":"exploit/unix/fileformat/ghostscript_type_confusion","type":"exploit","disclosureDate":"2017-04-27","url":"https://github.com/rapid7/metasploit-framework/blob/master/modules/exploits/unix/fileformat/ghostscript_type_confusion.rb"}],"first":{"date":"2017-04-27","source":"Metasploit","url":"https://github.com/rapid7/metasploit-framework/blob/master/modules/exploits/unix/fileformat/ghostscript_type_confusion.rb"},"provenance":"source"},"exploitRefs":["https://bugzilla.suse.com/show_bug.cgi?id=1036453","https://www.exploit-db.com/exploits/41955/"],"flow":[{"stage":"exploitation","techniques":["T1204.002"],"provenance":"ai"},{"stage":"primary","techniques":["T1059"],"provenance":"ai"},{"stage":"related","techniques":["T1190"],"provenance":"source","lowConfidence":true}],"timeline":[{"date":"2017-04-27","kind":"published","label":"Published (NVD)","url":"https://nvd.nist.gov/vuln/detail/CVE-2017-8291","provenance":"source"},{"date":"2017-04-27","kind":"exploit-public","label":"First public exploit: Metasploit; later: Exploit-DB 2017-05-02, PoC-in-GitHub 2025-06-13","url":"https://github.com/rapid7/metasploit-framework/blob/master/modules/exploits/unix/fileformat/ghostscript_type_confusion.rb","provenance":"source"},{"date":"2017-04-27","kind":"exploited-reported","label":"Exploitation first reported (VulnCheck KEV evidence)","url":"https://docs.google.com/spreadsheets/d/1lkNJ0uQwbeC1ZTRrxdtuPLCIl7mlUreoKfSIgajnSyY/edit","provenance":"source"},{"date":"2022-05-24","kind":"kev","label":"Added to CISA KEV","url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","provenance":"source"},{"date":"2022-05-24","kind":"euvd-exploited","label":"ENISA EUVD: exploited","url":"https://euvd.enisa.europa.eu/vulnerability/EUVD-2017-17253","provenance":"source"}],"speed":{"daysToPublicExploit":0,"firstExploitFrom":"Metasploit","daysToKev":1853},"priority":{"score":68.4,"factors":[{"name":"In a KEV catalog","points":35.0,"detail":"listed in CISA KEV and VulnCheck KEV"},{"name":"Recent KEV listing","points":0.0,"detail":"added 3472 days ago"},{"name":"Known ransomware use","points":0.0,"detail":"not known"},{"name":"EPSS percentile","points":19.98,"detail":"percentile 0.9989"},{"name":"Named in threat reports","points":0.0,"detail":"0 reports"},{"name":"Public exploit code","points":5.0,"detail":"2 NVD references tagged Exploit; 2 Exploit-DB entries; 1 PoC-in-GitHub repo; 1 Metasploit module"},{"name":"Mentioned in OTX pulses","points":3.0,"detail":"50 pulses"},{"name":"CVSS severity","points":5.46,"detail":"base score 7.8"},{"name":"End-of-life product","points":0.0,"detail":"supported or unknown"}]}}