CVE-2019-9770
📋 TL;DR
A heap-based buffer overflow vulnerability exists in GNU LibreDWG's dwg_decode_eed_data function when processing the y dimension. This allows attackers to execute arbitrary code or cause denial of service by providing specially crafted DWG files. Users and applications that process DWG files with affected LibreDWG versions are vulnerable.
💻 Affected Systems
- GNU LibreDWG
📦 What is this software?
Backports Sle by Opensuse
Leap by Opensuse
⚠️ Risk & Real-World Impact
Worst Case
Remote code execution with the privileges of the LibreDWG process, potentially leading to full system compromise.
Likely Case
Application crash (denial of service) when processing malicious DWG files.
If Mitigated
Limited to denial of service if memory protections like ASLR are effective.
🎯 Exploit Status
Proof of concept available in public references; exploitation requires providing a malicious DWG file.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: 0.8 or later
Vendor Advisory: https://savannah.gnu.org/bugs/index.php?55893
Restart Required: No
Instructions:
1. Update LibreDWG to version 0.8 or later. 2. Recompile any applications using LibreDWG with the updated library. 3. Test with sample DWG files to ensure functionality.
🔧 Temporary Workarounds
Disable LibreDWG processing
allTemporarily disable or block processing of DWG files through LibreDWG until patched.
Use alternative DWG processor
allSwitch to a different DWG file processing library that is not vulnerable.
🧯 If You Can't Patch
- Implement strict input validation and sanitization for DWG files before processing.
- Run LibreDWG in a sandboxed or containerized environment with limited privileges.
🔍 How to Verify
Check if Vulnerable:
Check LibreDWG version: `libredwg --version` or `dpkg -l | grep libredwg` on Debian-based systems.
Check Version:
libredwg --version
Verify Fix Applied:
Confirm version is 0.8 or later and test processing known good DWG files.
📡 Detection & Monitoring
Log Indicators:
- Application crashes or segmentation faults when processing DWG files
- Unusual memory access errors in system logs
Network Indicators:
- Unexpected uploads of DWG files to vulnerable services
SIEM Query:
source="application.log" AND ("segmentation fault" OR "buffer overflow") AND "libredwg"
🔗 References
- http://lists.opensuse.org/opensuse-security-announce/2020-01/msg00033.html
- http://lists.opensuse.org/opensuse-security-announce/2020-01/msg00045.html
- http://www.securityfocus.com/bid/107447
- https://github.com/LibreDWG/libredwg/issues/99
- https://savannah.gnu.org/bugs/index.php?55893
- http://lists.opensuse.org/opensuse-security-announce/2020-01/msg00033.html
- http://lists.opensuse.org/opensuse-security-announce/2020-01/msg00045.html
- http://www.securityfocus.com/bid/107447
- https://github.com/LibreDWG/libredwg/issues/99
- https://savannah.gnu.org/bugs/index.php?55893