CVE-2021-45844

7.8 HIGH

📋 TL;DR

CVE-2021-45844 is an OS command injection vulnerability in FreeCAD's ODA File Converter that allows attackers to execute arbitrary commands on the system by using a specially crafted filename. This affects FreeCAD users who process untrusted CAD files. The vulnerability stems from improper input sanitization when invoking external converters.

💻 Affected Systems

Products:
  • FreeCAD
Versions: FreeCAD 0.19 and earlier versions
Operating Systems: Windows, Linux, macOS
Default Config Vulnerable: ⚠️ Yes
Notes: Vulnerability requires the ODA File Converter to be installed and configured in FreeCAD. Exploitation requires user interaction to open a malicious file.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Full system compromise with arbitrary command execution as the user running FreeCAD, potentially leading to data theft, ransomware deployment, or persistent backdoor installation.

🟠

Likely Case

Local privilege escalation or execution of malicious commands when processing untrusted CAD files, potentially compromising the user's workstation.

🟢

If Mitigated

Limited impact if running with minimal privileges, in sandboxed environments, or with strict file validation controls.

🌐 Internet-Facing: LOW - FreeCAD is typically desktop software, not directly internet-facing.
🏢 Internal Only: MEDIUM - Risk exists when processing untrusted CAD files from external sources within organizational networks.

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: UNKNOWN
Unauthenticated Exploit: ✅ No
Complexity: MEDIUM

Exploitation requires user interaction to open a malicious CAD file. No publicly available exploit code has been identified.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: FreeCAD 0.20 and later

Vendor Advisory: https://tracker.freecad.org/view.php?id=4809

Restart Required: Yes

Instructions:

1. Download FreeCAD 0.20 or later from freecad.org. 2. Uninstall previous version. 3. Install new version. 4. Restart system.

🔧 Temporary Workarounds

Disable ODA File Converter

all

Remove or disable the ODA File Converter plugin to prevent exploitation

Remove ODA File Converter from FreeCAD's plugin directory or disable via preferences

Restrict File Processing

all

Only process CAD files from trusted sources

🧯 If You Can't Patch

  • Run FreeCAD with minimal user privileges (non-admin/non-root account)
  • Use application sandboxing or virtualization to isolate FreeCAD from critical systems

🔍 How to Verify

Check if Vulnerable:

Check FreeCAD version: if version is 0.19 or earlier, system is vulnerable

Check Version:

On Linux: freecad --version | grep -i version; On Windows: Check Help > About in FreeCAD GUI

Verify Fix Applied:

Verify FreeCAD version is 0.20 or later

📡 Detection & Monitoring

Log Indicators:

  • Unusual process spawns from FreeCAD
  • Suspicious command execution patterns
  • ODA File Converter errors with unusual filenames

Network Indicators:

  • Unexpected outbound connections from FreeCAD process

SIEM Query:

Process creation where parent_process contains 'freecad' and command_line contains suspicious characters (;, &, |, $, etc.)

🔗 References

📤 Share & Export