Heap-use-after-free vulnerability in ghostscript
Summary
OSV-2022-1063: Heap-use-after-free in xps_image_enum_finalize. Affects ghostscript across 2 version ranges.
>= eb9fc0106d45d1ce81ab2c4ae1a3d6e90a8c0164
>= ee290c1aebaa172c812f21024af2dbf721fa5865, < 880d248bab777e6cd7ee9cbd6e9de6563dd2078c
Fixed in 880d248bab777e6cd7ee9cbd6e9de6563dd2078c. 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 xps_image_enum_finalize function in Ghostscript, which is responsible for finalizing the enumeration of XPS images. The vulnerability allows an attacker to exploit a heap-use-after-free bug, potentially leading to arbitrary code execution or a denial-of-service condition.
Vulnerability Detail
The vulnerability originates from a heap-use-after-free bug in the xps_image_enum_finalize function. This bug can be triggered by manipulating XPS images in a specific way, causing the function to access freed memory. An attacker could craft a malicious XPS file or document that, when processed by Ghostscript, triggers the vulnerability. Successful exploitation of this vulnerability could result in arbitrary code execution or a denial-of-service attack. The vulnerability has been assigned a severity rating of HIGH.
How To Fix
Minimum fixed version
880d248bab777e6cd7ee9cbd6e9de6563dd2078c
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 recommended to apply the fix provided by updating Ghostscript to a patched version.
Conclusion
In conclusion, the heap-use-after-free vulnerability in Ghostscript's xps_image_enum_finalize function poses a significant risk to systems running an affected version of Ghostscript. It is crucial to update to a patched version of Ghostscript to mitigate the risk of arbitrary code execution or denial-of-service attacks. For further assistance with 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 allows an attacker to execute arbitrary code or cause a denial-of-service condition on systems running an affected version of Ghostscript.
Yes, the vulnerability has been fixed in commit 880d248bab777e6cd7ee9cbd6e9de6563dd2078c. Users are advised to update to a patched version of Ghostscript.
Currently, there are no known workarounds for this vulnerability. It is recommended to update to a patched version of Ghostscript.
This vulnerability has been assigned a severity rating of HIGH.
References
Related vulnerabilities
Recent vulnerabilities recorded for ghostscript.