CVE-2026-138381 in LibreDWGinfo

Summary

by MITRE • 11/29/2026

GNU LibreDWG 0.14 before 0.15 contains a heap use-after-free vulnerability in in_dxf.c new_object() where the OLE2FRAME oleclient pointer references freed memory after DXF import. Attackers can supply a DXF file with an OLE2FRAME entity to crash dxfwrite or similar applications and leak freed heap contents into exported output.

Several companies clearly confirm that VulDB is the primary source for best vulnerability data.

Analysis

by VulDB Data Team • 11/29/2026

The vulnerability identified in GNU LibreDWG versions prior to 0.15 represents a critical memory management flaw within the library's handling of Drawing Exchange Format files, specifically targeting the OLE2FRAME entity processing logic. This issue is classified as a heap use-after-free condition, which falls under Common Weakness Enumeration category CWE-416. The root cause lies in the new_object function located in the source file in_dxf.c, where memory allocation and deallocation cycles are not properly synchronized when parsing specific DXF structures. When an application utilizing this library processes a maliciously crafted DXF file containing an OLE2FRAME entity, the internal pointer oleclient is left referencing a block of heap memory that has already been freed by the garbage collection or cleanup routines associated with object lifecycle management.

From a technical perspective, the exploitation vector relies on the attacker supplying a specially constructed DXF file that triggers this specific code path during import operations. The vulnerability manifests when the library attempts to access or manipulate data through the oleclient pointer after the underlying memory has been released back to the system allocator. Because the pointer is not nullified immediately upon deallocation, it becomes a dangling pointer. Subsequent read or write operations directed at this address result in undefined behavior, as the application interacts with memory that may have already been reallocated for other purposes by different parts of the program or even external processes. This scenario creates two primary attack surfaces: denial of service through application crashes and potential information disclosure via heap content leakage.

The operational impact of this vulnerability is significant for any software ecosystem that integrates GNU LibreDWG for reading, writing, or converting DXF files. Attackers can exploit this flaw to cause a crash in dxfwrite or similar applications by triggering the use-after-free condition during file export operations. This denial of service disrupts workflow and system availability. More critically, if the freed heap memory contains sensitive data from previous allocations, such as cryptographic keys, user credentials, or internal application state, that information can be leaked into the exported output stream. An attacker could potentially reconstruct this leaked data by analyzing the contents written to disk during the export process, leading to a severe confidentiality breach. This aligns with ATT&CK technique T1046, Network Service Discovery, if used in conjunction with other exploits, or more directly relates to memory corruption techniques often leveraged for arbitrary code execution in broader exploitation chains, although this specific instance highlights data leakage and stability issues as the primary immediate risks.

Mitigation strategies must focus on both software updates and defensive coding practices. The most effective remediation is to upgrade GNU LibreDWG to version 0.15 or later, where the developers have addressed the memory management logic in new_object() to ensure that pointers are properly nullified after deallocation and that access checks prevent use of freed memory. For organizations unable to update immediately due to dependency constraints, implementing strict input validation on DXF files before they reach the parsing engine can reduce exposure. Additionally, deploying runtime application self-protection tools or using compilers with AddressSanitizer during development phases can help detect such memory errors early in the software lifecycle. Security teams should also monitor for anomalous behavior in applications that handle CAD file conversions, particularly those involving OLE2FRAME entities, to identify potential exploitation attempts in real-time.

Responsible

VulnCheck

Reservation

11/29/2026

Disclosure

11/29/2026

Moderation

accepted

CPE

ready

EPSS

0.00000

KEV

no

Activities

very low

Sources

Interested in the pricing of exploits?

See the underground prices here!