# CVE-2026-15520: GNU LibreDWG heap overflow in decompress_R2004_section

Source: https://junglewise.ai/threats/cve-2026-15520-gnu-libredwg-heap-overflow-in-decompress-r2004-section  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-07-13. Updated: 2026-07-13  
License: CC BY 4.0 with a link back

CVE-2026-15520 · Severity: medium · CVSS 5.3 · Published 2026-07-13

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.

Technologies: [Gnu LibreDWG](https://junglewise.ai/threats/technologies/libredwg). Vendors: [Gnu](https://junglewise.ai/threats/vendors/gnu).

## Quick answers

**Is CVE-2026-15520 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-15520 being exploited in the wild.

**How severe is CVE-2026-15520?** Medium severity, with a CVSS score of 5.3, published 13 July 2026.

**Which products and versions are affected?** Gnu LibreDWG 0.13.4-154-g0b573035.

**Is there a fix for CVE-2026-15520?** A patch was published on 2026-07-01: Fix committed and version 0.14.8396 released Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-15520 attacked?** It is attacked with local access, in a software library.

**Am I affected by CVE-2026-15520?** Check whether you run Gnu LibreDWG at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## 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/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/commit/3d0f9fc2eddbd6579c99af3111c37c98f03475d0)
- [https://github.com/LibreDWG/libredwg/issues/1251](https://github.com/LibreDWG/libredwg/issues/1251)
- [https://github.com/LibreDWG/libredwg/releases/tag/0.14.8396](https://github.com/LibreDWG/libredwg/releases/tag/0.14.8396)
- [https://vuldb.com/cve/CVE-2026-15520](https://vuldb.com/cve/CVE-2026-15520)
- [https://vuldb.com/submit/851190](https://vuldb.com/submit/851190)

## Related threats

- [GNU LibreDWG out-of-bounds read in AcDs decoder](https://junglewise.ai/threats/cve-2026-111167-gnu-libredwg-through-0-14-8612-contains-a-global-out-of-bounds)
- [GNU libredwg null pointer dereference in LAYER encoding](https://junglewise.ai/threats/cve-2026-90622-gnu-libredwg-null-pointer-dereference-in-layer-encoding)
- [GNU LibreDWG null pointer dereference in dwg_next_entity](https://junglewise.ai/threats/cve-2026-15184-gnu-libredwg-null-pointer-dereference-in-dwg-next-entity)
- [GNU LibreDWG heap buffer overflow in BMP Image Handler](https://junglewise.ai/threats/cve-2026-15182-gnu-libredwg-heap-buffer-overflow-in-bmp-image-handler)
- [GNU libredwg heap buffer overflow in bit_read_RC](https://junglewise.ai/threats/cve-2026-9605-gnu-libredwg-heap-buffer-overflow-in-bit-read-rc)
