Path Traversal Vulnerability in Artifex Ghostscript
Summary
CVE-2024-33870: An issue was discovered in Artifex Ghostscript before 10.03.1. Affects ghostscript across 2 version ranges.
< 10.04.0-r0
< 865d8905b3fdb3a0fabe3628a67bad634cf88ba9
Fixed in 10.04.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
Artifex Ghostscript is an open-source interpreter for the PostScript language and PDF file format. It is widely used for rendering and manipulating documents. The vulnerability in question allows for path traversal, which means an attacker can access arbitrary files by exploiting a flaw in the handling of crafted PostScript documents. This vulnerability affects versions of Ghostscript before 10.03.1.
Vulnerability Detail
The path traversal vulnerability arises when a PostScript document contains a specially crafted path that can bypass the permitted paths and access files outside of the intended directory. By transforming the path using relative directory traversal techniques, such as '../../foo' to './../../foo', an attacker can gain unauthorized access to sensitive files. This can lead to information disclosure, unauthorized modification, or even remote code execution if the accessed files are executable.
How To Fix
Minimum fixed version
10.04.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
There is no known workaround for this vulnerability. It is essential to apply the official patch or update to a fixed version of Ghostscript as soon as possible.
Conclusion
The path traversal vulnerability in Artifex Ghostscript allows attackers to access arbitrary files by exploiting a flaw in the handling of crafted PostScript documents. To mitigate this risk, it is crucial to update Ghostscript to version 10.03.1 or later. Failure to address this vulnerability could result in unauthorized access, information disclosure, or even remote code execution.
See every vulnerability recorded for ghostscript →
FAQ
A path traversal vulnerability allows an attacker to access files or directories outside of the intended scope by manipulating file paths.
An attacker can exploit this vulnerability by crafting a malicious PostScript document that contains a specially crafted path to access sensitive files.
The consequences of this vulnerability include unauthorized access to sensitive files, information disclosure, unauthorized modification, and potential remote code execution.
Yes, updating Ghostscript to version 10.03.1 or later will fix this vulnerability.
There are no known workarounds for this vulnerability. Applying the official patch or updating to a fixed version is the recommended solution.
References
Related vulnerabilities
Recent vulnerabilities recorded for ghostscript.