Cloudanix VulnDB

CVE-2021-45844

High · 7.8

CVSS

7.8

EPSS

1.1%

Published

Jan 25, 2022

CISA due date

—

Cloudanix analysis

Schedule a fix SSVC: Track

A design file opened in an older version of FreeCAD can let an attacker run any commands they want on the computer.

Exploit Available
Exploitation
Requires User Interaction
Attacker needs
User Interaction
Complexity
Low
Impact
Full Compromise
Component
Application
Class
Command Injection
Remediation
Upgrade
Effort
Medium
Patch risk
Low

What it actually does

Improper sanitization of filenames passed to the ODA File Converter allows arbitrary operating system command execution when FreeCAD processes a maliciously named file.

Why it matters to the business

Attackers can gain full control of the workstation running the affected CAD software, enabling theft of design data, installation of persistent malware, or lateral movement inside engineering environments.

How an attack unfolds

An attacker creates a file with a filename containing shell metacharacters or command separators. When a user opens or imports the file in FreeCAD, the application invokes the ODA File Converter without sanitizing the filename, causing the injected commands to execute with the privileges of the FreeCAD process.

How to fix it

Upgrade FreeCAD to a version that properly sanitizes filenames before invoking external converters. Where an upgrade is not immediately possible, disable or remove the ODA File Converter integration and restrict opening of untrusted files.

How to confirm the fix worked

Confirm the installed FreeCAD version is newer than 0.19 and test that filenames containing shell metacharacters no longer result in command execution when the converter is invoked.

Typical attack path

  1. Attacker crafts a file whose name embeds OS command injection syntax
  2. Victim receives and opens the file in FreeCAD 0.19
  3. FreeCAD passes the unsanitized filename to the ODA File Converter
  4. Operating system executes the attacker-supplied commands
  5. Attacker obtains code execution on the local system

How to detect it

Review process creation and command-line logs on systems where FreeCAD runs; look for freecad spawning shell interpreters or external converter processes with unusual arguments containing pipes, semicolons, or redirection operators.

  • freecad.*oda_file_converter.*[;&|`$]
  • process_name:sh.*-c.*freecad
  • filename containing | or ; passed to converter

What your security team should do

  • Apply the latest FreeCAD release across all engineering workstations
  • Block execution of untrusted .FCStd and related CAD files via application allow-listing or sandboxing
  • Monitor process creation events from freecad for suspicious child processes or command lines containing shell operators

The record

Improper sanitization in the invocation of ODA File Converter from FreeCAD 0.19 allows an attacker to inject OS commands via a crafted filename.

Affected packages

Ecosystem Package Introduced Fixed
Debian:10 freecad 0 0.18~pre1+dfsg1-5+deb10u1
Debian:11 freecad 0 0.19.1+dfsg1-2+deb11u1
Debian:12 freecad 0 0.19.4+dfsg1-1
Debian:13 freecad 0 0.19.4+dfsg1-1
Debian:9 freecad 0 0.16+dfsg2-3+deb9u1
Mageia:8 freecad 0 0.18.6-1.3.mga8
Ubuntu:16.04:LTS freecad 0 No fix
Ubuntu:18.04:LTS freecad 0 No fix
Ubuntu:20.04:LTS freecad 0 No fix
Ubuntu:22.04:LTS freecad 0 No fix
Ubuntu:24.10 freecad 0 0.21.2+dfsg1-5
Ubuntu:Pro:16.04:LTS freecad 0 No fix
Ubuntu:Pro:18.04:LTS freecad 0 No fix
Ubuntu:Pro:20.04:LTS freecad 0 No fix

Related vulnerabilities