Critical Vulnerability in Ghostscript: Privilege Restoration Flaw
Summary
ALPINE-CVE-2018-16802: An issue was discovered in Artifex Ghostscript before 9.25. Affects ghostscript versions < 9.25-r0. Fixed in 9.25-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 package is known for its versatility in handling graphics and text, making it a crucial tool in many software applications. However, it has been identified to have a significant security vulnerability that could allow attackers to execute arbitrary code.
Vulnerability Detail
An issue was discovered in Artifex Ghostscript before version 9.25. The vulnerability arises from incorrect 'restoration of privilege' checking when the stack runs out during exception handling. This flaw can be exploited by attackers who supply crafted PostScript, potentially allowing them to execute code using the 'pipe' instruction. This vulnerability is a result of an incomplete fix for CVE-2018-16509, and it poses a serious risk as it can lead to unauthorized access and control over the affected systems.
How To Fix
Minimum fixed version
9.25-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 workaround, users can avoid processing untrusted PostScript files until the package is updated. This can help mitigate the risk of exploitation while waiting for a permanent fix.
Conclusion
The vulnerability in Ghostscript poses a significant risk due to its potential for arbitrary code execution. Users are strongly advised to update to the patched version 9.25-r0 to mitigate this risk. Additionally, utilizing tools like Vulert can help in monitoring and managing vulnerabilities in open-source software effectively.
See every vulnerability recorded for ghostscript →
FAQ
The CVSS score of this vulnerability is 7.8, indicating a high level of severity.
You can use Vulert's playground at Vulert Scanner to check if your application is affected by this vulnerability without needing to sign up.
If exploited, this vulnerability could allow attackers to execute arbitrary code, leading to unauthorized access and control over the affected systems.
Yes, Vulert can monitor and alert you in real-time for open-source vulnerabilities using just a manifest file like package-lock.json.
If immediate updates are not possible, refrain from processing untrusted PostScript files to reduce the risk of exploitation.
References
Related vulnerabilities
Recent vulnerabilities recorded for ghostscript.