Heap Buffer Overflow Vulnerability in libredwg: Critical Security Risk

libredwg Updated 11 Jun 2026

Summary

09/06/2026
MEDIUM
Yes i
Medium
Not published

OSV-2026-892: Heap-buffer-overflow in decode_R13_RNUMBER. Affects libredwg across 2 version ranges.

< 0156c780ac6b109d191975041def0a258b0b75fc >= c89f635505028a11fadb9a0904d2c3bd44f1b23a, < 360ed38a2c4f948689e5f9851a744016928becdc

Fixed in 360ed38a2c4f948689e5f9851a744016928becdc. 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 MarkAI Find prospects already talking about the problem you solve AI watches the communities your customers use to find qualified prospects, then alerts you when a conversation is worth joining. See MarkAI

Background

libredwg is an open-source library designed for reading and writing DWG files, which are commonly used in CAD software. The library allows developers to manipulate DWG files programmatically, providing essential functionalities for applications that require CAD data processing. However, like many libraries that handle complex file formats, libredwg is susceptible to vulnerabilities that can lead to severe security risks, including memory corruption and potential code execution.

Vulnerability Detail

The vulnerability identified in libredwg is a heap buffer overflow occurring in the function decode_R13_RNUMBER. This issue arises from improper handling of memory allocation, allowing an attacker to read beyond the allocated buffer. The potential ramifications of this vulnerability include application crashes, data corruption, and exploitation by malicious actors to execute arbitrary code. The vulnerability was reported through OSS-Fuzz, highlighting its critical nature and the need for immediate attention.

How To Fix

Minimum fixed version

360ed38a2c4f948689e5f9851a744016928becdc

This is the first release that contains the fix.

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

As a temporary workaround, users can avoid using the specific function decode_R13_RNUMBER until the library is updated. Additionally, implementing input validation to ensure that data passed to the library is sanitized may help mitigate the risk of exploitation.

Conclusion

The heap buffer overflow vulnerability in libredwg poses a significant security risk that can lead to severe consequences if not addressed. Users are strongly encouraged to update to the patched versions of the library to ensure the integrity and security of their applications. Utilizing tools like Vulert can help in monitoring and managing open-source vulnerabilities effectively.

See every vulnerability recorded for libredwg →

Share this vulnerability

FAQ

A heap buffer overflow occurs when a program writes more data to a buffer located on the heap than it can hold, potentially leading to memory corruption and security vulnerabilities.

You can use Vulert, which monitors open-source vulnerabilities in your software. By simply providing a manifest file like package-lock.json, Vulert can alert you in real-time about any vulnerabilities, including this one.

The risks include application crashes, data corruption, and the potential for attackers to execute arbitrary code, which can lead to unauthorized access or data breaches.

Yes, you can temporarily avoid using the affected function decode_R13_RNUMBER and implement input validation to reduce the risk of exploitation.

Detailed information can be found in the OSS-Fuzz report and the GitHub repository for libredwg, where the vulnerability was documented.

Related vulnerabilities

Recent vulnerabilities recorded for libredwg.

How To Fix

Minimum fixed version

360ed38a2c4f948689e5f9851a744016928becdc

This is the first release that contains the fix.

Tip — Not sure which version your app runs? Vulert can match this fix to it. 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