Gortex MCP server lets agents write files anywhere on the host
An advisory published on 19 November 2026 says the Go coding tool's write handlers skip the repository confinement check that its read handlers apply.
By The Agentic Times ·

A security advisory published on 19 November 2026 describes an arbitrary file write flaw in Gortex, a Go-based MCP server that exposes file editing tools to AI coding agents. The advisory, GHSA-w42c-h7hr-f67p, carries the identifier CVE-2026-62964 and affects the package github.com/zzet/gortex at HEAD 28fa017, which the advisory identifies as v0.53.0.
MCP, the Model Context Protocol, is the interface that lets a language model call external tools. Gortex exposes three write tools through it: write_file, edit_file and move_inline. According to the advisory, the path resolution function resolveFilePath exempts absolute paths from confinement to indexed repository roots, and the write handlers never call the project's own guardSymlinkWithinRepo check.
The advisory frames the asymmetry as the core bug. The read-side tools, read_file and get_symbol_source, do call the guard. The write sinks do not. The result, the advisory says, is that a single write_file call with an absolute path writes any file the daemon user is permitted to write, outside every indexed repository root. Missing parent directories are created automatically because the write helper calls MkdirAll.
That turns a file write into code execution. The advisory lists shell startup files such as ~/.zshrc and ~/.bashrc, a Git pre-commit hook, or a cron or systemd unit as targets that would run attacker-supplied commands the next time a shell opens or a commit is made. The advisory notes this contradicts Gortex's own SECURITY.md, which states that file-path resolution is confined to indexed repository roots and that the server does not write to source files.
The reporter says a proof of concept was built and executed inside the project's own test harness, using the real handleWriteFile handler and the genuine MCP tool-call request shape. The test output quoted in the advisory shows a file written outside the indexed repository root, and a second write that created a .zshrc in a victim home directory with its parent directory auto-created. The test asserts the handler returned no error. The reporter says the full proof of concept is available on request.
The advisory rates the issue High, with a CVSS v3.1 vector of AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N, roughly 8.x. The user-interaction flag reflects that the tool call must be elicited from the agent, which the advisory calls the standard MCP injected-tool threat model, where a prompt-injected or adversarial agent issues the call. The weaknesses are classified as CWE-22 path traversal and CWE-73 external control of file name or path, chaining to CWE-94 code execution.
The advisory tempers the rating slightly. If a deployment never exposes the write tools to untrusted input, it says, the impact is lower. But the tools ship by default and the confinement guard is simply absent on the write path.
The recommended fix is to apply guardSymlinkWithinRepo to write_file, edit_file and move_inline, and to reject absolute paths that fall outside the indexed roots, matching the behaviour of the read tools.
The advisory records that a check of the repository's security advisories returned none, and that a search of pull requests and issues for the relevant function names, and for symlink, traversal and confinement, returned no matches. Recent merges, it says, touched the indexer and persistence rather than the write path. No vendor fix is noted in the advisory.
Sources
- github.comhttps://github.com/advisories/GHSA-w42c-h7hr-f67p
