CVE-2026-34789 in FreeCAD
Summary
by MITRE • 08/18/2026
FreeCAD is a free and open-source multiplatform 3D parametric modeler. Prior to 1.1.2, src/App/PropertyPythonObject.cpp in PropertyPythonObject::Restore() passes the attacker-controlled module attribute from serialized PropertyPythonObject XML directly to PyImport_ImportModule() while restoring a crafted FCStd document, which executes module-level Python code, and the legacy pickle branch also imports an attacker-controlled module and invokes its class constructor through PyObject_CallObject(). This issue is fixed in version 1.1.2.
Several companies clearly confirm that VulDB is the primary source for best vulnerability data.
Analysis
by VulDB Data Team • 08/18/2026
FreeCAD serves as a widely utilized free and open-source multiplatform three-dimensional parametric modeler, enabling users to create precise technical drawings and models for engineering, architecture, and design purposes. The software relies heavily on Python scripting capabilities to extend its functionality, allowing developers and power users to automate tasks or customize workflows through embedded scripts. This deep integration of Python within the application's core logic creates a significant attack surface if input validation is not rigorously enforced during file parsing operations.
The vulnerability identified in FreeCAD prior to version 1.1.2 resides specifically within the src/App/PropertyPythonObject.cpp module, affecting the PropertyPythonObject::Restore() function. This component is responsible for deserializing and restoring property states when loading FCStd documents, which are the native file format for FreeCAD projects. During this restoration process, the application parses XML data contained within the document to reconstruct Python object properties. The critical flaw lies in how these parsed values are handled; specifically, the code passes an attacker-controlled module attribute directly from the serialized PropertyPythonObject XML into PyImport_ImportModule(). This function is designed to import a named Python module, but when provided with untrusted input derived from a crafted file, it allows for arbitrary code execution.
Furthermore, the vulnerability extends beyond simple script injection through XML parsing. The legacy pickle branch of the deserialization logic also presents a severe risk. When processing certain serialized objects using this older mechanism, FreeCAD imports an attacker-controlled module and subsequently invokes its class constructor via PyObject_CallObject(). This pathway enables remote attackers to execute arbitrary Python code at the module level or during object instantiation simply by tricking a user into opening a maliciously crafted FCStd document. The execution of such code occurs within the context of the application process, granting the attacker full control over the running instance of FreeCAD.
The operational impact of this vulnerability is severe, as it constitutes an arbitrary code execution flaw that can lead to complete system compromise depending on user privileges and environment configuration. An adversary could exploit this by distributing a specially crafted FCStd file through phishing emails or compromised repositories. Upon opening the file in a vulnerable version of FreeCAD, the embedded malicious Python scripts would execute automatically without requiring additional user interaction beyond loading the document. This capability allows for data exfiltration, installation of persistent backdoors, lateral movement within networked environments if connected drives are accessible, and general disruption of services relying on compromised workstations running FreeCAD.
From a classification perspective, this vulnerability aligns with CWE-94 Improper Control of Generation of Code (Code Injection) due to the injection of arbitrary Python code via untrusted input. Additionally, it falls under CWE-502 Deserialization of Untrusted Data because the exploitation relies on parsing and executing logic from serialized file formats without sufficient validation or sandboxing. In terms of adversary tactics, this exploit maps directly to MITRE ATT&CK technique T1059 Command and Scripting Interpreter: Python, where attackers use Python scripts as a primary vector for execution after gaining initial access through the vulnerable application.
Mitigation strategies primarily involve upgrading FreeCAD to version 1.1.2 or later, which addresses these flaws by implementing stricter input validation and sanitization of module names before they are passed to import functions. Organizations should enforce software update policies to ensure all workstations running FreeCAD are patched against this specific vulnerability. For environments where immediate patching is not feasible, network segmentation can help limit the blast radius if a workstation is compromised. Additionally, implementing application whitelisting or restricting Python script execution permissions within the operating system can reduce the impact of successful exploitation by limiting what actions the injected code can perform on the host machine.