UNKNOWN WRITE Vulnerability in ghostscript
Summary
OSV-2022-655: UNKNOWN WRITE in pdfi_repair_file. Affects ghostscript versions >= db0f98bdf4c75486c47df4d5e9919420638f7f2c, < dd907d6d9e772f91a9b652c3e765439f38e7147d. Fixed in dd907d6d9e772f91a9b652c3e765439f38e7147d. 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 manipulating PDF documents. This vulnerability affects the ghostscript package and can lead to a crash due to an unknown write operation. The vulnerability can be triggered while repairing a PDF file, specifically during the reading of the cross-reference (xref) table and dictionary.
Vulnerability Detail
The vulnerability originates from a write operation that is not properly handled within the pdfi_repair_file function of ghostscript. When processing a PDF file, the function encounters an unknown write operation, resulting in a crash. This vulnerability can be exploited by an attacker to cause a denial-of-service (DoS) condition or potentially execute arbitrary code. The issue has been assigned a high severity level.
How To Fix
Minimum fixed version
dd907d6d9e772f91a9b652c3e765439f38e7147d
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, no specific workaround has been provided for this vulnerability. It is advised to apply the fix mentioned above as soon as possible.
Conclusion
In conclusion, the UNKNOWN WRITE vulnerability in ghostscript can lead to a crash and potential security risks. It is crucial to update the ghostscript package to a version that includes the fix mentioned in this report. For further support on vulnerability remediation, you can reach out to DevNack.com.
See every vulnerability recorded for ghostscript →
FAQ
This vulnerability can lead to a crash in ghostscript, potentially causing a denial-of-service (DoS) condition or enabling an attacker to execute arbitrary code.
You can use the Vulert Playground at Vulert Scanner to check if your application is affected by this vulnerability. Simply upload your package-lock.json file and Vulert will provide real-time monitoring and alerts for open-source vulnerabilities.
At the time of this report, no known exploits for this vulnerability have been disclosed. However, it is crucial to apply the fix promptly to mitigate any potential risks.
While there are alternative PDF processing libraries available, it is important to note that the vulnerability specifically affects the ghostscript package. It is recommended to update to a fixed version of ghostscript rather than switching to a different library.
You can find more information about this vulnerability, including its source and fix details, in the Open Source Vulnerability database entry at https://github.com/google/oss-fuzz-vulns/blob/main/vulns/ghostscript/OSV-2022-655.yaml
References
Related vulnerabilities
Recent vulnerabilities recorded for ghostscript.