Buffer Overflow Vulnerability in Ghostscript Package: CVE-2025-27833
Summary
UBUNTU-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.02.1~dfsg1-0ubuntu7.5. Fixed in 10.02.1~dfsg1-0ubuntu7.5. 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 and conversion. However, it has been found to be vulnerable to a buffer overflow issue that can be exploited under certain conditions.
Vulnerability Detail
An issue was discovered in Artifex Ghostscript before version 10.05.0, where a buffer overflow occurs when processing a long TrueType Font (TTF) name in the pdf/pdf_fmap.c file. This vulnerability can lead to potential code execution, allowing an attacker to manipulate the application’s behavior, which may result in unauthorized access to system resources or data corruption.
How To Fix
Minimum fixed version
10.02.1~dfsg1-0ubuntu7.5
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 workaround, you can avoid processing TTF font names that are excessively long until the package is updated. This may involve validating font names before processing them in your application.
Conclusion
The Ghostscript package has a critical vulnerability (CVE-2025-27833) that can lead to serious security risks. It is essential to update to the latest patched version to protect your system from potential exploitation. Regular monitoring and validation of software packages can help maintain security.
See every vulnerability recorded for ghostscript →
FAQ
CVE-2025-27833 is a vulnerability in the Ghostscript package that allows for a buffer overflow due to long TTF font names.
You can check if your application is affected by using the Vulert playground at Vulert Scanner, which allows you to monitor vulnerabilities in real-time.
Exploitation of this vulnerability can lead to code execution, unauthorized access, and potential data corruption.
Yes, the patched version of Ghostscript is 10.02.1~dfsg1-0ubuntu7.5. Updating to this version will resolve the vulnerability.
If immediate updating is not possible, validate TTF font names to ensure they are not excessively long to mitigate the risk temporarily.
References
Related vulnerabilities
Recent vulnerabilities recorded for ghostscript.