Heap-use-after-free vulnerability in ghostscript
Summary
OSV-2023-1008: Heap-use-after-free in gx_image_enum_begin. Affects ghostscript versions >= 021dcfe4fa68c3b5a3bc12a64d4acfa702309a7d, < d778b932be407d02690cd93df98fb1f891fde289. Fixed in d778b932be407d02690cd93df98fb1f891fde289. 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. This vulnerability affects the gx_image_enum_begin function in Ghostscript, which is responsible for enumerating images in a document. The vulnerability allows an attacker to exploit a heap-use-after-free bug, potentially leading to arbitrary code execution or a denial of service.
Vulnerability Detail
The vulnerability originates from a heap-use-after-free bug in the gx_image_enum_begin function. This bug occurs when the function attempts to access a memory region that has already been freed. An attacker can exploit this vulnerability by crafting a malicious document that triggers the bug, potentially leading to arbitrary code execution or a denial of service. The vulnerability has been assigned a high severity rating.
How To Fix
Minimum fixed version
d778b932be407d02690cd93df98fb1f891fde289
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
At the moment, there is no known workaround for this vulnerability. It is advised to update Ghostscript to a patched version as soon as possible.
Conclusion
The heap-use-after-free vulnerability in Ghostscript's gx_image_enum_begin function poses a significant risk, potentially allowing arbitrary code execution or a denial of service. It is crucial to update Ghostscript to a patched version to mitigate this vulnerability. For further support and assistance 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 documents.
This vulnerability can potentially allow an attacker to execute arbitrary code or cause a denial of service by exploiting the heap-use-after-free bug in Ghostscript.
To fix this vulnerability, it is recommended to update Ghostscript to a version that includes the patch for this issue.
Currently, there is no known workaround for this vulnerability. It is advised to update Ghostscript to a patched version.
You can find more information about this vulnerability in the OSS-Fuzz report linked in the vulnerability details.
References
Related vulnerabilities
Recent vulnerabilities recorded for ghostscript.
Follow Vulert in Google
Get more Vulert vulnerability and dependency-security updates in Google Search and AI results.