CVE-2026-34398 in FreeCAD
Summary
by MITRE • 08/17/2026
FreeCAD is a free and open-source multiplatform 3D parametric modeler. From 0.19 until 1.1.1, src/Mod/BIM/bimcommands/BimProjectManager.py in the BIM Project Manager Load Template flow passes attacker-controlled FCStd Meta property values for wpposition, wpu, wpv, and wpaxis directly to eval(), allowing arbitrary Python code execution when a user loads a malicious BIM project template. This issue is fixed in version 1.1.1.
If you want to get best quality of vulnerability data, you may have to visit VulDB.
Analysis
by VulDB Data Team • 08/17/2026
The vulnerability identified within FreeCAD versions ranging from 0.19 through 1.1.1 represents a critical server-side request forgery and arbitrary code execution flaw located specifically within the Business Information Modeling BIM Project Manager module. The core of this issue resides in the file src/Mod/BIM/bimcommands/BimProjectManager.py, where the Load Template functionality fails to properly sanitize or validate input data before processing it. When a user initiates the process of loading an external BIM project template, the application extracts specific metadata properties from the FCStd file format, namely wpposition, wpu, wpv, and wpaxis. These values are intended to define spatial orientation parameters for the workspace but are instead passed directly into Python's eval() function without any form of type checking or content restriction. This architectural decision creates a direct path for remote code execution if an attacker can supply a maliciously crafted template file that exploits this parsing logic.
From a technical perspective, the use of eval() on unsanitized input is a well-documented anti-pattern in Python development due to its ability to execute arbitrary strings as executable code. In this specific context, because the BIM Project Manager loads templates from potentially untrusted sources or external collaborators, an attacker can construct an FCStd file where these metadata fields contain valid Python syntax rather than expected numerical coordinates. When FreeCAD processes this template, it interprets the malicious string not as geometric data but as executable commands. This allows for complete compromise of the host system's integrity, confidentiality, and availability depending on the privileges under which the application is running. The attacker could potentially install backdoors, exfiltrate sensitive design data, or use the compromised machine as a pivot point within an internal network.
The operational impact of this vulnerability extends beyond simple code execution to include significant risks in collaborative engineering environments where BIM templates are frequently shared between organizations and disciplines. Since FreeCAD is widely used for architectural, mechanical, and civil engineering projects, the trust model often assumes that imported files contain only geometric or metadata information rather than executable logic. The lack of input validation violates fundamental security principles regarding data integrity and safe parsing practices. This flaw aligns with CWE-95, which describes improper neutralization of directives passed to an interpreter, specifically highlighting the dangers of using dynamic evaluation functions on untrusted inputs. Furthermore, this vulnerability facilitates initial access through social engineering tactics where a victim is tricked into opening a malicious file, mapping directly to MITRE ATT&CK technique T1204, User Execution, and potentially leading to privilege escalation if the application runs with elevated permissions.
Mitigation strategies for this issue primarily involve upgrading to version 1.1.1 or later, where the developers have implemented proper input validation and removed the direct use of eval() on user-supplied metadata fields. For organizations unable to immediately patch their environments, it is crucial to enforce strict policies regarding the sourcing of BIM templates, ensuring that only files from verified and trusted partners are loaded into FreeCAD instances. Additionally, implementing application whitelisting or sandboxing for CAD software can limit the blast radius in case a malicious file bypasses initial defenses. Security teams should also monitor for unusual process creation events originating from FreeCAD executables as an indicator of potential exploitation attempts targeting this specific vector before patches are fully deployed across all workstations.