Null-dereference READ in gstate_clone_core in ghostscript
Summary
OSV-2022-80: Null-dereference READ in gstate_clone_core. Affected versions are not published. 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 gstate_clone_core function in Ghostscript is responsible for cloning the graphics state, which includes information about the current transformation matrix, color space, and other attributes. This vulnerability allows an attacker to trigger a null-dereference read, leading to a crash in the gstate_clone_core function.
Vulnerability Detail
The null-dereference read vulnerability in gstate_clone_core can be exploited by an attacker to cause a crash in Ghostscript. This can potentially be leveraged to execute arbitrary code or cause a denial-of-service condition. The vulnerability occurs when the gs_gsave function is called, which saves the current graphics state. During this process, the gstate_clone_core function is invoked, and if certain conditions are met, a null-dereference read occurs. This vulnerability was reported through the OSS-Fuzz project.
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
As a workaround, users can avoid triggering the vulnerable code path by modifying their usage of Ghostscript. However, this may not be a feasible solution for all cases, and it is strongly recommended to apply the official patch or upgrade to the latest version.
Conclusion
The null-dereference read vulnerability in gstate_clone_core in Ghostscript can lead to a crash and potentially allow an attacker to execute arbitrary code or cause a denial-of-service condition. It is crucial to update Ghostscript to the latest version or apply the official patch to mitigate this vulnerability. For further support and assistance with vulnerability remediation, you can 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 a crash in Ghostscript, which may allow an attacker to execute arbitrary code or cause a denial-of-service condition.
To fix this vulnerability, it is recommended to update Ghostscript to a version that includes the patch for this issue.
As a workaround, users can modify their usage of Ghostscript to avoid triggering the vulnerable code path. However, it is recommended to apply the official patch or upgrade to the latest version.
If you have discovered a new vulnerability or have additional information about this issue, you can report it to the Ghostscript development team or the OSS-Fuzz project.
References
Related vulnerabilities
Recent vulnerabilities recorded for ghostscript.