Executive brief
GNU LibreDWG is a software library used to read and write DWG files, which are standard files for computer-aided design (CAD). A security flaw in how the library handles BMP images within these files could allow an attacker to crash the application or potentially execute unauthorized code. To exploit this, an attacker would need to convince a user to process a specially crafted, malicious CAD file on their local system.
Technical details
A heap-based buffer overflow exists in GNU LibreDWG versions up to 0.13.4 within the dwg_bmp function in src/dwg.c. The vulnerability is caused by improper overflow checks when processing BMP thumbnails, specifically failing to account for bytes already consumed by header entries and potential unsigned integer underflows during size calculations. An attacker can exploit this by providing a malformed DWG file to a tool using the library (such as dwgbmp), leading to an out-of-bounds read or write. The issue was addressed in version 0.14 by implementing stricter bounds checking and guarding against underflow conditions.
Affected products
- GNU LibreDWG up to 0.13.4
Timeline
- 2026-04-22: disclosed: Initial issue report on GitHub (#1249)
- 2026-04-29: other: Follow-up issue report indicating incomplete fix (#1252)
- 2026-07-09: advisory: CVE published to NVD
- 2026-07-09: patched: Version 0.14 released with fix
References
- https://github.com/HackC0der/CVE-Repos/blob/main/libredwg/libredwg_0b57303_heap_overflow_decode_R13_R2000.dwg
- https://github.com/LibreDWG/libredwg/commit/18fd542bb4d5ccedf9de12052bf50068b2b26f06
- https://github.com/LibreDWG/libredwg/issues/1249
- https://github.com/LibreDWG/libredwg/issues/1252
- https://github.com/LibreDWG/libredwg/releases/tag/0.14
- https://vuldb.com/cve/CVE-2026-15182
- https://vuldb.com/submit/851191