Heap-use-after-free vulnerability in ghostscript
Summary
OSV-2023-34: Heap-use-after-free in gc_trace. Affects ghostscript versions >= 85277d1dd24c5eebf4579ae22c54fb9b25683c9d. No fix is published. 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 affects the gc_trace function in Ghostscript, which is responsible for garbage collection. This vulnerability can lead to a heap-use-after-free condition, potentially allowing an attacker to execute arbitrary code or cause a denial of service.
Vulnerability Detail
The vulnerability originates from a heap-use-after-free condition in the gc_trace function. This can occur when the function attempts to access memory that has already been freed. An attacker can exploit this vulnerability by crafting a malicious PostScript or PDF file that triggers the gc_trace function, leading to arbitrary code execution or a crash. The severity of this vulnerability is rated as HIGH.
How To Fix
No fixed version is published for this vulnerability.
Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →
Workaround
At the moment, there is no known workaround for this vulnerability. It is crucial to apply the official patch or update the Ghostscript package to mitigate the risk.
Conclusion
The heap-use-after-free vulnerability in Ghostscript's gc_trace function poses a significant risk, potentially allowing arbitrary code execution or denial of service. It is crucial to update the Ghostscript package to a patched version or apply the official fix to mitigate this vulnerability. For further support on vulnerability remediation, 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 allow an attacker to execute arbitrary code or cause a denial of service by exploiting the heap-use-after-free condition in the gc_trace function.
To fix this vulnerability, update the Ghostscript package to a version that includes the patch for this issue. Follow the official instructions for installation.
Currently, there is no known workaround for this vulnerability. It is essential to apply the official patch or update the Ghostscript package.
For more information about this vulnerability, refer to the provided OSS-Fuzz report and the source link in the database-specific section of the vulnerability details.
References
Related vulnerabilities
Recent vulnerabilities recorded for ghostscript.