Heap-use-after-free vulnerability in ghostscript
Summary
OSV-2022-73: Heap-use-after-free in pdfi_cspace_free_callback. Affects ghostscript versions >= 82b097fe8e76ea92f69ef483f45c0cf491a98d43. 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 PDF files. The vulnerability in question, identified as OSV-2022-73, affects the Ghostscript package and can lead to a heap-use-after-free condition.
Vulnerability Detail
The heap-use-after-free vulnerability occurs in the pdfi_cspace_free_callback function of Ghostscript. This vulnerability can be triggered by a specific sequence of actions, resulting in a read of 8 bytes from a freed heap memory block. An attacker could potentially exploit this vulnerability to execute arbitrary code or cause a denial-of-service condition.
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
No specific workaround has been provided for this vulnerability.
Conclusion
The heap-use-after-free vulnerability in Ghostscript can have severe consequences, including arbitrary code execution or denial-of-service. It is crucial to update the Ghostscript package to a patched version to mitigate the risk. For further support on vulnerability remediation, you can reach out to DevNack.com.
See every vulnerability recorded for ghostscript →
FAQ
This vulnerability can potentially allow an attacker to execute arbitrary code or cause a denial-of-service condition.
You can use Vulert's playground (https://vulert.com/scanner) to check if your application is affected by this vulnerability. Vulert analyzes your package-lock.json file and provides real-time alerts for open-source vulnerabilities.
At the time of this report, there is no known public exploit for this vulnerability.
The recommended mitigation is to update the Ghostscript package to a patched version that includes the necessary fixes.
You can find more information about this vulnerability in the OSS-Fuzz report: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=43904
References
Related vulnerabilities
Recent vulnerabilities recorded for ghostscript.