Description
FreeCAD is a free and open-source multiplatform 3D parametric modeler. Prior to 1.1.2, the FEM Displacement Constraint task dialog in src/Mod/Fem/Gui/TaskFemConstraintDisplacement.cpp passes the xDisplacementFormula, yDisplacementFormula, and zDisplacementFormula fields of a Fem::ConstraintDisplacement object through TaskDlgFemConstraintDisplacement::accept() into Gui::Command::doCommand. The escaping helper neutralizes quotation marks but not backslashes, allowing crafted formula text to terminate the generated Python string and execute arbitrary Python code with the FreeCAD process's privileges when a victim accepts the dialog. This issue is fixed in version 1.1.2.
Affected products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| FreeCAD | FreeCAD | < 1.1.2 | — |
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 14 | freecad | 1.1.3+dfsg-1 | — |
| Debian 13 | freecad | 1.0.0+dfsg-8+deb13u3 | — |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 26.10 | freecad | No fix yet | — |
| Ubuntu 22.04 LTS | freecad | No fix yet | — |
| Ubuntu 20.04 LTS | freecad | No fix yet | — |
| Ubuntu 18.04 LTS | freecad | No fix yet | — |
| Ubuntu 16.04 LTS | freecad | No fix yet | — |
References
- https://github.com/FreeCAD/FreeCAD/security/advisories/GHSA-2rq3-gx3h-489q
- https://github.com/FreeCAD/FreeCAD/pull/31267
- https://github.com/FreeCAD/FreeCAD/pull/31312
- https://github.com/FreeCAD/FreeCAD/commit/0a208ac11cfe7b61c424ee4bb79117138ec50ac2
- https://github.com/FreeCAD/FreeCAD/commit/3f60d202a8246958232e2fbc74ba38a83483b74e
- https://github.com/FreeCAD/FreeCAD/releases/tag/1.1.2