CVE-2026-62250

LibreDWG: unbounded allocation in pre-R13 DWG entity decoding

Published Oct 30, 2026 CVSS 3.1 · 5.5 Medium EPSS < 1% KEV · Not listed
Description
LibreDWG is a free C library to read and write DWG files. Prior to 0.14.8413, a crafted pre-R13 DWG can make `decode_preR13_entities()` in `src/decode.c` enter a nonterminating loop that allocates a new object each iteration. `decode_preR13` in `src/decode_r11.c` computes `size` from the raw file-controlled `entities_start` and `entities_end` header bounds; the callee clamps `end` to `dat->size` but never recalculates `size`. At `end` of input, `bit_read_RC` and `bit_read_RS` stop advancing `dat->byte`, the overflow guard fails because `end` equals `dat->size`, and the no-advance check compares against `oldpos` saved before the loop instead of the previous iteration. This leaves repeated allocation of `dwg->object` entries until allocation fails or the process is OOM-killed, not merely a constant-memory CPU hang. The defect remains after the clamping and no-progress changes associated with the earlier issue 1131. Applications and tools calling `dwg_read_file()` on untrusted files, including `dwg2dxf`, `dwgread` and `dwg2svg`, can suffer denial of service when a user or automated pipeline opens a malformed file; no attacker credentials are required. This issue is fixed in repository nightly version 0.14.8413.

Analysis

AI-generated

Technical impact

LibreDWG is a free C library for reading and writing DWG files. The vulnerability resides in the pre‑R13 entity decoding routine, where a crafted DWG file causes the decode_preR13_entities() function to enter a non‑terminating loop that repeatedly allocates memory for new DWG objects until the process exhausts available memory or is killed. This results in a denial of service that can affect any application or tool calling dwg_read_file(), such as dwg2dxf, dwgread, or dwg2svg. The weakness is an unbounded memory allocation and infinite loop, corresponding to CWE‑400 and CWE‑835. Based on the description, it is inferred that no attacker credentials are required and that the vulnerability can be triggered simply by supplying a malicious DWG file to the library.

Affected Systems

The LibreDWG library, identified as LibreDWG:libredwg, is affected. All releases prior to version 0.14.8413 contain the flaw. This includes the open‑source versions distributed with various CAD tools and automation pipelines that rely on the library to process DWG files.

Risk and Exploitability

The CVSS score of 5.5 indicates a moderate severity, and although the EPSS score is not available, the lack of a KEV listing suggests that the vulnerability may not yet be widely exploited. The attack vector is driven by providing a malicious DWG file to any process that uses the library; no elevated privileges are required, making local or remote exploitation straightforward. If a service accepts files over a network, the risk extends to remote denial of service. The vulnerability does not lead to code execution or privilege escalation, but it can render dependent applications unusable by exhausting available memory.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade LibreDWG to version 0.14.8413 or newer to apply the fix.
  • Implement sandboxing or execute the file‑reading component in a restricted process when handling untrusted DWG files.
  • Validate DWG files against a trusted schema or perform size checks before passing them to the library.

Generated by OpenCVE AI on October 30, 2026 at 21:36 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
First Time appeared Libredwg
Libredwg libredwg
Vendors & Products Libredwg
Libredwg libredwg
Type Values Removed Values Added
Description LibreDWG is a free C library to read and write DWG files. Prior to 0.14.8413, a crafted pre-R13 DWG can make `decode_preR13_entities()` in `src/decode.c` enter a nonterminating loop that allocates a new object each iteration. `decode_preR13` in `src/decode_r11.c` computes `size` from the raw file-controlled `entities_start` and `entities_end` header bounds; the callee clamps `end` to `dat->size` but never recalculates `size`. At `end` of input, `bit_read_RC` and `bit_read_RS` stop advancing `dat->byte`, the overflow guard fails because `end` equals `dat->size`, and the no-advance check compares against `oldpos` saved before the loop instead of the previous iteration. This leaves repeated allocation of `dwg->object` entries until allocation fails or the process is OOM-killed, not merely a constant-memory CPU hang. The defect remains after the clamping and no-progress changes associated with the earlier issue 1131. Applications and tools calling `dwg_read_file()` on untrusted files, including `dwg2dxf`, `dwgread` and `dwg2svg`, can suffer denial of service when a user or automated pipeline opens a malformed file; no attacker credentials are required. This issue is fixed in repository nightly version 0.14.8413.
Title LibreDWG: unbounded allocation in pre-R13 DWG entity decoding
Weaknesses CWE-400
CWE-835
References
Metrics cvssV3_1

{'score': 5.5, 'vector': 'CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H'}

Weaknesses
  • CWE-400

    Uncontrolled Resource Consumption

  • CWE-835

    Loop with Unreachable Exit Condition ('Infinite Loop')

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Oct 30, 2026, 10:12 PM
Reserved
Jul 13, 2026, 5:09 PM
Status
Deferred
Published
Oct 30, 2026, 9:17 PM
Modified
Nov 2, 2026, 7:35 PM