CVE-2018-16509

CRITICALNVD 7.89.0
EchelonGraph scoreHIGH confidence

Score elevated to 9.0 because EPSS predicts 92% probability of exploitation within the next 30 days (top 0.2% of all CVEs). NVD baseline CVSS 7.8 retained for reference. Confidence: see factors.

Triggered by: EPSS exploit prediction ≥85%
Sources: epss, ghsa, nvd
Weaponized
9.0EG
EchelonGraph verdictPatch this weekExploitation is likely or a public exploit exists.
  • High exploitation likelihood — EPSS 92%
  • Public exploit code is available (Metasploit, Exploit-DB (verified), epss top5pct, epss high, public exploit)
CISA-KEV: Not listedEPSS PROB: 92%CVSS: 7.8Exploit: Metasploit · Exploit-DB (verified) · epss top5pct · epss high · public exploitExposed: 0

A fix is available — apply it.

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.

CVSS v3
7.8
EG Score
9.0(high)
EG Risk
82(Track)
EG Risk 82/100SSVC: Track

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 computed
Severity90% × 45%
Exploitation93% × 40%
Automatability30% × 15%
Action: Routine — remediate on your standard cadence.
EPSS PROB
92%
EPSS %ILE
100%
KEV
Not listed

Published

September 5, 2018

Last Modified

November 21, 2024

Patch Availability(3)

Vendor / EcosystemFixed in / PatchReleasedSource
ubuntulibgs9-common (9.10~dfsg-0ubuntu10.13) @ trusty2026-05-23ubuntu
redhatghostscript-0:8.70-24.el6_10.22018-12-03redhat
redhatghostscript-0:9.07-29.el7_5.22018-10-16redhat

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)
PackageVulnerable rangeFixed inDependents
ghostscript9.25~dfsg-1
Debian:12(1)
PackageVulnerable rangeFixed inDependents
ghostscript9.25~dfsg-1
Debian:13(1)
PackageVulnerable rangeFixed inDependents
ghostscript9.25~dfsg-1
Debian:14(1)
PackageVulnerable rangeFixed inDependents
ghostscript9.25~dfsg-1
Debian:8(1)
PackageVulnerable rangeFixed inDependents
ghostscript9.06~dfsg-2 ... 9.06~dfsg-2+deb8u7 (8 versions)9.06~dfsg-2+deb8u8
Debian:9(1)
PackageVulnerable rangeFixed inDependents
ghostscript9.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+deb9u49.20~dfsg-3.2+deb9u5

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 1× 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.

  1. 2026-08-15 01:26 UTCEPSS rescore
  2. 2026-08-08 16:32 UTCEPSS rescore
  3. 2026-08-08 04:49 UTCOSV refresh
  4. 2026-08-06 13:42 UTCEPSS rescore
  5. 2026-08-06 13:42 UTCEPSS rescore
  6. 2026-07-30 01:27 UTCEPSS rescore
  7. 2026-07-23 01:34 UTCEG score recompute
  8. 2026-07-22 21:30 UTCEG score recompute 1.20
  9. 2026-07-22 21:30 UTCVendor advisory
  10. 2026-07-22 21:29 UTCGHSA enrichment
  11. 2026-07-22 14:04 UTCEPSS rescore
  12. 2026-07-15 01:56 UTCEPSS rescore
  13. 2026-07-13 22:26 UTCEPSS rescore
  14. 2026-07-12 19:08 UTCOSV refresh
  15. 2026-07-11 08:24 UTCEPSS rescore
  16. 2026-06-30 23:19 UTCEPSS rescore
  17. 2026-06-30 23:19 UTCEPSS rescore
  18. 2026-06-24 03:59 UTCOSV refresh
  19. 2026-06-23 21:30 UTCEPSS rescore
  20. 2026-06-15 17:45 UTCEPSS rescore
  21. 2026-06-10 22:16 UTCEPSS rescore
  22. 2026-06-07 08:50 UTCOSV refresh
  23. 2026-06-06 13:45 UTCEPSS rescore
  24. 2026-06-06 13:45 UTCEPSS rescore
  25. 2026-06-02 20:11 UTCEPSS rescore
Show 10 more
  1. 2026-06-02 20:11 UTCEPSS rescore
  2. 2026-06-01 13:49 UTCEPSS rescore
  3. 2026-05-29 13:41 UTCEPSS rescore
  4. 2026-05-28 13:42 UTCEPSS rescore
  5. 2026-05-28 13:42 UTCEPSS rescore
  6. 2026-05-26 13:42 UTCEPSS rescore
  7. 2026-05-26 13:42 UTCEPSS rescore
  8. 2026-05-23 02:36 UTCEG score recompute
  9. 2026-05-23 02:36 UTCVendor advisory
  10. 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.

  • GitHub PoCknqyf263/CVE-2018-16509
    First seen Nov 17, 2018

    CVE-2018-16509 (Ghostscript contains multiple -dSAFER sandbox bypass vulnerabilities)

    Open source ↗
  • GitHub PoCfarisv/PIL-RCE-Ghostscript-CVE-2018-16509
    First seen Oct 15, 2018

    PoC + Docker Environment for Python PIL/Pillow Remote Shell Command Execution via Ghostscript CVE-2018-16509

    Open source ↗
  • Exploit-DBEDB-45369✓ verified
    First seen Sep 10, 2018

    Ghostscript - Failed Restore Command Execution (Metasploit)

    Open source ↗
  • Metasploitexploit/multi/fileformat/ghostscript_failed_restore✓ verified
    First seen Aug 21, 2018

    Ghostscript Failed Restore Command Execution

    Open source ↗

Frequently asked(5)

What is CVE-2018-16509?
CVE-2018-16509 is a critical vulnerability published on September 5, 2018. 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.
When was CVE-2018-16509 disclosed?
CVE-2018-16509 was first published in the National Vulnerability Database on September 5, 2018, with the most recent update on November 21, 2024. EchelonGraph re-ingests CVE updates from NVD on a 2-hour cycle, so this page reflects the latest published state.
Is CVE-2018-16509 actively exploited?
CVE-2018-16509 is not currently on CISA's Known Exploited Vulnerabilities catalog. FIRST EPSS estimates a 92% probability of exploitation in the next 30 days, which ranks it in the top 0.2% of all scored CVEs.
What is the CVSS score of CVE-2018-16509?
CVE-2018-16509 has a CVSS v3 base score of 7.8 (NVD). EchelonGraph synthesises NVD + CISA KEV + FIRST EPSS + GHSA into a combined EG score of 9.0.
How do I remediate CVE-2018-16509?
Patch to the fixed version published by the affected vendor. Where vendor advisories exist for CVE-2018-16509, EchelonGraph cross-links them in the Vendor Advisories panel below — those typically contain the canonical remediation steps, fixed version numbers, and any vendor-specific mitigations.

Dependency Blast Radius

See which npm, PyPI, Go, and Maven packages are affected by CVE-2018-16509

Explore →

Is Your Infrastructure Affected by CVE-2018-16509?

EchelonGraph automatically scans your cloud infrastructure and maps CVE exposure using blast radius analysis.