CVE-2017-8291: Ghostscript .rsdparams Type Confusion and SAFER Bypass
- Vendors
- Debian ProjectRed HatArtifex Software
CVE-2017-8291 is a type-confusion vulnerability in the .rsdparams operator of Artifex Ghostscript affecting versions through April 26, 2017. Processing a specially crafted Encapsulated PostScript (EPS) document can bypass the -dSAFER restriction and execute attacker-controlled commands. The vulnerability also affects applications that process EPS through a vulnerable Ghostscript component, including older versions of Hangul Word Processor. Exploitation was observed in the wild in April 2017 and subsequently in malicious-document campaigns.
Impact, mitigation & remediation
What it means and what to do now: patch path, interim mitigations, and the assume-compromise checklist.
Impact
What an attacker gets, and what they’ve been doing with it.
Successful exploitation bypasses Ghostscript's SAFER security restrictions and permits attacker-controlled command or code execution on the system processing the document. Observed attacks used embedded EPS objects in Hangul documents to execute shellcode and download additional malware, including CRAT and M2RAT.
Mitigation
If you can’t patch tonight, do this now.
Disable EPS processing or remove the Ghostscript-based EPS-processing module from affected document applications where feasible. Do not process untrusted EPS documents or open untrusted Hangul attachments with vulnerable software. The -dSAFER option alone does not prevent exploitation because the vulnerability bypasses that restriction.
Remediation
Patch, then assume compromise.
Apply vendor updates that correct CVE-2017-8291 in Ghostscript, including any Ghostscript component bundled with document-processing applications. Update affected Hangul Word Processor installations to versions that no longer include the vulnerable EPS-processing module. A specific fixed Ghostscript release is not identified in the available information; referenced distribution advisories include Debian DSA-3838, Red Hat RHSA-2017:1230, and Gentoo GLSA-201708-06.
Exploits
5 exploits validated by Mallory's analysis.
Affected products & vendors
Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.
References
Frequently asked questions
- Is CVE-2017-8291 exploited in the wild?
- Yes. As of Oct 16, 2026, Mallory has reports of exploitation in the wild, and CISA added it to KEV on May 24, 2022.
- Is there a public exploit for CVE-2017-8291?
- Yes. Mallory tracks 5 public exploits or proofs of concept for CVE-2017-8291, the earliest disclosed Apr 27, 2017.
- Is there a patch for CVE-2017-8291?
- Apply vendor updates that correct CVE-2017-8291 in Ghostscript, including any Ghostscript component bundled with document-processing applications. Update affected Hangul Word Processor installations to versions that no longer include the vulnerable EPS-processing module.
- What products are affected by CVE-2017-8291?
- Artifex Software Ghostscript, Debian Project Debian Linux, Red Hat Enterprise Linux Desktop, Red Hat Enterprise Linux Eus, Red Hat Enterprise Linux Server, and 3 more.
- How severe is CVE-2017-8291?
- CVE-2017-8291 has a CVSS v3.1 score of 7.8 (High) and an EPSS score of 97.0% (100th percentile) as of Oct 16, 2026.
Recent activity
11 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.