LiveBreach Intelligence: data breaches, leaks & ransomware, tracked as they surfaceOngoing protection: GalaxyWarden →
Recent BreachesData breach tracker

CVE-2017-8291: Artifex Ghostscript Type Confusion Vulnerability

RBRecent Breaches Vulnerability Intelligence·May 24, 2022
High⚠ Actively exploited (CISA KEV)
High
Severity
Active
CISA KEV
No
Ransomware use
Jun 14, 2022
Patch deadline
⚠ Exploited in the wild. CISA added CVE-2017-8291 to its Known Exploited Vulnerabilities catalog on May 24, 2022, with a federal patch deadline of Jun 14, 2022 — meaning attackers are actively using it. If you run the affected software, patch it immediately.

Artifex Ghostscript allows -dSAFER bypass and remote command execution via .rsdparams type confusion with a "/OutputFile.

CVE-2017-8291 is a type confusion vulnerability in Artifex Ghostscript that can allow an attacker to bypass the -dSAFER sandbox and achieve remote command execution. It matters because Ghostscript is widely used to process PostScript and PDF content in document pipelines, print servers, image converters, and web applications; a successful exploit can let an untrusted file run code on the host under the privileges of the Ghostscript process.

Public detail is limited to the CISA description of a -dSAFER bypass and remote command execution via .rsdparams type confusion involving "/OutputFile. Confirm exact affected releases, fixed versions, and exploitation preconditions against the vendor advisory before acting.

How it works

The weakness is classified as CWE-704 (Incorrect Type Conversion or Cast). In this class of flaw, the program mishandles the type of an object or parameter, so later code treats data as a different kind of object than the one that was supplied. According to the CISA summary, Artifex Ghostscript is affected through type confusion in .rsdparams that involves a "/OutputFile value. That confusion can defeat the -dSAFER restrictions that are intended to limit file-system and command access when processing untrusted input.

An attacker who can supply a crafted PostScript or PDF file (or cause such a file to be processed by an automated converter, previewer, or print spooler) may trigger the type confusion. Once -dSAFER is bypassed, the same processing path can lead to command execution on the system running Ghostscript. No further exploit mechanics are provided in the given facts; treat any public proof-of-concept claims as unverified until cross-checked with the vendor advisory and your own testing in a controlled environment.

Am I affected? How to find it in your systems

Ghostscript commonly appears on Linux and Unix servers, container images, CI/CD build agents, mail gateways that generate PDF previews, document-management systems, and desktop print subsystems. It may be invoked directly, via ImageMagick, LibreOffice, CUPS filters, or custom scripts that call gs.

How to remediate

Patch first. Apply the updates published by Artifex (or by your OS/distribution vendor that packages Ghostscript) exactly as directed in the vendor advisory. CISA’s required action is to apply updates per vendor instructions.

If you can't patch immediately

Reduce exposure until the vendor update can be deployed.

If your data may have been exposed

Actively exploited vulnerabilities of this class can lead to full host compromise and subsequent data theft or ransomware, although ransomware use is not documented for this CVE. If you have evidence that untrusted documents were processed by a vulnerable Ghostscript instance, treat the host as potentially compromised: isolate it, preserve volatile evidence, and begin incident-response procedures. As a quick additional check, you can run a free exposure scan of your email addresses against known breach data sets to see whether credentials or personal data have already appeared in public dumps.

AICompiled with AI assistance from public sources and published under our editorial standards.

Details

AffectedArtifex · Ghostscript
WeaknessCWE-704
Added to CISA KEVMay 24, 2022
Federal patch deadlineJun 14, 2022
Known ransomware useNot documented
Check if your data is exposed →

Official records: NVD · CISA KEV

← All actively-exploited vulnerabilities