CVE-2023-36272
📋 TL;DR
LibreDWG versions 0.10 through 0.12.5 contain a heap buffer overflow vulnerability in the bit_utf8_to_TU function. This allows attackers to execute arbitrary code or cause denial of service by processing specially crafted DWG files. Users and applications that parse DWG files with vulnerable LibreDWG versions are affected.
💻 Affected Systems
- LibreDWG
📦 What is this software?
⚠️ Risk & Real-World Impact
Worst Case
Remote code execution leading to complete system compromise, data theft, or ransomware deployment.
Likely Case
Application crash (denial of service) when processing malicious DWG files, potentially disrupting workflows.
If Mitigated
Limited to application crash if memory protections (ASLR, DEP) are effective, with no privilege escalation.
🎯 Exploit Status
Exploitation requires user interaction to open a malicious DWG file. No public exploit code is available as of analysis.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: 0.12.6 and later
Vendor Advisory: https://github.com/LibreDWG/libredwg/commit/c1ed1d91e28a6ddc7a9b5479d4795d58fb6be0ca
Restart Required: No
Instructions:
1. Update LibreDWG to version 0.12.6 or later. 2. Recompile any applications using LibreDWG with the updated library. 3. Replace old library files with patched versions.
🔧 Temporary Workarounds
Disable DWG file processing
allTemporarily block or quarantine DWG files from untrusted sources.
Use alternative DWG parsers
allSwitch to other DWG processing libraries like Teigha or Open Design Alliance.
🧯 If You Can't Patch
- Implement strict file upload validation to reject suspicious DWG files.
- Run LibreDWG in sandboxed/containerized environments with limited privileges.
🔍 How to Verify
Check if Vulnerable:
Check LibreDWG version: `dwgread --version` or examine library version in applications.
Check Version:
dwgread --version
Verify Fix Applied:
Confirm version is 0.12.6+ and test with known safe DWG files to ensure functionality.
📡 Detection & Monitoring
Log Indicators:
- Application crashes with segmentation faults in bits.c
- Memory corruption errors in system logs
Network Indicators:
- Unusual file uploads of DWG files to web applications
SIEM Query:
source="application.log" AND "segmentation fault" AND "libredwg"