Critical Remote Code Execution Vulnerability in Ghostscript Package
Summary
ALPINE-CVE-2023-43115: In Artifex Ghostscript through 10.01.2, gdevijs.c in GhostPDL can lead to remote code execution via crafted PostScript documents because they can switch to the IJS device, or change the IjsServer parameter, after SAFER h... Affects ghostscript versions < 10.02.0-r0. Fixed in 10.02.0-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 essential for applications that require document manipulation, conversion, and printing. However, a recent vulnerability has been identified that could allow attackers to execute arbitrary code remotely, posing a significant risk to systems utilizing this package.
Vulnerability Detail
In Artifex Ghostscript versions up to 10.01.2, a vulnerability exists in the gdevijs.c file within GhostPDL. This flaw can lead to remote code execution when crafted PostScript documents are processed. Attackers can exploit this vulnerability by switching to the IJS device or altering the IjsServer parameter after the SAFER security mechanism has been activated. This risk is exacerbated by the fact that the IJS server can be specified on the Ghostscript command line, necessitating the execution of a command to start the IJS server.
How To Fix
Minimum fixed version
10.02.0-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 documents or disable the IJS device if it is not required for their operations. This can help mitigate the risk until the package is updated.
Conclusion
The vulnerability in the Ghostscript package poses a serious risk of remote code execution through crafted PostScript documents. It is crucial for users to update to the patched version to safeguard their systems. Until an update can be applied, implementing workarounds can help mitigate potential threats.
See every vulnerability recorded for ghostscript →
FAQ
The CVSS score of this vulnerability is 8.8, indicating a high severity level.
You can use Vulert's playground at Vulert Scanner to check if your application is affected by this vulnerability without needing to sign up.
Ghostscript versions up to 10.01.2 are affected by this vulnerability.
If you cannot update immediately, consider avoiding the use of untrusted PostScript documents and disabling the IJS device as a temporary measure.
Yes, this vulnerability has been publicly disclosed and is documented as CVE-2023-43115.
References
Related vulnerabilities
Recent vulnerabilities recorded for ghostscript.