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.
CVE-2018-16509
Score elevated to 9.0 because EPSS predicts 92% probability of exploitation within the next 30 days (99th percentile of EPSS-scored CVEs). NVD baseline CVSS 7.8 retained for reference. Confidence: see factors.
- High exploitation likelihood — EPSS 92%
- Public exploit code is available (Metasploit, Exploit-DB (verified), epss top5pct, epss high, public exploit)
A fix is available — apply it.
- CVSS v3
- 7.8
- EG Score
- 9.0CRITICALhigh confidence
- EG Risk
- 82EG Risk 82/100CISA SSVC
EG Risk is EchelonGraph's 0–100 priority score: it fuses intrinsic severity with real-world exploitation and automatability so you can rank equal-severity CVEs and fix the most dangerous first. Higher = act sooner. Distinct from the 0–10 EG Score (severity).
How it’s computedSeverity90% × 45%Exploitation93% × 40%Automatability30% × 15%CISA SSVC: Track at low or medium mission impact; Track* or Attend at high (mission-essential systems).Action: A fix is available. Apply it within your standard update timelines at low or medium mission impact and sooner than that at high. - EPSS PROB
- 92%
- EPSS %ILE
- 99th
- KEV
- Not listed
CISA SSVCTrack at low or medium mission impact; Track* or Attend at high (mission-essential systems).
A fix is available. Apply it within your standard update timelines at low or medium mission impact and sooner than that at high.
Exploitation public PoC (EG-KEV: weaponized) · Automatable unknown (not published for this CVE) · Technical impact partial (CVSS below 9.0). Mission impact is CISA's Mission & Well-being decision point, and only you can judge it: high means the affected system is essential to your organisation's mission, or its compromise could cause irreversible harm to people. CISA's decision table
Published
September 5, 2018
Last Modified
November 21, 2024
References (30)
- cve@mitrehttp://git.ghostscript.com/?p=ghostpdl.git%3Ba=commit%3Bh=5516c614dc33662a2afdc377159f70218e67bde5
- cve@mitrehttp://git.ghostscript.com/?p=ghostpdl.git%3Ba=commit%3Bh=78911a01b67d590b4a91afac2e8417360b934156
- cve@mitrehttp://git.ghostscript.com/?p=ghostpdl.git%3Ba=commit%3Bh=79cccf641486a6595c43f1de1cd7ade696020a31
- cve@mitrehttp://git.ghostscript.com/?p=ghostpdl.git%3Ba=commitdiff%3Bh=520bb0ea7519aa3e79db78aaf0589dae02103764
- cve@mitrehttp://seclists.org/oss-sec/2018/q3/142
- cve@mitrehttp://www.securityfocus.com/bid/105122
- cve@mitrehttps://access.redhat.com/errata/RHSA-2018:2918
- cve@mitrehttps://access.redhat.com/errata/RHSA-2018:3760
- cve@mitrehttps://bugs.ghostscript.com/show_bug.cgi?id=699654
- cve@mitrehttps://lists.debian.org/debian-lts-announce/2018/09/msg00015.html
- cve@mitrehttps://security.gentoo.org/glsa/201811-12
- cve@mitrehttps://usn.ubuntu.com/3768-1/
- cve@mitrehttps://www.artifex.com/news/ghostscript-security-resolved/
- cve@mitrehttps://www.debian.org/security/2018/dsa-4294
- cve@mitrehttps://www.exploit-db.com/exploits/45369/
Patch Availability(3)
| Vendor / Ecosystem | Fix (by version range) / Patch | Released | Source |
|---|---|---|---|
| ubuntu | libgs9-common (9.10~dfsg-0ubuntu10.13) @ trusty | 2026-05-23 | ubuntu |
| redhat | ghostscript-0:8.70-24.el6_10.2 | 2018-12-03 | redhat |
| redhat | ghostscript-0:9.07-29.el7_5.2 | 2018-10-16 | redhat |
Patches are aggregated from vendor advisories (Red Hat, Microsoft, Cisco, GitHub) and package ecosystems (OSV, GHSA). Multiple rows for the same upstream release have been deduplicated.
Affected Packages
(6 across 6 ecosystems)
Debian:11(1)
| Package | Vulnerable range | Fix by version range | Dependents |
|---|---|---|---|
| ghostscript | — |
| — |
Debian:12(1)
| Package | Vulnerable range | Fix by version range | Dependents |
|---|---|---|---|
| ghostscript | — |
| — |
Debian:13(1)
| Package | Vulnerable range | Fix by version range | Dependents |
|---|---|---|---|
| ghostscript | — |
| — |
Debian:14(1)
| Package | Vulnerable range | Fix by version range | Dependents |
|---|---|---|---|
| ghostscript | — |
| — |
Debian:8(1)
| Package | Vulnerable range | Fix by version range | Dependents |
|---|---|---|---|
| ghostscript | 9.06~dfsg-2 ... 9.06~dfsg-2+deb8u7 (8 versions) |
| — |
Debian:9(1)
| Package | Vulnerable range | Fix by version range | Dependents |
|---|---|---|---|
| ghostscript | 9.20~dfsg-3.2, 9.20~dfsg-3.2+deb9u1, 9.20~dfsg-3.2+deb9u2, 9.20~dfsg-3.2+deb9u3, 9.20~dfsg-3.2+deb9u4 |
| — |
All Vendor Advisories
(3)
Every vendor that published an advisory referencing this CVE — pulled from our cve_vendor_advisories aggregation. Click any row for the vendor's original advisory page.
Data Freshness Timeline
(refreshed 2× in last 7d / 10× in last 30d)
Each row is a source pipeline that fetched or updated this CVE on that date, with what changed. For example, "NVD update" means NVD published or revised its analysis for this CVE; "MITRE cvelistV5" means we ingested or refreshed it from the CNA feed. Most recent first.
- 2026-09-30 20:40 UTCOSV refresh
- 2026-09-30 09:55 UTCEG score recompute
- 2026-09-24 13:59 UTCEPSS rescore
- 2026-09-23 13:42 UTCEPSS rescore
- 2026-09-21 20:27 UTCEPSS rescore
- 2026-09-18 19:22 UTCEPSS rescore
- 2026-09-16 05:06 UTCEPSS rescore
- 2026-09-12 02:53 UTCOSV refresh
- 2026-09-10 09:27 UTCEPSS rescore
- 2026-09-06 13:43 UTCEPSS rescore
- 2026-09-05 15:24 UTCEPSS rescore
- 2026-09-04 05:02 UTCEPSS rescore
- 2026-08-30 19:13 UTCEPSS rescore
- 2026-08-28 21:36 UTCEPSS rescore
- 2026-08-27 14:21 UTCEPSS rescore
- 2026-08-24 08:27 UTCOSV refresh
- 2026-08-21 23:44 UTCEPSS rescore
- 2026-08-15 01:26 UTCEPSS rescore
- 2026-08-08 16:32 UTCEPSS rescore
- 2026-08-08 04:49 UTCOSV refresh
- 2026-08-06 13:42 UTCEPSS rescore
- 2026-08-06 13:42 UTCEPSS rescore
- 2026-07-30 01:27 UTCEPSS rescore
- 2026-07-23 01:34 UTCEG score recompute
- 2026-07-22 21:30 UTCEG score recompute▲ 1.20
Show 27 moreShow fewer
- 2026-07-22 21:30 UTCVendor advisory
- 2026-07-22 21:29 UTCGHSA enrichment
- 2026-07-22 14:04 UTCEPSS rescore
- 2026-07-15 01:56 UTCEPSS rescore
- 2026-07-13 22:26 UTCEPSS rescore
- 2026-07-12 19:08 UTCOSV refresh
- 2026-07-11 08:24 UTCEPSS rescore
- 2026-06-30 23:19 UTCEPSS rescore
- 2026-06-30 23:19 UTCEPSS rescore
- 2026-06-24 03:59 UTCOSV refresh
- 2026-06-23 21:30 UTCEPSS rescore
- 2026-06-15 17:45 UTCEPSS rescore
- 2026-06-10 22:16 UTCEPSS rescore
- 2026-06-07 08:50 UTCOSV refresh
- 2026-06-06 13:45 UTCEPSS rescore
- 2026-06-06 13:45 UTCEPSS rescore
- 2026-06-02 20:11 UTCEPSS rescore
- 2026-06-02 20:11 UTCEPSS rescore
- 2026-06-01 13:49 UTCEPSS rescore
- 2026-05-29 13:41 UTCEPSS rescore
- 2026-05-28 13:42 UTCEPSS rescore
- 2026-05-28 13:42 UTCEPSS rescore
- 2026-05-26 13:42 UTCEPSS rescore
- 2026-05-26 13:42 UTCEPSS rescore
- 2026-05-23 02:36 UTCEG score recompute
- 2026-05-23 02:36 UTCVendor advisory
- 2026-05-23 02:36 UTCGHSA enrichment
Publicly available exploits
(4 references)Working exploit code is in the public domain (1 Metasploit module) (2 GitHub PoCs) (1 Exploit-DB entry). Defenders should treat patch urgency accordingly — public PoCs typically lead to mass-exploitation within 24-72 hours.
- Exploit-DBEDB-45369✓ verifiedFirst seen Sep 10, 2018
Ghostscript - Failed Restore Command Execution (Metasploit)
Open source ↗ - Metasploitexploit/multi/fileformat/ghostscript_failed_restore✓ verifiedFirst seen Aug 21, 2018
Ghostscript Failed Restore Command Execution
Open source ↗ - GitHub PoCknqyf263/CVE-2018-16509First seen Nov 17, 2018
CVE-2018-16509 (Ghostscript contains multiple -dSAFER sandbox bypass vulnerabilities)
Open source ↗ - GitHub PoCfarisv/PIL-RCE-Ghostscript-CVE-2018-16509First seen Oct 15, 2018
PoC + Docker Environment for Python PIL/Pillow Remote Shell Command Execution via Ghostscript CVE-2018-16509
Open source ↗
Related CVEs(same product + same vendor)
Same product
10 shownDebian:8:ghostscript
- CVE-2019-14813EG 9.8EPSS p96CRITICAL
- CVE-2018-19409EG 9.8EPSS p95CRITICAL
- CVE-2019-14869EG 8.8HIGH
- CVE-2018-18284EG 8.6EPSS p97HIGH
- CVE-2018-17961EG 8.6EPSS p95HIGH
- CVE-2019-6116NVD 7.8EG 8.1EPSS p99HIGH
- CVE-2019-14812EG 7.8HIGH
- CVE-2019-10216EG 7.8HIGH
- CVE-2019-14817EG 7.8HIGH
- CVE-2019-14811EG 7.8EPSS p90HIGH
Same vendor
10 shownredhat:RHSA-2018:2918 · ubuntu:USN-3768-1
Frequently asked(5)
What is CVE-2018-16509?
When was CVE-2018-16509 disclosed?
Is CVE-2018-16509 actively exploited?
What is the CVSS score of CVE-2018-16509?
How do I remediate CVE-2018-16509?
Dependency Blast Radius
See which npm, PyPI, Go, and Maven packages are affected by CVE-2018-16509
Is Your Infrastructure Affected by CVE-2018-16509?
EchelonGraph automatically scans your cloud infrastructure and maps CVE exposure using blast radius analysis.