CVE-2022-33032
📋 TL;DR
LibreDWG v0.12.4.4608 contains a heap buffer overflow vulnerability in the decode_preR13_section_hdr function. This allows attackers to execute arbitrary code or cause denial of service by processing specially crafted DWG files. Anyone using LibreDWG to parse DWG files is affected.
💻 Affected Systems
- LibreDWG
📦 What is this software?
⚠️ Risk & Real-World Impact
Worst Case
Remote code execution leading to complete system compromise if LibreDWG processes malicious files from untrusted sources.
Likely Case
Application crash (denial of service) when processing malformed DWG files.
If Mitigated
Limited impact if file processing is restricted to trusted sources and proper sandboxing is implemented.
🎯 Exploit Status
Exploitation requires crafting a malicious DWG file and getting it processed by LibreDGW. No public exploit code is available.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: v0.12.4.4609 and later
Vendor Advisory: https://github.com/LibreDWG/libredwg/issues/488
Restart Required: Yes
Instructions:
1. Check current LibreDWG version. 2. Update to v0.12.4.4609 or later via package manager or source compilation. 3. Restart any services using LibreDWG.
🔧 Temporary Workarounds
Restrict file processing
allOnly allow LibreDWG to process DWG files from trusted sources
Sandbox LibreDWG processes
linuxRun LibreDWG in isolated containers or restricted environments
docker run --read-only --cap-drop=ALL -v /trusted/files:/input:ro libredwg
🧯 If You Can't Patch
- Disable LibreDWG processing of untrusted DWG files
- Implement strict input validation for DWG files before processing
🔍 How to Verify
Check if Vulnerable:
Check LibreDWG version: dwgread --version or check package manager
Check Version:
dwgread --version 2>&1 | grep -i version
Verify Fix Applied:
Verify version is v0.12.4.4609 or later and test with known problematic DWG files
📡 Detection & Monitoring
Log Indicators:
- Segmentation fault or crash logs from LibreDWG processes
- Unexpected process termination when processing DWG files
Network Indicators:
- Unusual network connections after DWG file processing
- Outbound connections from LibreDWG processes
SIEM Query:
process_name:"dwgread" AND (event_type:"crash" OR exit_code:139)