Your RSA-2048 keys break in 2030. Find every one of them before attackers do.
🛡️
Not in CISA KEV
HIGH severity

CVE-2018-16509 — Red Hat

HIGH

CVE-2018-16509 is a high-severity (CVSS 7.8) vulnerability. 11 public exploit references exist, so weaponization risk is real. No vendor fix is recorded yet; mitigation options are listed below.

Published
Updated
Affected
8 products
Patched
See advisory
Exploits
11 known
Exploitation data as of Oct 22, 2026 · OSV.dev, NVD, FIRST.org (EPSS)

EPSS Exploitation Probability

via FIRST.org ↗
92.5%probability of exploitation in next 30 days
Very High Risk0.00%
Lower risk than most CVEs100th percentile — riskier than 100% of all scored CVEsHighest risk
91.3%91.8%92.4%93.0%91.8%92.5%Apr 26Aug 26Oct 26

Probability of exploitation in the next 30 days, from FIRST.org EPSS.

How urgent is this, really

CVE-2018-16509 by exploitation likelihood (EPSS) against impact (CVSS). In the shaded patch-first corner (EPSS 50%+, CVSS 7.0+).

Where this sits among everything scored

Of 394,803 CVEs with a current EPSS score, this one falls in the ≥ 90% band (highlighted). Counts from FIRST.org, log-scaled.

Description

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.

Affected Products

8 products · 14 configurations
Application
ghostscriptartifex
< 9.24
range
Application
gpl ghostscriptartifex
< 9.26
range
OS
ubuntu linuxcanonical
3 versions
14.0416.0418.04
OS
debian linuxdebian
2 versions
8.09.0
OS
enterprise linux desktopredhat
2 versions
6.07.0
OS
enterprise linux serverredhat
2 versions
6.07.0
Exploits & PoCs
11

Research use only. For defensive security, authorized penetration testing, and academic research only. Never execute exploit code against systems without explicit written authorization.

EDB-45369locallinux✓ Verified

Ghostscript - Failed Restore Command Execution (Metasploit)

by Metasploit · Sep 10, 2018

Detection & mitigation playbook

Vulnerability
  1. Detect

    Identify every host running the affected component and compare the installed build against the fixed version below — for source-built or distro-packaged software the version string, not a lockfile, is the source of truth (`dpkg -l`, `rpm -q`, or the binary's own `--version`).

  2. Remediation status

    No fixed release is recorded for CVE-2018-16509 yet. Track the upstream advisory, and apply the exposure-reduction steps below in the meantime.

  3. Mitigate without a patch

    If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.

Fixing This On Your OS

If you run this on a Linux distribution, patch through your package manager against the distro's own security advisory below — it tracks the exact backported fix for your release, which can ship on a different timeline (and sometimes a different severity) than the upstream project.

Red HatImportant

This issue did affect the versions of ghostscript as shipped with Red Hat Enterprise Linux 5, 6, and 7. Red Hat Enterprise Linux 5 is now in Extended Life Phase of the support and maintenance life cycle. This issue is not currently planned to be addressed in future updates. For additional information, refer to the…

Workaround published by Red Hat
* ImageMagick relies on ghostscript when processing certain files formats. Thus, ImageMagick can be used as an attack vector. In order to prevent ImageMagick from processing those files on Red Hat Enterprise Linux 6 and 7, you can disable the use of ghostscript and the processing of PS, EPS, PDF, and XPS file formats in ImageMagick's security policy by opening /etc/ImageMagick/policy.xml and adding the following lines to the "<policymap>" section of the file: ``` <policy domain="coder" rights="none" pattern="PS" /> <policy domain="coder" rights="none" pattern="EPS" /> <policy domain="coder" rights="none" pattern="PDF" /> <policy domain="coder" rights="none" pattern="XPS" /> <policy…
Source: Red Hat security advisory for CVE-2018-16509 (CC BY 4.0)
ProductFixed inAdvisory
Red Hat Enterprise Linux 6ghostscript-0:8.70-24.el6_10.2RHSA-2018:3760
Red Hat Enterprise Linux 7ghostscript-0:9.07-29.el7_5.2RHSA-2018:2918

Frequently Asked Questions

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.
O3 Security · Impact-Aware SCA

Is CVE-2018-16509 in your dependencies?

Find it across , including transitive dependencies.

CVE-2018-16509: Red Hat (High 7.8)