Skip to main content

GNU LibreDWG CVE-2026-9502

| EUVDEUVD-2026-31740 LOW
Heap-based Buffer Overflow (CWE-122)
2026-05-25 VulDB GHSA-mxm7-v873-f6m3
1.9
CVSS 4.0 · Vendor: VulDB
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Obtain local low-privilege system access
  2. Delivery
    Stage or deliver malicious R2004 DWG file
  3. Exploit
    Invoke dwgread against crafted DWG file
  4. Execution
    Trigger unvalidated comp_offset/comp_bytes in decompress_R2004_section
  5. Persist
    Write past heap buffer boundary
  6. Impact
    Corrupt heap metadata or adjacent data

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Heap buffer bounds checking
MITRE ATT&CK

1 technique across 1 tactic: Execution

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Exploitation requires local system access with at least low-privilege user credentials (CVSS PR:L, AV:L) on a host where GNU LibreDWG 0.1 through 0.14 is installed and the dwgread utility is accessible. The vulnerable code path is triggered only when processing a DWG file containing an R2004-format section with invalid decompression parameters. No network-facing exposure exists - remote unauthenticated exploitation is not possible per the CVSS vector. SSVC confirms automatable:no, ruling out mass network-scanning exploitation. Exploitation is further limited by the partial-only impact scope (VC:L/VI:L/VA:L with SC:N/SI:N/SA:N), meaning no scope change beyond the vulnerable component itself. The realistic risk surface is environments where untrusted DWG files can be fed to the dwgread utility by a local, potentially malicious user - for example, multi-user Linux workstations or automated build and conversion pipelines ingesting external CAD files.

Impact

Despite the presence of a public POC, multiple signals converge on low real-world risk. The CVSS 4.0 score of 1.9 reflects a local-only attack vector (AV:L), low complexity (AC:L), no additional attack requirements (AT:N), low privileges required (PR:L), and only partial impact across confidentiality, integrity, and availability (VC:L/VI:L/VA:L with no scope change). EPSS at 0.01% places this in the 2nd percentile of exploitation likelihood. SSVC aligns: exploitation status is 'none', automatable is 'no', and technical impact is 'partial'. The vulnerability is not listed in CISA KEV. The E:P modifier in the CVSS vector confirms a POC exists, but POC availability and active exploitation are distinct signals - there is no evidence this is being exploited in the wild. The primary limiting factor is the local attack vector: an adversary must already have local system access with at least low-privilege credentials, making this nearly irrelevant in cloud or network-threat models. Organizations where untrusted users can invoke dwgread against untrusted DWG files (e.g., shared Linux workstations, build pipelines processing external files) carry the most realistic exposure.

Exploit ScenarioDerived

A local user with standard (low-privilege) access on a system running LibreDWG 0.14 or earlier crafts or downloads a malicious DWG file containing an R2004 section with invalid comp_bytes and comp_offset values - a sample is publicly available at https://github.com/HackC0der/CVE-Repos/blob/main/libredwg/libredwg_6d6a339_heap_overflow_decompress_R2004_section.dwg. The user passes this file to the dwgread utility, triggering decompress_R2004_section to write beyond the bounds of the dec output buffer on the heap. Depending on heap layout, this could overwrite adjacent metadata or data structures, potentially leading to a crash or, in a targeted scenario, partial memory disclosure or corruption.

Monitor Track and reassess. Why: LOW severity (CVSS 0.1-3.9).
Patch available 0.0% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Jun 08, 2026

Heap-based buffer overflow in GNU LibreDWG's dwgread utility (versions 0.1 through 0.14) allows a local attacker with low privileges to corrupt heap memory by supplying a specially crafted R2004-format DWG file. The vulnerable function decompress_R2004_section in src/decode.c fails to validate decompression offset and size parameters before writing, enabling out-of-bounds heap writes with partial confidentiality, integrity, and availability impact. Publicly available exploit code exists as a crafted DWG file; however, no active exploitation is confirmed (not in CISA KEV), EPSS is 0.01% (2nd percentile), and the local-only attack vector sharply constrains real-world risk.

RemediationAI

Apply the upstream patch available at https://github.com/LibreDWG/libredwg/commit/e501cb9926c1e9a07a0d1cc997f3e69e9be801c9, which adds out-of-bounds validation to decompress_R2004_section. Note that this is an upstream commit fix; a specific tagged release version incorporating this fix is not independently confirmed from available data - verify with the LibreDWG project at https://github.com/LibreDWG/libredwg whether a patched release has been published. As a compensating control where patching is not immediately possible, restrict invocation of the dwgread utility to trusted users only (e.g., via filesystem permissions or sudo policy), and prohibit processing of DWG files from untrusted or external sources. If LibreDWG is used as a library dependency within a larger application, consider sandboxing the parsing process (e.g., via seccomp or a dedicated low-privilege subprocess) to limit heap corruption impact - note this adds deployment complexity.

Affected VersionsENISA

libredwg 0.2
libredwg 0.6
libredwg 0.14
libredwg 0.9
libredwg 0.8
libredwg 0.1
libredwg 0.11
libredwg 0.12
libredwg 0.3
libredwg 0.7
libredwg 0.5
libredwg 0.4
libredwg 0.13
libredwg 0.10

Affected Packages

euvd libredwg no fix

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

GNU LibreDWG is an open-source C library (CPE: cpe:2.3:a:gnu:libredwg:*:*:*:*:*:*:*:*) for reading and writing AutoCAD's native DWG binary format. The R2004 section of the DWG format uses a custom compression scheme. The function decompress_R2004_section in src/decode.c processes comp_bytes and comp_offset fields from the file during decompression. Prior to the patch, no bounds validation was performed on these fields before using them to compute copy destinations and lengths within the dec output buffer - a textbook CWE-122 (Heap-based Buffer Overflow) root cause. The commit diff confirms the fix adds explicit guards: verifying that end does not exceed dec->size, that pos minus comp_offset does not underflow or exceed dec->size, and that comp_offset itself does not exceed dec->size, returning DWG_ERR_VALUEOUTOFBOUNDS on violation.

Know when Libredwg gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (VulDB) PRIMARY 1.9 LOW
CVSS:4.0/AV:L/AC:L/AT:N/PR:L/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N/E:P

Primary rating from Vendor (VulDB) · only source for this CVE.

CVSS VectorVendor: VulDB

Attack Vector
Local
Attack Complexity
Low
Attack Requirements
None
Privileges Required
Low
User Interaction
None
Vulnerable system: Confidentiality
Low
Vulnerable system: Integrity
Low
Vulnerable system: Availability
Low
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

Lifecycle Timeline

2
Severity Changed
May 26, 2026 - 20:07 NVD
MEDIUM LOW
CVSS changed
May 26, 2026 - 20:07 NVD
5.3 (MEDIUM) 1.9 (LOW)

DescriptionCVE.org

A vulnerability was identified in GNU LibreDWG up to 0.14. This affects the function decompress_R2004_section of the file src/decode.c of the component Dwgread Utility. The manipulation leads to heap-based buffer overflow. The attack must be carried out locally. The exploit is publicly available and might be used. The identifier of the patch is e501cb9926c1e9a07a0d1cc997f3e69e9be801c9. To fix this issue, it is recommended to deploy a patch.

Threat Intelligence Overview

EPSS Score
0.0%
Top 98% exploitable
Exploit
POC
Public exploit code exists
Data Quality
7 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment GitHub VulDB

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity LOW
CISA KEV No
Public POC Yes
EPSS 0.0%
Patch available Yes
Active threat No
Deciding rule
LOW severity (CVSS 0.1-3.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Defer
Exploitation
None
System Exposure· derived
Small
Automatable
No
Human Impact· derived
Low
Technical Impact
Partial

Priority Score

30
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +10
PoC: +20
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

A buffer overflow occurs when a program writes more data to a memory buffer than it was allocated to hold, causing the excess data to spill into adjacent memory regions.

A heap overflow occurs when a program writes data beyond the bounds of a buffer allocated in the heap memory region.

CVE-2022-35164 CRITICAL POC
9.8 Aug 18

LibreDWG v0.12.4.4608 & commit f2dea29 was discovered to contain a heap use-after-free via bit_copy_chain. Rated critica

CVE-2021-28237 CRITICAL POC
9.8 Dec 02

LibreDWG v0.12.3 was discovered to contain a heap-buffer overflow via decode_preR13. Rated critical severity (CVSS 9.8),

CVE-2020-21844 HIGH POC
8.8 May 17

GNU LibreDWG 0.10 is affected by: memcpy-param-overlap. Rated high severity (CVSS 8.8), this vulnerability is remotely e

CVE-2019-9775 CRITICAL POC
9.1 Mar 14

An issue was discovered in GNU LibreDWG 0.7 and 0.7.1645. Rated critical severity (CVSS 9.1), this vulnerability is remo

CVE-2019-9774 CRITICAL POC
9.1 Mar 14

An issue was discovered in GNU LibreDWG 0.7 and 0.7.1645. Rated critical severity (CVSS 9.1), this vulnerability is remo

CVE-2020-21833 HIGH POC
8.8 May 17

A heap based buffer overflow vulnerability exits in GNU LibreDWG 0.10 via: read_2004_section_classes ../../src/decode.c:

CVE-2020-21841 HIGH POC
8.8 May 17

A heap based buffer overflow vulnerability exits in GNU LibreDWG 0.10 via bit_read_B ../../src/bits.c:135. Rated high se

CVE-2020-21840 HIGH POC
8.8 May 17

A heap based buffer overflow vulnerability exits in GNU LibreDWG 0.10 via bit_search_sentinel ../../src/bits.c:1985. Rat

CVE-2020-21838 HIGH POC
8.8 May 17

A heap based buffer overflow vulnerability exits in GNU LibreDWG 0.10 via: read_2004_section_appinfo ../../src/decode.c:

CVE-2020-21843 HIGH POC
8.8 May 17

A heap based buffer overflow vulnerability exits in GNU LibreDWG 0.10 via bit_read_RC ../../src/bits.c:318. Rated high s

CVE-2020-21842 HIGH POC
8.8 May 17

A heap based buffer overflow vulnerability exists in GNU LibreDWG 0.10 via read_2004_section_revhistory ../../src/decode

CVE-2020-21832 HIGH POC
8.8 May 17

A heap based buffer overflow vulnerability exists in GNU LibreDWG 0.10 via read_2004_compressed_section ../../src/decode

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy