Buffer Overflow Vulnerability in Ghostscript Package
Summary
ALPINE-CVE-2025-27834: An issue was discovered in Artifex Ghostscript before 10.05.0. A buffer overflow occurs via an oversized Type 4 function in a PDF document to pdf/pdf_func.c. Affects ghostscript versions < 10.05.0. Fixed in 10.05.0. 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, such as printing and converting files. However, it has been found to be vulnerable to a buffer overflow issue that can be exploited through specially crafted PDF documents.
Vulnerability Detail
An issue was discovered in Artifex Ghostscript before version 10.05.0. A buffer overflow occurs via an oversized Type 4 function in a PDF document, specifically in the pdf/pdf_func.c file. This vulnerability can lead to arbitrary code execution, potentially allowing an attacker to take control of the affected system, steal sensitive information, or disrupt services.
How To Fix
Minimum fixed version
10.05.0
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
If immediate patching is not feasible, consider restricting access to the Ghostscript service or disabling it until the update can be applied. Additionally, avoid opening untrusted PDF documents that may exploit this vulnerability.
Conclusion
The buffer overflow vulnerability in the Ghostscript package poses significant security risks. It is crucial for users to update to the latest patched version to mitigate these risks. By following the recommended steps and utilizing tools like Vulert, users can ensure their systems remain secure against such vulnerabilities.
See every vulnerability recorded for ghostscript →
FAQ
A buffer overflow vulnerability occurs when a program writes more data to a buffer than it can hold, which can lead to unpredictable behavior, including crashes and security breaches.
You can check if your application is affected by using Vulert, which monitors and alerts for open-source vulnerabilities in real-time. Visit Vulert Scanner to analyze your manifest file.
The risks include potential arbitrary code execution, system compromise, data theft, and service disruption, which can have severe implications for security and privacy.
Yes, you can restrict access to the Ghostscript service and avoid opening untrusted PDF documents until the patch is applied.
You can find more information about Ghostscript on its official website or its documentation, which provides insights into its features and usage.
References
Related vulnerabilities
Recent vulnerabilities recorded for ghostscript.