Global-buffer-overflow in get_unpack_proc in ghostscript
Summary
OSV-2022-1121: Global-buffer-overflow in get_unpack_proc. Affects ghostscript across 2 version ranges.
>= eb9fc0106d45d1ce81ab2c4ae1a3d6e90a8c0164
>= ee290c1aebaa172c812f21024af2dbf721fa5865, < fa394e79b7e2228aacc4c8366cd41c3b2d6b05f5
Fixed in fa394e79b7e2228aacc4c8366cd41c3b2d6b05f5. 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 documents. The vulnerability in the get_unpack_proc function allows for a global buffer overflow, potentially leading to remote code execution or denial of service attacks.
Vulnerability Detail
The get_unpack_proc function in Ghostscript is vulnerable to a global buffer overflow. This can be triggered by a specially crafted PostScript or PDF file, causing the application to crash or potentially execute arbitrary code. The vulnerability was discovered through the OSS-Fuzz project and has been assigned the identifier OSV-2022-1121.
How To Fix
Minimum fixed version
fa394e79b7e2228aacc4c8366cd41c3b2d6b05f5
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 temporary workaround, users can disable the processing of untrusted PostScript or PDF files in Ghostscript. This can be done by configuring the application to only process files from trusted sources or by using a different PDF rendering library until the vulnerability is patched.
Conclusion
In conclusion, the global-buffer-overflow vulnerability in the get_unpack_proc function of Ghostscript can have severe consequences, including remote code execution and denial of service attacks. It is crucial for users to update their installations to the latest version that includes the necessary fix. Additionally, implementing temporary workarounds, such as restricting the processing of untrusted files, can provide some protection until the patch is applied. For further assistance or support in addressing this vulnerability, 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 documents.
This vulnerability can lead to remote code execution or denial of service attacks. An attacker can exploit the buffer overflow to execute arbitrary code or crash the application.
This vulnerability was discovered through the OSS-Fuzz project, which performs continuous fuzz testing on open-source software to uncover security vulnerabilities.
Yes, a fix for this vulnerability has been released in the latest version of Ghostscript. Users are advised to update their installations to ensure they are protected.
Yes, users can temporarily disable the processing of untrusted PostScript or PDF files in Ghostscript as a workaround. This can help mitigate the risk until the vulnerability is patched.
References
Related vulnerabilities
Recent vulnerabilities recorded for ghostscript.