Global-buffer-overflow in search_table_1 in ghostscript
Summary
OSV-2021-1690: Global-buffer-overflow in search_table_1. Affects ghostscript versions >= 75fbddf52051987287e62d13c659eb73ba16982f, < 82b097fe8e76ea92f69ef483f45c0cf491a98d43. Fixed in 82b097fe8e76ea92f69ef483f45c0cf491a98d43. 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 open-source interpreter for the PostScript language and the PDF file format. It is widely used for rendering and converting PDF files. The vulnerability in question, identified as OSV-2021-1690, is a global buffer overflow in the search_table_1 function of Ghostscript. This vulnerability can be triggered by a specially crafted PDF file, potentially leading to arbitrary code execution or a denial of service attack.
Vulnerability Detail
The vulnerability arises due to a global buffer overflow in the search_table_1 function of Ghostscript. This function is called during the interpretation of a PDF file, specifically when processing a stream operator. By exploiting this vulnerability, an attacker can overwrite adjacent memory locations, potentially leading to arbitrary code execution or a denial of service attack. The vulnerability was reported through the OSS-Fuzz project and has been assigned the ID OSV-2021-1690.
How To Fix
Minimum fixed version
82b097fe8e76ea92f69ef483f45c0cf491a98d43
This is the first release that contains the fix.
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
As a workaround, users can exercise caution when opening PDF files from untrusted sources. Avoiding the use of Ghostscript to process PDF files from unknown or potentially malicious sources can help mitigate the risk of exploitation.
Conclusion
In conclusion, the vulnerability OSV-2021-1690 in Ghostscript can be exploited through a global buffer overflow in the search_table_1 function. It is crucial to update Ghostscript to a version that includes the fix or apply the recommended workaround. For further assistance and support in vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for ghostscript →
FAQ
Ghostscript is an open-source interpreter for the PostScript language and the PDF file format. It is commonly used for rendering and converting PDF files.
This vulnerability can potentially allow an attacker to execute arbitrary code or cause a denial of service attack by exploiting a global buffer overflow in Ghostscript.
To fix this vulnerability, update your Ghostscript installation to a version that includes the fix. The vulnerability was addressed in commit 82b097fe8e76ea92f69ef483f45c0cf491a98d43 or a subsequent release.
As a workaround, exercise caution when opening PDF files from untrusted sources and avoid using Ghostscript to process PDF files from unknown or potentially malicious sources.
You can find more information about this vulnerability in the OSS-Fuzz report: [link to report].
References
Related vulnerabilities
Recent vulnerabilities recorded for ghostscript.