/

CVE-2026-73234

Severity:

HIGH RISK

(7.8)

Path Traversal (CWE-22) in FreeCAD FCStd Archive Restore

CVE-2026-73234

Awaiting Analysis

Vulnerability type

Category:

Path Traversal

CWE:

CWE-22

Impact:

Arbitrary File Write

Severity:

HIGH RISK

(7.8)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

A path traversal vulnerability in FreeCAD's FCStd archive restoration process may allow crafted document archives to write attacker-controlled content outside the intended transient directory. When a user opens a specially crafted archive, this could enable persistence, credential compromise, configuration replacement, or code execution depending on the user's permissions and system layout.

Affected context

The issue occurs in FreeCAD versions before 1.1.2 when the document restoration logic processes a FileIncluded attribute from Document.xml and uses it to locate a corresponding ZIP archive entry. Risk is present when a crafted .FCStd file is opened and the restoring process does not sufficiently constrain absolute paths, directory components, or parent-directory traversal.

Exploit preconditions

  • Attack surface: FreeCAD document archive import and restoration
  • Required access: Ability to provide or induce the user to open a crafted .FCStd document
  • Trigger point: Restoration of an included file referenced by the archive's Document.xml
  • Why exploitation is possible: Attacker-controlled path data is combined with a transient directory without adequately rejecting absolute paths or traversal components, allowing writes beyond the intended location

Why this happens

The underlying bug is insufficient path validation during extraction of archive-contained files. PropertyFileIncluded::Restore() uses attacker-controlled file or data attributes to construct an output path, but does not reliably constrain the result to the intended transient directory. This behavior maps to CWE-22: Improper Limitation of a Pathname to a Restricted Directory, commonly known as path traversal.

Potential impact

  • Attacker-controlled files may be written to arbitrary locations accessible to the FreeCAD user
  • User or application configuration files could be replaced or modified
  • Persistence mechanisms may be established in writable startup or configuration locations
  • Credentials or other sensitive data may be compromised indirectly
  • Code execution could occur if written content is later loaded or executed by the operating system or another application

General mitigation guidance

Mitigation generally focuses on enforcing a strict extraction boundary and treating archive metadata as untrusted input.

Common defensive patterns include:

  • Canonicalizing candidate paths before writing and verifying that they remain within the designated extraction directory
  • Rejecting absolute paths, parent-directory components, directory separators where inappropriate, and ambiguous path representations
  • Resolving archive entry names independently from user-controlled destination paths
  • Applying strict allowlists for supported file names and expected document structures
  • Using least-privilege operating-system accounts and limiting writable locations available to the application
  • Keeping document processing isolated from sensitive configuration and credential stores
  • Handling archive extraction failures safely without partially writing unintended files

How teams detect issues like this

Organizations can look for this class of issue through:

  • Static analysis rules that identify archive extraction combined with untrusted path concatenation
  • Code review checks for missing canonicalization and containment validation
  • Tests using absolute paths, parent traversal components, encoded separators, and mixed path formats
  • Runtime monitoring for unexpected file creation outside approved document or temporary directories
  • Policy enforcement requiring archive extractors to use safe destination APIs and explicit path allowlists
  • Automated security review tools that flag file-write operations influenced by archive metadata

Sources

SourceLink
github.comgithub.com/FreeCAD/FreeCAD/commit/7cabda0979779251bad516cb6911a43dc03c5203
github.comgithub.com/FreeCAD/FreeCAD/commit/f19b18b7d93729a29a90e96e0ae192b5d054b86d
github.comgithub.com/FreeCAD/FreeCAD/pull/31269
github.comgithub.com/FreeCAD/FreeCAD/pull/31281
github.comgithub.com/FreeCAD/FreeCAD/releases/tag/1.1.2
github.comgithub.com/FreeCAD/FreeCAD/security/advisories/GHSA-5vqh-3v38-jw2r

Frequently asked

questions

It is generally triggered when a victim opens a specially crafted FreeCAD document. An attacker may deliver the document through email, file-sharing services, repositories, or other channels, but the vulnerability is activated in the local application context.

The attacker typically needs only the ability to supply a crafted .FCStd archive and have it opened by a FreeCAD user. The resulting impact is limited by the permissions and writable locations available to that user.

Treat archive paths as untrusted, reject absolute and traversal-based names, canonicalize destinations, and verify that every extracted file remains inside a dedicated intended directory.

Combine secure archive-extraction APIs with path-containment tests, strict document schemas, least-privilege execution, and monitoring for unexpected writes outside approved working directories.

Find out what's already
exploitable in your codebase.