Buffer Overflow Vulnerability in Ghostscript - CVE-2025-27833
Summary
CVE-2025-27833: An issue was discovered in Artifex Ghostscript before 10.05.0. A buffer overflow occurs for a long TTF font name to pdf/pdf_fmap.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 software is crucial for applications that require document manipulation, conversion, and printing. However, it has been found to have a vulnerability that can lead to severe security issues if exploited.
Vulnerability Detail
An issue was discovered in Artifex Ghostscript before version 10.05.0, where a buffer overflow occurs when handling long TrueType font (TTF) names in the pdf/pdf_fmap.c file. This vulnerability can allow an attacker to execute arbitrary code, potentially leading to system compromise or data loss. The flaw arises from inadequate validation of input data, which can be exploited by crafting malicious font files.
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
As a temporary workaround, users can avoid processing untrusted TTF font files until the software is updated. Additionally, restricting access to the Ghostscript interpreter can help mitigate potential exploitation.
Conclusion
The CVE-2025-27833 vulnerability in Ghostscript poses a significant risk due to its potential for arbitrary code execution. Users are strongly advised to update to the latest version to protect their systems. Utilizing tools like Vulert can help monitor and alert for such vulnerabilities in real-time.
See every vulnerability recorded for ghostscript →
FAQ
CVE-2025-27833 is a buffer overflow vulnerability in Ghostscript that affects versions prior to 10.05.0, allowing potential arbitrary code execution.
You can use Vulert's playground at Vulert Scanner to check if your application is affected by this vulnerability without needing to sign up.
Exploitation of this vulnerability can lead to arbitrary code execution, which may compromise system security and lead to data loss.
Yes, a patch is available in Ghostscript version 10.05.0 and later. Users should update to this version to mitigate the risk.
If immediate updating is not possible, avoid processing untrusted TTF font files and restrict access to the Ghostscript interpreter as a temporary measure.
References
Related vulnerabilities
Recent vulnerabilities recorded for ghostscript.