Executive brief
GNU LibreDWG is a library used to read and write DWG files, which are the native format for AutoCAD software. A vulnerability in the way the library handles compressed data in older DWG files could allow an attacker to cause a system crash or potentially execute unauthorized code. This occurs when the software processes a specially crafted DWG file, impacting the reliability of applications that rely on this library for CAD data conversion.
Technical details
A heap-based buffer overflow exists in GNU LibreDWG version 0.13.4-154-g0b573035 within the decompress_R2004_section function in src/decode.c. The root cause is an incorrect assignment in read_2004_compressed_section where the dec.size variable is overwritten with a smaller per-section value, causing bit_chain_alloc to shrink the buffer while the logical stream tracking continues to use the original larger size. An attacker with local access can provide a crafted DWG file to trigger an out-of-bounds write. This issue has been addressed in version 0.14.8396 by ensuring dec.size remains pinned to the true allocation size.
Affected products
- GNU LibreDWG 0.13.4-154-g0b573035
Timeline
- 2026-04-29: disclosed: Issue reported on GitHub
- 2026-07-01: patched: Fix committed and version 0.14.8396 released
- 2026-07-13: advisory: CVE published
References
- https://github.com/HackC0der/CVE-Repos/blob/main/libredwg/libredwg_0b57303_heap_overflow_decompress_R2004_section.dwg
- https://github.com/LibreDWG/libredwg/commit/3d0f9fc2eddbd6579c99af3111c37c98f03475d0
- https://github.com/LibreDWG/libredwg/issues/1251
- https://github.com/LibreDWG/libredwg/releases/tag/0.14.8396
- https://vuldb.com/cve/CVE-2026-15520
- https://vuldb.com/submit/851190