CVE-2019-9770

7.5 HIGH

📋 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

Products:
  • GNU LibreDWG
Versions: 0.7 through 0.7.1645
Operating Systems: All platforms running LibreDWG
Default Config Vulnerable: ⚠️ Yes
Notes: Any application or service using LibreDWG to process DWG files is vulnerable.

📦 What is this software?

⚠️ 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.

🌐 Internet-Facing: MEDIUM - Exploitation requires processing attacker-controlled DWG files, which could occur through file uploads or web services.
🏢 Internal Only: LOW - Requires local file processing or internal network file sharing exploitation.

🎯 Exploit Status

Public PoC: ⚠️ Yes
Weaponized: LIKELY
Unauthenticated Exploit: ⚠️ Yes
Complexity: LOW

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

all

Temporarily disable or block processing of DWG files through LibreDWG until patched.

Use alternative DWG processor

all

Switch 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

📤 Share & Export