CVE-2021-21898
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.
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
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 High
CVSS: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 High
CVSS: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 High
CVSS: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 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H - CVSS 3.0
- 8.8 High
CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H - CVSS 2.0
- 6.8 Medium
AV: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 High
CVSS: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 High
CVSS: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 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H - CVSS 3.0
- 8.8 High
CVSS: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
| Package | Affected | Fixed |
|---|---|---|
librecadDebian:12 |
before 2.1.3-2 | 2.1.3-2 |
librecadDebian:13 |
before 2.1.3-2 | 2.1.3-2 |
librecadDebian:14 |
before 2.1.3-2 | 2.1.3-2 |
librecadDebian: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 |
librecadDebian: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 |
librecadDebian: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 |
libdxfrwMageia:8 From an advisory covering 4 CVEs |
before 1.0.1-1.1.mga8 | 1.0.1-1.1.mga8 |
librecadUbuntu: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 |
librecadUbuntu:18.04:LTS |
before 2.1.2-1ubuntu0.1, plus listed versions 2.1.2-1 |
2.1.2-1ubuntu0.1 |
librecadUbuntu: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
| Package | Affected | Fixed |
|---|---|---|
librecadUbuntu: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 |
librecadUbuntu:22.04:LTS |
before 2.1.3-3, plus listed versions 2.1.3-1.3 |
2.1.3-3 |
librecadUbuntu: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 |
librecadUbuntu: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 |
librecadUbuntu: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 |
libdxfrwSUSE: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 |
librecadSUSE: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 |
libdxfrwopenSUSE: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 |
librecadopenSUSE: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
| Recorded | Changed | Sources |
|---|---|---|
| affected, facts | ||
| aliases | EUVD | |
| first indexed | CVE 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
talosintelligence.com/vulnerability_reports/TALOS-2021-1349
lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/RDI3HCTCACMIC7I4ILB3NRU6DCMADI5H
lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/ZTIAMP7QJDKV4ADDLR4GVVX2TXYLHVOZ
lists.debian.org/debian-lts-announce/2021/12/msg00002.html
debian.org/security/2022/dsa-5077
security.gentoo.org/glsa/202305-26
Show 27 moreShow less
nvd.nist.gov/vuln/detail/CVE-2021-21898
lists.fedoraproject.org/archives/list/[email protected]/message/RDI3HCTCACMIC7I4ILB3NRU6DCMADI5H
lists.fedoraproject.org/archives/list/[email protected]/message/ZTIAMP7QJDKV4ADDLR4GVVX2TXYLHVOZ
github.com/advisories/GHSA-6rq2-x93p-cpmq
security-tracker.debian.org/tracker/CVE-2021-21898
advisories.mageia.org/MGASA-2022-0151.html
bugs.mageia.org/show_bug.cgi?id=29720
lists.fedoraproject.org/archives/list/[email protected]/thread/RDI3HCTCACMIC7I4ILB3NRU6DCMADI5H
debian.org/lts/security/2021/dla-2838
lists.fedoraproject.org/archives/list/[email protected]/thread/VUMH3CWGVSMR2UIZEA35Q5UB7PDVVVYS
lists.opensuse.org/archives/list/[email protected]/thread/6TWLTKRSHNPCLQL7UXQSITHNYJT5XSK5
ubuntu.com/security/CVE-2021-21898
github.com/LibreCAD/libdxfrw/commit/ba3fa95648bef948e008dfbdd31a4d21badd71f0
ubuntu.com/security/notices/USN-5957-1
cve.org/CVERecord?id=CVE-2021-21898
ubuntu.com/security/CVE-2018-19105
ubuntu.com/security/CVE-2021-21899
ubuntu.com/security/CVE-2021-21900
ubuntu.com/security/CVE-2021-45341
ubuntu.com/security/CVE-2021-45342
ubuntu.com/security/CVE-2021-45343
bugzilla.suse.com/1192936
bugzilla.suse.com/1192937
bugzilla.suse.com/1192938
suse.com/security/cve/CVE-2021-21898
suse.com/security/cve/CVE-2021-21899
suse.com/security/cve/CVE-2021-21900