Buffer Overflow Vulnerability in Ghostscript Package: CVE-2024-46952
Summary
UBUNTU-CVE-2024-46952: An issue was discovered in pdf/pdf_xref.c in Artifex Ghostscript before 10.04.0. Affects ghostscript versions < 9.55.0~dfsg1-0ubuntu5.10. Fixed in 9.55.0~dfsg1-0ubuntu5.10. 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 PDF files and is an essential tool for many applications that require document manipulation. The package is known for its versatility and is commonly integrated into various software solutions. However, it has recently been identified as vulnerable to a buffer overflow issue, which could potentially lead to severe security risks.
Vulnerability Detail
An issue was discovered in the pdf/pdf_xref.c file of Artifex Ghostscript before version 10.04.0. This vulnerability involves a buffer overflow that occurs during the handling of a PDF XRef stream, specifically related to W array values. If exploited, this could allow an attacker to execute arbitrary code, leading to unauthorized access or system compromise. The vulnerability has been assigned a CVSS score of 7.8, indicating a high severity level.
How To Fix
Minimum fixed version
9.55.0~dfsg1-0ubuntu5.10
This is the first release that contains the fix.
sudo apt-get install --only-upgrade ghostscript
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
As a temporary measure, users can limit the use of Ghostscript for processing untrusted PDF files until the package is updated. Additionally, consider using alternative PDF processing tools that do not exhibit this vulnerability.
Conclusion
The Ghostscript package has a critical vulnerability (CVE-2024-46952) that poses significant security risks. Users are strongly advised to update to the latest patched versions to protect their systems from potential exploitation. Utilizing tools like Vulert can help monitor and alert for such vulnerabilities in real-time.
See every vulnerability recorded for ghostscript →
FAQ
CVE-2024-46952 is a buffer overflow vulnerability found in the Ghostscript package, which can lead to arbitrary code execution.
You can use Vulert's playground at Vulert Scanner to check if your application is impacted by this vulnerability without any signup.
If exploited, this vulnerability could allow attackers to execute arbitrary code, potentially compromising the system and leading to data breaches.
Yes, patched versions of Ghostscript are available for both Ubuntu 22.04 LTS and 24.04 LTS. Users should update to the specified versions to mitigate the risk.
If immediate updating is not possible, avoid processing untrusted PDF files and consider using alternative tools until the update can be applied.
References
Related vulnerabilities
Recent vulnerabilities recorded for ghostscript.