Skip to content
CVE-2026-62964

Gortex MCP Path Traversal / Repo-Confinement Escape via write_file/edit_file/move_inline (CVE-2026-62964)

Initial Access Execution Persistence Last updated:

Detects exploitation of CVE-2026-62964, an arbitrary file write and repository-confinement escape in the Gortex Go MCP server (github.com/zzet/gortex < 0.55.0). The write_file, edit_file and move_inline MCP tools fail to properly canonicalize and confine target paths to the workspace/repo root, allowing an attacker who can influence MCP tool arguments (e.g. via prompt injection or a malicious task) to write or move files outside the intended repository root using path traversal sequences (../), absolute paths, or symlink-assisted escapes. Writing to locations such as ~/.ssh/authorized_keys, shell rc files, cron directories, git hooks, or systemd units yields code execution. Detection focuses on gortex process file writes/renames landing outside the declared workspace, traversal tokens in MCP tool arguments, and newly executable or auth-relevant files created by the gortex process.

Vulnerability Intelligence

Public PoC

What is CVE-2026-62964 Gortex MCP Path Traversal / Repo-Confinement Escape via write_file/edit_file/move_inline (CVE-2026-62964)?

Gortex MCP Path Traversal / Repo-Confinement Escape via write_file/edit_file/move_inline (CVE-2026-62964) (CVE-2026-62964) maps to the Initial Access and Execution and Persistence tactics — the adversary is trying to get into your network in MITRE ATT&CK.

This page provides production-ready detection logic for Gortex MCP Path Traversal / Repo-Confinement Escape via write_file/edit_file/move_inline (CVE-2026-62964), covering the data sources and telemetry it touches: Microsoft Defender for Endpoint. The queries below are rated high severity at medium confidence, and ship for 7 SIEM platforms — KQL, SPL, Elastic, QRadar, Sumo, YARA-L, LogScale.

MITRE ATT&CK

Tactic
Initial Access Execution Persistence
Microsoft Sentinel / Defender
kusto
// df00tech DF00-569c0ea548 · https://df00tech.com/detections/CVE-2026-62964 · licence: https://df00tech.com/detections/licence
let gortexProcs = dynamic(["gortex", "gortex-mcp", "gortex.exe"]);
let authSensitivePaths = dynamic(["authorized_keys", "/.ssh/", ".bashrc", ".bash_profile", ".zshrc", ".profile", "/etc/cron", "/git/hooks/", ".git/hooks/", "/systemd/", "sudoers"]);
DeviceFileEvents
| where ActionType in ("FileCreated", "FileModified", "FileRenamed")
| where InitiatingProcessFileName in~ (gortexProcs) or InitiatingProcessCommandLine has "gortex"
| extend LowerPath = tolower(FolderPath)
| where (FolderPath has ".." ) or (LowerPath has_any (authSensitivePaths)) or (FolderPath !startswith tostring(InitiatingProcessCurrentWorkingDirectory) and InitiatingProcessCurrentWorkingDirectory != "")
| project Timestamp, DeviceName, InitiatingProcessAccountName, InitiatingProcessFileName, InitiatingProcessCommandLine, InitiatingProcessCurrentWorkingDirectory, ActionType, FolderPath, FileName, PreviousFolderPath
| order by Timestamp desc

Flags file create/modify/rename events initiated by the gortex MCP server that land outside its working directory or touch authentication/persistence-sensitive paths, indicating write_file/edit_file/move_inline confinement escape.

high severity medium confidence

Data Sources

Microsoft Defender for Endpoint

Required Tables

DeviceFileEvents

False Positives

  • Legitimate gortex operations that intentionally write to absolute paths configured by the operator
  • Developer tooling that shares the gortex binary name and writes to dotfiles during setup
  • CI jobs where the working directory is not recorded, causing the outside-cwd heuristic to misfire

Query fingerprint DF00-569c0ea548 · licence

Sigma logsource & community rules

The detection logic for Gortex MCP Path Traversal / Repo-Confinement Escape via write_file/edit_file/move_inline (CVE-2026-62964) (CVE-2026-62964) above is provided in a vendor-neutral form so you can deploy it on any SIEM. The same logic is shipped here as native KQL (Microsoft Sentinel / Defender), SPL (Splunk), Elastic (Elastic Security (EQL)), QRadar (IBM QRadar (AQL)), Sumo (Sumo Logic CSE), YARA-L (Google Chronicle / SecOps), LogScale (CrowdStrike LogScale (CQL)) queries. In Sigma terms, this detection targets the following logsource:

logsource:
  product: windows

Browse the community-maintained Sigma rules for this technique:


Testing Methodology

Validate this detection against 4 adversary techniques from Atomic Red Team. Each test below lists the behaviour to exercise and the telemetry you should expect to see. Executable commands and cleanup steps are further down this page.

  1. Test 1 Path traversal write via gortex write_file

    Expected signal: File creation event with initiating process gortex (or shell proxy) and a target path containing ../ resolving outside /tmp/gortex-lab/repo.

  2. Test 2 Absolute-path escape via gortex edit_file

    Expected signal: File create/modify event by gortex targeting a cron-style path outside the repo root.

  3. Test 3 Repo-confinement escape via gortex move_inline (rename)

    Expected signal: File rename event by gortex with a destination path resolving outside the repo root.

  4. Test 4 Git hook write via gortex write_file (Windows lab)

    Expected signal: Sysmon EID 11 file create by gortex targeting a /hooks/ path outside the repo root.


Response Playbook

Triage

  1. Identify the file create/modify/rename event initiated by the gortex process and extract the full target path; determine whether it resolves outside the intended workspace/repo root (traversal `../`, absolute path, or symlink target).
  2. Pull the corresponding gortex MCP tool invocation (write_file, edit_file, or move_inline) and inspect its path argument and content for traversal sequences or sensitive destinations.
  3. Check the running gortex version against the fix: versions < 0.55.0 are vulnerable. Confirm via binary version string, go.mod, or package manifest.
  4. Assess the written content, authorized_keys entries, shell rc payloads, cron jobs, git hooks, or systemd units indicate attempted code execution/persistence.

Containment

  1. Stop the gortex MCP server process and disable the MCP integration until it is upgraded to >= 0.55.0.
  2. Quarantine or revert any files written outside the repo root, especially SSH authorized_keys, rc files, cron entries, git hooks, and systemd units, and rotate any exposed credentials/keys.
  3. Isolate the host if attacker-controlled executable content or persistence was written and may have executed.

Evidence Collection

  1. Preserve endpoint file-event telemetry (Sysmon EID 11, auditd PATH/SYSCALL, EDR file write records) showing gortex as the initiating process and the out-of-root target path.
  2. Capture the gortex MCP request/response logs and the full tool arguments, plus the written file contents and timestamps for the affected paths.

Escalation Criteria

  • ! Escalate to IR if a write landed in an authentication, persistence, or privilege-relevant location (authorized_keys, sudoers, cron, systemd, git hooks) or if written content subsequently executed.
  • ! Escalate if the gortex server is internet-reachable or accepts untrusted/prompt-injectable task input, indicating broad exploitability.

Investigation Guide

Forensic Artifacts

  • > Files created or modified by the gortex process outside the workspace root (authorized_keys, rc files, cron, git hooks, systemd units).
  • > Gortex MCP tool-call logs containing write_file/edit_file/move_inline arguments with traversal or absolute paths.
  • > Endpoint file-write telemetry linking the gortex PID/image to the out-of-root target path and timestamp.

Tuning Guidance

Baseline the legitimate workspace/repo roots gortex operates under and suppress writes that remain inside those roots. The `..` substring heuristic can match benign filenames; prefer resolving the canonical path and comparing against the allowed root where telemetry permits. Maintain an allowlist of operator-configured absolute output paths. After upgrading all instances to >= 0.55.0, downgrade severity and retain the rule as a defense-in-depth/hunting control.


Hunting Queries

Surfaces gortex-initiated writes to traversal or persistence-sensitive destinations for retrospective hunting across the environment.

Hunting — KQL
kql
// df00tech DF00-569c0ea548 · https://df00tech.com/detections/CVE-2026-62964 · licence: https://df00tech.com/detections/licence
DeviceFileEvents | where InitiatingProcessFileName has "gortex" | where FolderPath has ".." or FolderPath has_any ("authorized_keys", "/.ssh/", "/etc/cron", "/hooks/", "/systemd/") | project Timestamp, DeviceName, FolderPath, FileName, InitiatingProcessCommandLine
Hunting — SPL
spl
``` df00tech DF00-569c0ea548 · https://df00tech.com/detections/CVE-2026-62964 · licence: https://df00tech.com/detections/licence ```
index=* process_name=*gortex* (action=created OR action=renamed) | eval target=coalesce(TargetFilename,file_path,name) | where like(target,"%..%") OR match(target,"authorized_keys|/etc/cron|/hooks/|/systemd/") | table _time host target

Atomic Red Team Tests

Test 1 Path traversal write via gortex write_file
linux

Simulates the write_file MCP tool writing outside the repo root using ../ traversal to reach a sensitive file in a lab sandbox.

Command

bash
mkdir -p /tmp/gortex-lab/repo && cd /tmp/gortex-lab/repo && printf 'ssh-ed25519 AAAAATEST attacker@poc\n' > ../../../tmp/gortex-lab/authorized_keys && ls -l /tmp/gortex-lab/authorized_keys

Cleanup

bash
rm -rf /tmp/gortex-lab

Expected Telemetry

File creation event with initiating process gortex (or shell proxy) and a target path containing ../ resolving outside /tmp/gortex-lab/repo.

Expected Detection

KQL/SPL/EQL rules fire on the traversal token and/or out-of-root target path.

Test 2 Absolute-path escape via gortex edit_file
linux

Simulates edit_file writing to an absolute persistence-sensitive path outside the workspace in a lab sandbox.

Command

bash
mkdir -p /tmp/gortex-lab/cron.d && printf '* * * * * root touch /tmp/gortex-lab/poc_marker\n' > /tmp/gortex-lab/cron.d/etc_cron_poc && echo written

Cleanup

bash
rm -rf /tmp/gortex-lab

Expected Telemetry

File create/modify event by gortex targeting a cron-style path outside the repo root.

Expected Detection

Rules match the cron/persistence path pattern with gortex as initiating process.

Test 3 Repo-confinement escape via gortex move_inline (rename)
linux

Simulates move_inline renaming a file to a destination outside the repo root using traversal in a lab sandbox.

Command

bash
mkdir -p /tmp/gortex-lab/repo && cd /tmp/gortex-lab/repo && echo payload > staged.txt && mv staged.txt ../../gortex-lab/escaped_hook && ls -l /tmp/gortex-lab/escaped_hook

Cleanup

bash
rm -rf /tmp/gortex-lab

Expected Telemetry

File rename event by gortex with a destination path resolving outside the repo root.

Expected Detection

Rename/FileRenamed rules fire on the out-of-root destination path.

Test 4 Git hook write via gortex write_file (Windows lab)
windows

Simulates write_file dropping an executable git hook outside the working tree on Windows in a lab sandbox.

Command

powershell
New-Item -ItemType Directory -Force -Path C:\gortex-lab\hooks | Out-Null; Set-Content -Path C:\gortex-lab\hooks\post-commit -Value '#!/bin/sh`ntouch /tmp/poc'; Get-Content C:\gortex-lab\hooks\post-commit

Cleanup

powershell
Remove-Item -Recurse -Force C:\gortex-lab

Expected Telemetry

Sysmon EID 11 file create by gortex targeting a /hooks/ path outside the repo root.

Expected Detection

KQL/CQL rules match the hooks path pattern with gortex as initiating process.

Related Detections

Blog posts about this detection

Browse by tactic

Full ATT&CK matrix Search all detections