Heap-buffer-overflow in libredwg: dxf_fixup_string
Summary
OSV-2023-777: Heap-buffer-overflow in dxf_fixup_string. Affects libredwg versions >= 0ad719902273a8a4d79c026d01ef2057c173579b, < b01634c896c29bb3a778daeef9e13ef115995610. Fixed in b01634c896c29bb3a778daeef9e13ef115995610. 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 functionality for reading and writing DWG and DXF files. It is commonly used in CAD software and other applications that work with these file formats. The library allows developers to parse and manipulate the contents of DWG and DXF files. However, a vulnerability has been discovered in the library that can lead to a heap-buffer-overflow when processing certain DXF files.
Vulnerability Detail
The vulnerability in libredwg arises from a heap-buffer-overflow issue in the function dxf_fixup_string. This vulnerability can be triggered when processing DXF files, potentially leading to a crash or arbitrary code execution. The specific crash type is a heap-buffer-overflow read of 1 byte. The vulnerable code path involves dxf_fixup_string, dxf_header_write, and dwg_write_dxf functions. The issue has been reported and tracked in the OSS-Fuzz project, with more details available in the provided link. The severity of this vulnerability is considered medium.
How To Fix
Minimum fixed version
b01634c896c29bb3a778daeef9e13ef115995610
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 the libredwg developers.
Conclusion
In conclusion, libredwg is susceptible to a heap-buffer-overflow vulnerability when processing DXF files. The developers have released a fix for this issue, which should be applied by updating to a patched version of the library. For further support on vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for libredwg →
FAQ
libredwg is an open-source library used for reading and writing DWG and DXF files.
This vulnerability can potentially lead to a crash or arbitrary code execution when processing certain DXF files using libredwg.
The severity of this vulnerability is considered medium.
Yes, the developers of libredwg have addressed the issue in the codebase. It is recommended to update to a version that includes the fix.
At the moment, there is no known workaround. Applying the provided fix is the recommended solution.
References
Related vulnerabilities
Recent vulnerabilities recorded for libredwg.