CVE-2026-34399 Overview
CVE-2026-34399 is a code injection vulnerability in FreeCAD, the open-source multiplatform 3D parametric modeler. The flaw resides in the BIM Workbench, which invokes Python's eval() on untrusted content parsed from SVG template files. When a user creates a TechDraw page from a crafted SVG template, arbitrary Python code executes in the FreeCAD process context. Affected versions span 0.19 through 1.1.0, and the issue is fixed in version 1.1.1. The vulnerable logic is located in src/Mod/BIM/bimcommands/BimTDPage.py at line 87. The weakness is classified as [CWE-95] Improper Neutralization of Directives in Dynamically Evaluated Code.
Critical Impact
Opening a malicious SVG template in FreeCAD's BIM Workbench executes attacker-supplied Python code with the privileges of the current user.
Affected Products
- FreeCAD 0.19 through 1.1.0 (BIM Workbench)
- FreeCAD TechDraw page creation workflow using SVG templates
- FreeCAD 1.1.1 contains the fix
Discovery Timeline
- 2026-08-17 - CVE-2026-34399 published to NVD
- 2026-08-19 - Last updated in NVD database
Technical Details for CVE-2026-34399
Vulnerability Analysis
FreeCAD's BIM Workbench provides functionality to create TechDraw pages from SVG templates. The workflow parses metadata embedded in the SVG file and passes fields into a Python eval() call without sanitization or type restrictions. An attacker who controls the SVG template body can supply arbitrary Python expressions that the interpreter executes when the user triggers TechDraw page creation.
Exploitation requires local user interaction. The victim must open or import a malicious SVG template within FreeCAD. Successful execution grants the attacker code execution in the FreeCAD process, which inherits the user's file system access, network privileges, and installed Python module surface. The impact extends beyond FreeCAD data because the payload runs inside a full CPython interpreter with os, subprocess, and file I/O available.
Root Cause
The root cause is direct use of eval() against attacker-controllable data in src/Mod/BIM/bimcommands/BimTDPage.py (line 87). eval() executes any syntactically valid Python expression, so template values that should have been treated as data are interpreted as code. Safer alternatives such as ast.literal_eval() or explicit type parsers would restrict input to literal structures and block callable invocation.
Attack Vector
The attacker crafts an SVG file containing template metadata with an embedded Python payload. Distribution occurs through modeling communities, template marketplaces, shared project archives, or targeted messages to engineering and architecture teams. When the victim uses the BIM Workbench to instantiate a TechDraw page from that template, the payload executes. No network exposure is required; the vulnerability is triggered locally with user interaction.
Refer to the GitHub Security Advisory GHSA-chv4-vm6r-wjqj for advisory details.
Detection Methods for CVE-2026-34399
Indicators of Compromise
- SVG files containing suspicious Python constructs such as __import__, eval, exec, os.system, or subprocess inside template metadata attributes.
- FreeCAD processes spawning child processes such as python, cmd.exe, powershell.exe, /bin/sh, or bash shortly after opening an SVG template.
- Unexpected outbound network connections from the FreeCAD binary following TechDraw page creation.
- Newly created scheduled tasks, cron entries, or autostart entries created by the FreeCAD process.
Detection Strategies
- Inspect SVG templates statically before use, searching for Python identifiers and dunder attributes that have no legitimate role in SVG rendering.
- Monitor endpoint telemetry for FreeCAD spawning interpreters or shells, which is atypical during normal modeling work.
- Flag file writes by FreeCAD to directories outside project workspaces, such as user autostart paths.
Monitoring Recommendations
- Enable process-lineage logging on workstations used by engineering and architecture teams that run FreeCAD.
- Alert on FreeCAD versions below 1.1.1 detected by software inventory tooling.
- Correlate SVG file downloads from untrusted sources with subsequent FreeCAD activity in SIEM data.
How to Mitigate CVE-2026-34399
Immediate Actions Required
- Upgrade FreeCAD to version 1.1.1 or later on every workstation that has the BIM Workbench installed.
- Audit shared template repositories for SVG files introduced from external or unverified sources.
- Instruct users to avoid opening SVG templates received by email, chat, or downloaded from untrusted forums until patching is complete.
- Restrict standard user accounts from writing to FreeCAD installation and shared template directories.
Patch Information
The fix is available in FreeCAD Release Version 1.1.1. The patched code removes the unsafe eval() call in src/Mod/BIM/bimcommands/BimTDPage.py. Users on the 0.19 through 1.1.0 branches must update; no backported fix is listed for earlier release lines.
Workarounds
- Do not create TechDraw pages from SVG templates originating outside the organization until FreeCAD 1.1.1 is deployed.
- Maintain an allowlist of vetted SVG templates stored in a controlled, read-only location.
- Run FreeCAD under a least-privilege user account without administrative rights or access to sensitive data shares.
- Apply application-control policies that block FreeCAD from launching interpreters and shells.
# Configuration example
# Verify installed FreeCAD version on Linux
freecad --version
# Example allowlist enforcement: mount templates read-only
mount -o remount,ro /opt/freecad/templates
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

