Every CVE Search/ Get API key

CVE-2021-21898

A code execution vulnerability exists in the dwgCompressor::decompress18() functionality of...

8.8 HighFix available

A code execution vulnerability exists in the dwgCompressor::decompress18() functionality of LibreCad libdxfrw 2.2.0-rc2-19-ge02f3580. A specially-crafted .dwg file can lead to an out-of-bounds write. An attacker can provide a malicious file to trigger this vulnerability.

Attack profile

How easy it is to exploit

Attack vector
Network
Complexity
Low
Privileges needed
None
User interaction
Required

What an attacker can affect

Confidentiality
High
Integrity
High
Availability
High

Exploit likelihood

2.60%Up 1.9 points since Nov 20, 2021
90%50%10%1%

What each source reports

CVE List Score used 8.8

A code execution vulnerability exists in the dwgCompressor::decompress18() functionality of LibreCad libdxfrw 2.2.0-rc2-19-ge02f3580. A specially-crafted .dwg file can lead to an out-of-bounds write. An attacker can provide a malicious file to trigger this vulnerability.

Record
CVE-2021-21898
CVSS 3.0
8.8 HighCVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Weakness
CWE-119
Updated
2026-11-02
EUVDEUVD-2021-9069 8.8

A code execution vulnerability exists in the dwgCompressor::decompress18() functionality of LibreCad libdxfrw 2.2.0-rc2-19-ge02f3580. A specially-crafted .dwg file can lead to an out-of-bounds write. An attacker can provide a malicious file to trigger this vulnerability.

Record
EUVD-2021-9069
CVSS 3.0
8.8 HighCVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Updated
2026-11-03
GitHub AdvisoriesGHSA-6rq2-x93p-cpmq 8.8

A code execution vulnerability exists in the dwgCompressor::decompress18() functionality of...

A code execution vulnerability exists in the dwgCompressor::decompress18() functionality of LibreCad libdxfrw 2.2.0-rc2-19-ge02f3580. A specially-crafted .dwg file can lead to an out-of-bounds write. An attacker can provide a malicious file to trigger this vulnerability.

Record
GHSA-6rq2-x93p-cpmq
CVSS 3.1
8.8 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Weakness
CWE-119, CWE-787
Updated
2026-11-02
NVD 8.8

A code execution vulnerability exists in the dwgCompressor::decompress18() functionality of LibreCad libdxfrw 2.2.0-rc2-19-ge02f3580. A specially-crafted .dwg file can lead to an out-of-bounds write. An attacker can provide a malicious file to trigger this vulnerability.

Record
CVE-2021-21898
CVSS 3.1
8.8 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
CVSS 3.0
8.8 HighCVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
CVSS 2.0
6.8 MediumAV:N/AC:M/Au:N/C:P/I:P/A:P
Weakness
CWE-119, CWE-787
Updated
2026-11-02
OSV 8.8

A code execution vulnerability exists in the dwgCompressor::decompress18() functionality of LibreCad libdxfrw 2.2.0-rc2-19-ge02f3580. A specially-crafted .dwg file can lead to an out-of-bounds write. An attacker can provide a malicious file to trigger this vulnerability.

Record
CVE-2021-21898
CVSS 3.1
8.8 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Updated
2026-11-02
OSVDEBIAN-CVE-2021-21898 8.8

A code execution vulnerability exists in the dwgCompressor::decompress18() functionality of LibreCad libdxfrw 2.2.0-rc2-19-ge02f3580. A specially-crafted .dwg file can lead to an out-of-bounds write. An attacker can provide a malicious file to trigger this vulnerability.

Record
DEBIAN-CVE-2021-21898
CVSS 3.1
8.8 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Updated
2026-11-02
Show 5 moreShow less
OSVUBUNTU-CVE-2021-21898 8.8

A code execution vulnerability exists in the dwgCompressor::decompress18() functionality of LibreCad libdxfrw 2.2.0-rc2-19-ge02f3580. A specially-crafted .dwg file can lead to an out-of-bounds write. An attacker can provide a malicious file to trigger this vulnerability.

Record
UBUNTU-CVE-2021-21898
CVSS 3.1
8.8 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
CVSS 3.0
8.8 HighCVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Updated
2026-11-02
OSVMGASA-2022-0151 No score

Updated libdxfrw packages fix security vulnerability

A code execution vulnerability exists in the dwgCompressor::decompress18() functionality of LibreCad libdxfrw 2.2.0-rc2-19-ge02f3580. A specially-crafted .dwg file can lead to an out-of-bounds write. An attacker can provide a malicious file to trigger this vulnerability. (CVE-2021-21898)

A code execution vulnerability exists in the dwgCompressor::copyCompBytes21 functionality of LibreCad libdxfrw 2.2.0-rc2-19-ge02f3580. A specially-crafted .dwg file can lead to a heap buffer overflow. An attacker can provide a malicious file to trigger this vulnerability. (CVE-2021-21899)

A code execution vulnerability exists in the dxfRW::processLType() functionality of LibreCad libdxfrw 2.2.0-rc2-19-ge02f3580. A specially-crafted .dxf file can lead to a use-after-free vulnerability. An attacker can provide a malicious file to trigger this vulnerability. (CVE-2021-21900)

In LibreCAD 2.2.0, a NULL pointer dereference in the HATCH handling of libdxfrw allows an attacker to crash the application using a crafted DXF document. (CVE-2021-45343)

Record
MGASA-2022-0151
Updated
2026-11-02
OSVopenSUSE-SU-2022:0067-1 No score

Security update for libdxfrw, librecad

This update for libdxfrw, librecad fixes the following issues:

  • Update to version 1.0.1+git.20220109:

    • fixed ambiguous error for DRW_Dimension::parseDwg()
    • fixed enless while()-loop for pre 2004 versions
    • dwgReader::readDwgObjects() stop reading after 1st error
    • dwgReader::readDwgEntities() stop reading after 1st error
    • replace ENTRY_PARSE macro with template method
    • remove unused DRW_Class::parseCode() method
    • protect vector<>.reserve() calls
    • Added NULL check for hatch code 93
    • Fix bounds check in DRW_LWPolyline
    • fix, check maxClassNum for valid value
    • fixed wrong 2010+ check for 64-bit size
    • Set compiler warnings on by default, because makes harder for bugs to go undetected. modified: CMakeLists.txt
    • Fixed fall through and other warnings (#54)
    • fix 'Vertex ID' printout
  • Update to version 1.0.1+git.20211110:

    • fixed heap use after free vulnerability CVE-2021-21900 (boo#1192938)
    • minor improvements to dwg2dxf, formatting and message output on success
    • fixed heap buffer overflow vulnerability CVE-2021-21899 (boo#1192937)
    • dwg2dxf - enable debug output of libdxfrw by command line switch
    • fixed out-of-bounds write vulnerability CVE-2021-21898 (boo#1192936)
    • fixed please note section formatting
    • updated README.md for LibreCAD_3 branch and sf.net successor
    • fixed LibreCAD 2 issue #1371, read failed with binary DXF
    • Use ununordered_map instead of map
    • manual merge changes from LibreCAD2
    • and much more
  • Update to version 1.0.1+git.20200429:

    • Fix includes install dir
    • Export target as libdxfrw::libdxfrw to keep consistency with Conan packages
    • Add archive destination in install
    • Install DXFRW::dxfrw target
    • Remove duplicate target properties
    • Remove version from pkg-config file
    • Let CMake handle C++11 compiler definition
    • Change minimal required CMake version to 3.0
    • cmake: add doc target
    • README.md: fix typo
    • cmake: generate and install pkgconfig
    • cmake: add one for dwg2dxf
    • cmake: set library VERSIONs
    • cmake: use GNUInstallDirs
  • Update to version 0.6.3+git.20190501:

    • Add build status and update example link
    • Add Travis-CI script
    • [#10] Fix compilation on GCC
    • Fix bugs with .dwg import of TEXT and MTEXT entities
    • This was unnecessary
    • Link libdxfrw against libstdc++
    • Return an error when the file ends prematurely
    • Add version getter
    • Fix polyline 2d/3d write
    • Initialize return buffers in GetRawChar8 et al.
  • update to 2.2.0-rc3

    • major release
    • DWG imports are more reliable now
    • and a lot more of bugfixes and improvements
Record
openSUSE-SU-2022:0067-1
Updated
2026-11-02
OSVopenSUSE-SU-2024:11697-1 No score

libdxfrw-devel-1.0.1+git.20211110-1.1 on GA media

These are all security issues fixed in the libdxfrw-devel-1.0.1+git.20211110-1.1 package on the GA media of openSUSE Tumbleweed.

Record
openSUSE-SU-2024:11697-1
Updated
2026-11-02
OSVUSN-5957-1 No score

librecad vulnerabilities

Cody Sixteen discovered that LibreCAD incorrectly handled memory when parsing DXF files. An attacker could use this issue to cause LibreCAD to crash, leading to a denial of service. This issue only affected Ubuntu 16.04 ESM and Ubuntu 18.04 ESM. (CVE-2018-19105)

Lilith of Cisco Talos discovered that LibreCAD incorrectly handled memory when parsing DWG files. An attacker could use this issue to cause LibreCAD to crash, leading to a denial of service, or possibly execute arbitrary code. (CVE-2021-21898, CVE-2021-21899)

Lilith of Cisco Talos discovered that LibreCAD incorrectly handled memory when parsing DRW files. An attacker could use this issue to cause LibreCAD to crash, leading to a denial of service, or possibly execute arbitrary code. (CVE-2021-21900)

Albin Eldstål-Ahrens discovered that LibreCAD incorrectly handled memory when parsing JWW files. An attacker could use this issue to cause LibreCAD to crash, leading to a denial of service, or possibly execute arbitrary code. (CVE-2021-45341, CVE-2021-45342)

Albin Eldstål-Ahrens discovered that LibreCAD incorrectly handled memory when parsing DXF files. An attacker could use this issue to cause LibreCAD to crash, leading to a denial of service. (CVE-2021-45343)

Record
USN-5957-1
Updated
2026-11-02

Affected products

Affected packages

Affected packages
PackageAffectedFixed
librecad
Debian:12
before 2.1.3-2
2.1.3-2
librecad
Debian:13
before 2.1.3-2
2.1.3-2
librecad
Debian:14
before 2.1.3-2
2.1.3-2
librecad
Debian:9
From an advisory covering 3 CVEs
before 2.1.2-1+deb9u2, plus listed versions
2.1.2-12.1.2-1+deb9u1
2.1.2-1+deb9u2
librecad
Debian:10
From an advisory covering 6 CVEs
before 2.1.3-1.2+deb10u1, plus listed versions
2.1.3-1.2
2.1.3-1.2+deb10u1
librecad
Debian:11
From an advisory covering 6 CVEs
before 2.1.3-1.3+deb11u1, plus listed versions
2.1.3-1.3
2.1.3-1.3+deb11u1
libdxfrw
Mageia:8
From an advisory covering 4 CVEs
before 1.0.1-1.1.mga8
1.0.1-1.1.mga8
librecad
Ubuntu:Pro:16.04:LTS
before 2.0.9-2ubuntu0.1~esm1, plus listed versions
2.0.4-1build12.0.8-12.0.9-2
2.0.9-2ubuntu0.1~esm1
librecad
Ubuntu:18.04:LTS
before 2.1.2-1ubuntu0.1, plus listed versions
2.1.2-1
2.1.2-1ubuntu0.1
librecad
Ubuntu:Pro:18.04:LTS
before 2.1.2-1ubuntu0.1~esm1, plus listed versions
2.1.2-1
2.1.2-1ubuntu0.1~esm1
Show 9 moreShow less
Affected packages
PackageAffectedFixed
librecad
Ubuntu:20.04:LTS
before 2.1.3-1.2+deb10u1build0.20.04.1, plus listed versions
2.1.3-1.22.1.3-1.2build1
2.1.3-1.2+deb10u1build0.20.04.1
librecad
Ubuntu:22.04:LTS
before 2.1.3-3, plus listed versions
2.1.3-1.3
2.1.3-3
librecad
Ubuntu:Pro:16.04:LTS
From an advisory covering 7 CVEs
before 2.0.9-2ubuntu0.1~esm1, plus listed versions
2.0.4-1build12.0.8-12.0.9-2
2.0.9-2ubuntu0.1~esm1
librecad
Ubuntu:Pro:18.04:LTS
From an advisory covering 7 CVEs
before 2.1.2-1ubuntu0.1~esm1, plus listed versions
2.1.2-1
2.1.2-1ubuntu0.1~esm1
librecad
Ubuntu:20.04:LTS
From an advisory covering 7 CVEs
before 2.1.3-1.2+deb10u1build0.20.04.1, plus listed versions
2.1.3-1.22.1.3-1.2build1
2.1.3-1.2+deb10u1build0.20.04.1
libdxfrw
SUSE:Package Hub 15 SP3
From an advisory covering 3 CVEs
before 1.0.1+git.20220109-bp153.2.3.1
1.0.1+git.20220109-bp153.2.3.1
librecad
SUSE:Package Hub 15 SP3
From an advisory covering 3 CVEs
before 2.2.0~rc3-bp153.2.3.1
2.2.0~rc3-bp153.2.3.1
libdxfrw
openSUSE:Leap 15.3
From an advisory covering 3 CVEs
before 1.0.1+git.20220109-bp153.2.3.1
1.0.1+git.20220109-bp153.2.3.1
librecad
openSUSE:Leap 15.3
From an advisory covering 3 CVEs
before 2.2.0~rc3-bp153.2.3.1
2.2.0~rc3-bp153.2.3.1

History

History
RecordedChangedSources
affected, facts
aliasesEUVD
first indexedCVE List, GitHub Advisories, NVD, OSV

Dates are when Every CVE recorded each change. Upstream dates may differ.

In short

CVE-2021-21898 is a high vulnerability (CVSS 8.8) in Librecad Libdxfrw, published November 19, 2021. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 2.60%, the 85th percentile. Fixed in librecad 2.1.3-2.

References

Show 27 moreShow less
MoveEnter Open