Heap-double-free vulnerability in libredwg
Summary
OSV-2022-400: Heap-double-free in dwg_free_XRECORD_private. Affects libredwg versions >= 4eadb3538aee39bf0732ee5b273f414ddafa765e. 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
libredwg is an open-source library that provides support for reading and writing DWG files, which are the native file format for AutoCAD. It is widely used in various CAD applications and provides functionality for parsing and manipulating DWG files. However, a vulnerability has been discovered in the library that can lead to a heap-double-free error.
Vulnerability Detail
The heap-double-free vulnerability in libredwg occurs in the function dwg_free_XRECORD_private. This vulnerability can be triggered when certain operations are performed on XRECORD objects in DWG files. An attacker can exploit this vulnerability by crafting a malicious DWG file that triggers the double-free error, potentially leading to a crash or arbitrary code execution. The vulnerability was reported through the OSS-Fuzz project and has been assigned the identifier OSV-2022-400.
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
At the moment, there is no known workaround for this vulnerability. It is recommended to apply the fix mentioned above as soon as possible.
Conclusion
The heap-double-free vulnerability in libredwg can be exploited by crafting a malicious DWG file, potentially leading to a crash or arbitrary code execution. It is important to update libredwg to a version that includes the fix for this vulnerability to mitigate the risk. For further support on vulnerability remediation, you can reach out to DevNack.com.
See every vulnerability recorded for libredwg →
FAQ
libredwg is an open-source library for reading and writing DWG files, the native file format for AutoCAD.
A heap-double-free vulnerability occurs when a program attempts to free a memory block that has already been freed. This can lead to memory corruption and potentially allow an attacker to execute arbitrary code or cause a crash.
An attacker can exploit this vulnerability by crafting a malicious DWG file that triggers the double-free error in libredwg. This can potentially lead to a crash or arbitrary code execution.
Yes, the vulnerability has been fixed in libredwg. Users should update to a version that includes the fix to protect against potential exploitation.
You can find more information about this vulnerability in the OSS-Fuzz report: [link to report]
References
Related vulnerabilities
Recent vulnerabilities recorded for libredwg.