Critical Vulnerability in Ghostscript: Type Confusion Leading to Potential Code Execution
Summary
ALPINE-CVE-2018-15910: In Artifex Ghostscript before 9.24, attackers able to supply crafted PostScript files could use a type confusion in the LockDistillerParams parameter to crash the interpreter or execute code. Affects ghostscript versions < 9.24-r0. Fixed in 9.24-r0. How to fix ↓
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
Ghostscript is an interpreter for the PostScript language and for PDF. It is widely used for processing and rendering documents in various formats. The software is known for its versatility and is often integrated into applications for document management and printing. However, Ghostscript has been found to have a critical vulnerability that allows attackers to exploit crafted PostScript files, leading to severe consequences.
Vulnerability Detail
In Artifex Ghostscript versions prior to 9.24, a type confusion vulnerability exists in the LockDistillerParams parameter. This flaw allows attackers to supply specially crafted PostScript files that can crash the interpreter or potentially execute arbitrary code. The vulnerability is classified with a CVSS score of 7.8, indicating a high severity level. The risk is particularly concerning as it can lead to unauthorized access and manipulation of the system running Ghostscript.
How To Fix
Minimum fixed version
9.24-r0
This is the first release that contains the fix.
sudo apk add --upgrade ghostscript
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
As a temporary measure, avoid processing untrusted PostScript files until the update has been applied. Implement strict input validation to mitigate the risk of exploitation.
Conclusion
The vulnerability in Ghostscript poses a significant risk due to its potential for code execution through crafted PostScript files. It is crucial for users to update to the patched version 9.24-r0 to mitigate this risk. Additionally, utilizing tools like Vulert can help monitor and alert for such vulnerabilities in real-time.
See every vulnerability recorded for ghostscript →
FAQ
The vulnerability is a type confusion issue that can be exploited through crafted PostScript files, potentially leading to code execution.
You can use Vulert's playground at Vulert Scanner to check if your application is affected without needing to sign up.
Failure to address this vulnerability could result in unauthorized access, data breaches, or system crashes.
Yes, the patch is available in Ghostscript version 9.24-r0 and later. Updating to this version will resolve the issue.
If immediate updating is not possible, avoid processing untrusted PostScript files and implement strict input validation as a temporary workaround.
References
Related vulnerabilities
Recent vulnerabilities recorded for ghostscript.