CVE-2021-45341

8.8 HIGH

📋 TL;DR

A buffer overflow vulnerability in LibreCAD's jwwlib component allows remote code execution when processing malicious JWW documents. Attackers can exploit this by tricking users into opening specially crafted CAD files. Users of LibreCAD 2.2.0-rc3 and older versions are affected.

💻 Affected Systems

Products:
  • LibreCAD
Versions: 2.2.0-rc3 and older
Operating Systems: Linux, Windows, macOS
Default Config Vulnerable: ⚠️ Yes
Notes: All installations of affected versions are vulnerable when processing JWW files.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete system compromise with attacker gaining full control of the victim's machine, data theft, and lateral movement within the network.

🟠

Likely Case

Local privilege escalation leading to unauthorized access to sensitive files and system resources on the affected workstation.

🟢

If Mitigated

Limited impact with proper application sandboxing and user privilege restrictions preventing full system compromise.

🌐 Internet-Facing: MEDIUM
🏢 Internal Only: HIGH

🎯 Exploit Status

Public PoC: ⚠️ Yes
Weaponized: LIKELY
Unauthenticated Exploit: ⚠️ Yes
Complexity: LOW

Exploitation requires user interaction to open malicious file, but no authentication is needed.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: LibreCAD 2.2.0 and later

Vendor Advisory: https://github.com/LibreCAD/LibreCAD/issues/1462

Restart Required: Yes

Instructions:

1. Download latest LibreCAD version from official website. 2. Uninstall old version. 3. Install new version. 4. Restart system.

🔧 Temporary Workarounds

Disable JWW file processing

all

Remove or restrict JWW file association with LibreCAD

On Linux: sudo rm /usr/share/mime/packages/librecad.xml
On Windows: reg delete HKEY_CLASSES_ROOT\.jww /f

Application sandboxing

linux

Run LibreCAD in restricted environment

firejail --private librecad
bwrap --unshare-all --share-net --ro-bind /usr /usr --ro-bind /etc /etc --bind $HOME $HOME librecad

🧯 If You Can't Patch

  • Implement strict file type filtering to block JWW files at email gateways and web proxies
  • Educate users to never open CAD files from untrusted sources and implement application whitelisting

🔍 How to Verify

Check if Vulnerable:

Check LibreCAD version: Help → About LibreCAD. If version is 2.2.0-rc3 or older, system is vulnerable.

Check Version:

librecad --version

Verify Fix Applied:

After update, verify version is 2.2.0 or newer in Help → About dialog.

📡 Detection & Monitoring

Log Indicators:

  • LibreCAD crash logs with jwwlib/CDataMoji references
  • Unexpected process spawning from LibreCAD

Network Indicators:

  • Downloads of JWW files from untrusted sources
  • Outbound connections from LibreCAD process

SIEM Query:

process_name:"librecad" AND (event_type:crash OR parent_process_name:"librecad")

🔗 References

📤 Share & Export