/

CVE-2026-62964

Severity:

HIGH RISK

(7.8)

Path Traversal (CWE-22) in Gortex MCP File-Operation Tools

CVE-2026-62964

Received

Vulnerability type

Category:

Path Traversal and Arbitrary File Write

CWE:

CWE-22, CWE-73

Impact:

Arbitrary File Write with Potential Host Code Execution

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

Gortex MCP file tools can write to paths outside indexed repository roots because path resolution and write operations do not consistently enforce repository boundaries or symlink checks. A caller who can influence tool arguments may overwrite files accessible to the daemon, potentially enabling host code execution if a written file is later executed.

Affected context

The flaw occurs in Gortex MCP file operations, including write_file, edit_file, and move_inline. It is relevant when a caller can influence these tools' path arguments and the daemon can access locations outside the indexed repositories. The missing repository-root and symlink checks can allow write operations to escape the intended repository boundary.

Exploit preconditions

  • Attack surface: Gortex MCP file-operation tools
  • Required access: Ability to invoke the relevant tools and influence their arguments
  • Trigger point: A file write, edit, or move operation resolves and uses a caller-influenced path
  • Why exploitation is possible: Path resolution does not consistently restrict absolute paths to indexed roots, and relevant write paths omit symlink-within-repository checks
  • Additional condition for code execution: A file written by the daemon is later executed or loaded by the host

Why this happens

The underlying issue is insufficient validation of caller-influenced file paths before filesystem writes. Accepting absolute paths without enforcing repository boundaries maps to CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'). The use of externally controlled path values for file operations also relates to CWE-73: External Control of File Name or Path. Missing symlink checks can further undermine repository confinement.

Potential impact

  • An attacker with access to the relevant MCP tools may write or overwrite files outside indexed repositories
  • Sensitive or operational files accessible to the daemon could be modified
  • Startup, hook, or other executable files could be altered and run when triggered
  • Host code execution may occur under the daemon user's privileges
  • Changes could disrupt services or affect development workflows

General mitigation guidance

Defensive designs commonly enforce repository confinement at the point of every filesystem operation, rather than relying on earlier path resolution alone.

Common patterns include:

  • Resolve paths against an explicit set of permitted repository roots and reject paths outside them
  • Apply symlink-aware containment checks immediately before write operations
  • Prefer APIs that operate relative to a securely opened repository directory
  • Treat MCP tool arguments as untrusted, and validate canonical paths and operation targets
  • Run the daemon with least-privilege filesystem access and limit writable locations
  • Use secure-by-default file-operation interfaces that do not permit arbitrary absolute paths

How teams detect issues like this

High-level review and monitoring can focus on whether every file-write sink is protected by consistent path-confinement checks.

  • Use static analysis to trace caller-controlled path arguments to write, rename, and move operations
  • Review code for absolute-path acceptance, missing canonical containment checks, and omitted symlink validation
  • Add tests for paths outside repository roots, symlink escapes, and attempts to target daemon-accessible files
  • Enforce policies requiring repository-bound path APIs for MCP file operations
  • Monitor file modifications by the daemon outside approved repository locations

Sources

SourceLink
github.comgithub.com/zzet/gortex/commit/5ba2f066dd6dcd726c4e61b74851862dc596d994
github.comgithub.com/zzet/gortex/releases/tag/v0.55.0
github.comgithub.com/zzet/gortex/security/advisories/GHSA-w42c-h7hr-f67p

Frequently asked

questions

The issue affects file operations that fail to enforce repository confinement. The resulting write is limited by the filesystem permissions of the Gortex daemon.

Not necessarily. The described prerequisite is the ability to invoke the relevant MCP tools and influence their arguments; the precise access requirements depend on how the MCP service is exposed and controlled.

Enforce canonical, symlink-aware containment within approved repository roots at the point of each filesystem write, and avoid unrestricted absolute paths.

Treat tool-supplied paths as untrusted, use repository-relative filesystem APIs, test traversal and symlink cases, and restrict the daemon's filesystem privileges.

Find out what's already
exploitable in your codebase.