Heap-double-free vulnerability in libredwg

libredwg Updated 02 Oct 2025

Summary

08/05/2022
N/A
No i
Unrated
Not published

OSV-2022-400: Heap-double-free in dwg_free_XRECORD_private. Affects libredwg versions >= 4eadb3538aee39bf0732ee5b273f414ddafa765e. No fix is published. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Your last release was probably never penetration tested Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

libredwg is an open-source library that provides support for reading and writing DWG files, which are the native file format for AutoCAD. It is widely used in various CAD applications and provides functionality for parsing and manipulating DWG files. However, a vulnerability has been discovered in the library that can lead to a heap-double-free error.

Vulnerability Detail

The heap-double-free vulnerability in libredwg occurs in the function dwg_free_XRECORD_private. This vulnerability can be triggered when certain operations are performed on XRECORD objects in DWG files. An attacker can exploit this vulnerability by crafting a malicious DWG file that triggers the double-free error, potentially leading to a crash or arbitrary code execution. The vulnerability was reported through the OSS-Fuzz project and has been assigned the identifier OSV-2022-400.

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Workaround

At the moment, there is no known workaround for this vulnerability. It is recommended to apply the fix mentioned above as soon as possible.

Conclusion

The heap-double-free vulnerability in libredwg can be exploited by crafting a malicious DWG file, potentially leading to a crash or arbitrary code execution. It is important to update libredwg to a version that includes the fix for this vulnerability to mitigate the risk. For further support on vulnerability remediation, you can reach out to DevNack.com.

See every vulnerability recorded for libredwg →

Share this vulnerability

FAQ

libredwg is an open-source library for reading and writing DWG files, the native file format for AutoCAD.

A heap-double-free vulnerability occurs when a program attempts to free a memory block that has already been freed. This can lead to memory corruption and potentially allow an attacker to execute arbitrary code or cause a crash.

An attacker can exploit this vulnerability by crafting a malicious DWG file that triggers the double-free error in libredwg. This can potentially lead to a crash or arbitrary code execution.

Yes, the vulnerability has been fixed in libredwg. Users should update to a version that includes the fix to protect against potential exploitation.

You can find more information about this vulnerability in the OSS-Fuzz report: [link to report]

Related vulnerabilities

Recent vulnerabilities recorded for libredwg.

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback