---
id: "CVE-2026-62254"
kind: "vulnerability"
aliases: ["CVE-2026-62254"]
title: "LibreDWG: crafted DWG file makes parser loop and stall"
severity: "medium"
cvss: 5.5
epss: null
exploited: false
status: "open"
category: "package"
products: []
ecosystems: []
tags: ["cad", "dwg-parsing", "libredwg", "package"]
not_affected_if: ["trusted-input-only", "version-0.14-or-later"]
published_at: "2026-10-30T21:17:13+00:00"
first_seen_at: "2026-10-30T21:25:53+00:00"
updated_at: "2026-10-30T21:26:52+00:00"
sources: [{"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-62254", "first_seen_at": "2026-10-30T21:25:53+00:00"}]
---

# LibreDWG: crafted DWG file makes parser loop and stall

LibreDWG is a C library for reading and writing DWG CAD files. A specially crafted R13-R2000 DWG file forces an unbounded allocation loop in the class decoder, so parsing it causes denial of service.

_Summary, check and fix written by a model from the sources; labelled as such._

## How to check

- Check the LibreDWG version in use, for example with `dwg2dxf --version` if the tool is installed.
- Search your code and dependencies for the LibreDWG library and confirm whether it parses untrusted DWG files.

## Fix

- LibreDWG `0.14` (the sources say the issue is fixed in version 0.14; earlier versions are affected).

## Timeline

- 2026-10-30T21:25:53+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-62254

## From the sources

LibreDWG is a free C library to read and write DWG files. Prior to 0.14, a specially crafted R13-R2000 DWG can trigger algorithmic resource exhaustion in `decode_R13_R2000` in `src/decode.c`. The class-decoding loop performs `realloc` on every iteration without a sanity check on `num_classes`. Manipulating that field forces an extremely slow allocation loop and denial of service when the file is parsed. Running the parser in a sandbox with memory limits is a workaround rather than a remediation. This issue is fixed in version 0.14.

---

_Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai_
