{"id":"CVE-2018-16509","published":"2018-09-05T06:00:00Z","modified":"2024-08-05T10:24:32Z","title":"An issue was discovered in Artifex Ghostscript before 9.24","vendor":null,"product":null,"tier":"core","eol":null,"description":{"text":"An issue was discovered in Artifex Ghostscript before 9.24. Incorrect \"restoration of privilege\" checking during handling of /invalidaccess exceptions could be used by attackers able to supply crafted PostScript to execute code using the \"pipe\" instruction.","provenance":"source","from":"CVE.org"},"summary":{"text":"The flaw lies in Artifex Ghostscript, in versions before 9.24, specifically in how it checks restoration of privilege while handling /invalidaccess exceptions. An attacker who can supply crafted PostScript input can use this to execute code through the \"pipe\" instruction.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-10-29T07:16:24Z"},"cvss":null,"epss":{"score":0.9235,"percentile":0.99825,"date":"2026-11-10","provenance":"source"},"kev":null,"vulncheckKev":{"dateAdded":"2024-05-10","exploitedFirstSeen":"2024-05-10","ransomware":false,"evidence":[{"url":"https://1665891.fs1.hubspotusercontent-na1.net/hubfs/1665891/Threat%20reports/AquaSecurity_Kinsing_Demystified_Technical_Guide.pdf","date":"2024-05-10"}],"evidenceTotal":1,"provenance":"source"},"exploited":true,"otx":{"pulseCount":1,"pulses":[{"name":"GitHub - nautilus-aqua/Kinsing-Indication-of-Compromise: This repo contains indication of compromise of Kinsing threat actor that were collected over a period of few years","url":"https://otx.alienvault.com/pulse/67ba26921050c137f83c3b8d","created":"2025-02-22"}],"provenance":"machine"},"cwes":[],"references":[{"url":"http://git.ghostscript.com/?p=ghostpdl.git%3Ba=commit%3Bh=5516c614dc33662a2afdc377159f70218e67bde5","tags":["x_refsource_MISC"]},{"url":"https://www.exploit-db.com/exploits/45369/","tags":["exploit","x_refsource_EXPLOIT-DB"]},{"url":"https://bugs.ghostscript.com/show_bug.cgi?id=699654","tags":["x_refsource_MISC"]},{"url":"https://access.redhat.com/errata/RHSA-2018:2918","tags":["vendor-advisory","x_refsource_REDHAT"]},{"url":"http://git.ghostscript.com/?p=ghostpdl.git%3Ba=commit%3Bh=79cccf641486a6595c43f1de1cd7ade696020a31","tags":["x_refsource_MISC"]},{"url":"https://security.gentoo.org/glsa/201811-12","tags":["vendor-advisory","x_refsource_GENTOO"]},{"url":"https://usn.ubuntu.com/3768-1/","tags":["vendor-advisory","x_refsource_UBUNTU"]},{"url":"https://www.artifex.com/news/ghostscript-security-resolved/","tags":["x_refsource_MISC"]},{"url":"https://access.redhat.com/errata/RHSA-2018:3760","tags":["vendor-advisory","x_refsource_REDHAT"]},{"url":"http://seclists.org/oss-sec/2018/q3/142","tags":["x_refsource_MISC"]},{"url":"https://www.debian.org/security/2018/dsa-4294","tags":["vendor-advisory","x_refsource_DEBIAN"]},{"url":"https://lists.debian.org/debian-lts-announce/2018/09/msg00015.html","tags":["mailing-list","x_refsource_MLIST"]},{"url":"http://www.securityfocus.com/bid/105122","tags":["vdb-entry","x_refsource_BID"]},{"url":"http://git.ghostscript.com/?p=ghostpdl.git%3Ba=commit%3Bh=78911a01b67d590b4a91afac2e8417360b934156","tags":["x_refsource_MISC"]},{"url":"http://git.ghostscript.com/?p=ghostpdl.git%3Ba=commitdiff%3Bh=520bb0ea7519aa3e79db78aaf0589dae02103764","tags":["x_refsource_CONFIRM"]}],"techniques":[],"reports":[],"affected":[],"advisories":[],"euvd":{"id":"EUVD-2018-8320","url":"https://euvd.enisa.europa.eu/vulnerability/EUVD-2018-8320","exploited":false,"exploitedSince":null,"provenance":"source"},"exploits":[{"id":45369,"url":"https://www.exploit-db.com/exploits/45369","title":"Ghostscript - Failed Restore Command Execution (Metasploit)","type":"local","platform":"linux","date":"2018-09-10","verified":true,"provenance":"source"},{"id":45369,"url":"https://www.exploit-db.com/exploits/45369","title":"Ghostscript - Failed Restore Command Execution (Metasploit)","type":"local","platform":"linux","date":"2018-09-10","verified":true,"provenance":"source"}],"exploitSources":{"exploitdb":{"count":2,"earliest":"2018-09-10"},"pocGithub":{"count":5,"skipped":0,"earliest":"2018-10-15","earliestUrl":"https://github.com/farisv/PIL-RCE-Ghostscript-CVE-2018-16509","repos":[{"name":"farisv/PIL-RCE-Ghostscript-CVE-2018-16509","url":"https://github.com/farisv/PIL-RCE-Ghostscript-CVE-2018-16509","stars":62,"created":"2018-10-15"},{"name":"knqyf263/CVE-2018-16509","url":"https://github.com/knqyf263/CVE-2018-16509","stars":3,"created":"2018-11-17"},{"name":"rhpco/CVE-2018-16509","url":"https://github.com/rhpco/CVE-2018-16509","stars":1,"created":"2019-08-04"},{"name":"cved-sources/cve-2018-16509","url":"https://github.com/cved-sources/cve-2018-16509","stars":0,"created":"2019-01-11"},{"name":"CyberCTF/vulhub-ghostscript-cve-2018-16509","url":"https://github.com/CyberCTF/vulhub-ghostscript-cve-2018-16509","stars":0,"created":"2026-10-08"}]},"metasploit":[{"name":"Ghostscript Failed Restore Command Execution","module":"exploit/multi/fileformat/ghostscript_failed_restore","type":"exploit","disclosureDate":"2018-08-21","url":"https://github.com/rapid7/metasploit-framework/blob/master/modules/exploits/multi/fileformat/ghostscript_failed_restore.rb"}],"first":{"date":"2018-08-21","source":"Metasploit","url":"https://github.com/rapid7/metasploit-framework/blob/master/modules/exploits/multi/fileformat/ghostscript_failed_restore.rb"},"provenance":"source"},"exploitRefs":["https://www.exploit-db.com/exploits/45369/"],"flow":[],"timeline":[{"date":"2018-08-21","kind":"exploit-public","label":"First public exploit: Metasploit; later: Exploit-DB 2018-09-10, PoC-in-GitHub 2018-10-15","url":"https://github.com/rapid7/metasploit-framework/blob/master/modules/exploits/multi/fileformat/ghostscript_failed_restore.rb","provenance":"source"},{"date":"2018-09-05","kind":"published","label":"Published (CVE.org)","url":"https://www.cve.org/CVERecord?id=CVE-2018-16509","provenance":"source"},{"date":"2024-05-10","kind":"exploited-reported","label":"Exploitation first reported (VulnCheck KEV evidence)","url":"https://1665891.fs1.hubspotusercontent-na1.net/hubfs/1665891/Threat%20reports/AquaSecurity_Kinsing_Demystified_Technical_Guide.pdf","provenance":"source"}],"speed":{"daysToPublicExploit":null,"firstExploitFrom":"Metasploit","daysToKev":null},"priority":{"score":60.6,"factors":[{"name":"In a KEV catalog","points":35.0,"detail":"listed in VulnCheck KEV"},{"name":"Recent KEV listing","points":0.0,"detail":"added 914 days ago"},{"name":"Known ransomware use","points":0.0,"detail":"not known"},{"name":"EPSS percentile","points":19.96,"detail":"percentile 0.9982"},{"name":"Named in threat reports","points":0.0,"detail":"0 reports"},{"name":"Public exploit code","points":5.0,"detail":"1 NVD reference tagged Exploit; 2 Exploit-DB entries; 5 PoC-in-GitHub repos; 1 Metasploit module"},{"name":"Mentioned in OTX pulses","points":0.68,"detail":"1 pulse"},{"name":"CVSS severity","points":0.0,"detail":"no CVSS"},{"name":"End-of-life product","points":0.0,"detail":"supported or unknown"}]},"lineage":{"familyId":"fam-cve-2018-16509-family-cve-2018-16509","children":[{"from":"CVE-2018-16509","to":"CVE-2018-16802","relation":"incomplete-fix","confidence":"high","kind":"lineage","evidence":[{"kind":"text","provenance":"source","relation":"incomplete-fix","quote":"This is due to an incomplete fix for CVE-2018-16509.","from":"CVE.org","in":"CVE-2018-16802"}]}]}}