/

CVE-2026-84201

Severity:

HIGH RISK

(7.1)

Path Traversal (CWE-22) in appium-mcp-server Tools API

CVE-2026-84201

Deferred

Vulnerability type

Category:

Path Traversal

CWE:

CWE-22

Impact:

Arbitrary File Overwrite

Severity:

HIGH RISK

(7.1)

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 appium-mcp-server allows file-writing tools to escape the intended PROJECT_ROOT directory. An attacker who can invoke these tools may use absolute paths or parent-directory segments to overwrite files accessible to the server account, including home-directory configuration and shell-profile files.

Affected context

The vulnerability occurs in deployments using the write_file or write_files_batch tools when supplied paths are not normalized and constrained to the configured PROJECT_ROOT. Risk depends on whether an attacker can access the server's tool interface and whether the server process has write permission to sensitive files outside the project directory.

Exploit preconditions

  • Attack surface: The write_file and write_files_batch tool interfaces
  • Required access: Ability to invoke the affected tools or send requests through an exposed MCP server
  • Trigger point: File creation or modification using a supplied path
  • Why exploitation is possible: Absolute paths and relative paths containing parent-directory segments are accepted without an effective boundary check
  • Privilege scope: Files can be overwritten with the permissions of the appium-mcp-server process

Why this happens

The underlying bug is improper restriction of user-controlled file paths. The server treats supplied paths as writable locations without reliably normalizing them and verifying that the resolved destination remains within PROJECT_ROOT.

This maps to CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'), where attacker-controlled path components can reference filesystem locations outside the intended directory.

Potential impact

  • Attackers may overwrite project or application files
  • Shell profiles or configuration files could be modified
  • The server process may be disrupted or rendered unavailable
  • Sensitive application behavior could be altered
  • Overwritten startup or configuration files could enable further compromise, depending on execution context and permissions

General mitigation guidance

Mitigation generally focuses on reducing trust in tool-supplied paths and enforcing a filesystem boundary before any write occurs.

Common defensive patterns include:

  • Resolve and normalize paths before access checks
  • Permit only destinations that remain beneath the intended project root
  • Prefer server-generated file identifiers or constrained relative paths over arbitrary filesystem paths
  • Reject absolute paths, traversal components, symlink escapes, and ambiguous path representations
  • Use filesystem APIs and policies that prevent writes through links or races where practical
  • Run the server with a dedicated low-privilege account and minimal writable directories
  • Apply read-only mounts and separate sensitive home-directory files from the tool's writable area

How teams detect issues like this

Organizations can detect path traversal risks through:

  • Static analysis for file APIs that combine user-controlled input with filesystem paths
  • Code review checks requiring canonicalization followed by an explicit root-containment test
  • Tests covering absolute paths, parent-directory segments, encoded separators, symlinks, and platform-specific path formats
  • Runtime logging and alerting for rejected paths or attempted writes outside the configured project root
  • Policy enforcement limiting MCP tool exposure and restricting writable filesystem mounts

Automated security review tools may help identify untrusted path data flowing into file-write operations, but findings should be validated against deployment-specific filesystem permissions.

Sources

SourceLink
github.comgithub.com/argneshu/appium-mcp-server/blob/92b5c2b325e7bdd124f1f41a6049028b2a44e89c/src/mcp_server.py
github.comgithub.com/argneshu/appium-mcp-server/blob/92b5c2b325e7bdd124f1f41a6049028b2a44e89c/src/tools/write_files_batch.py
npmjs.comnpmjs.com/package/appium-mcp-server
vulncheck.comvulncheck.com/advisories/appium-mcp-server-through-0.1.61-path-traversal-in-write-file-and-write-files-batch

Frequently asked

questions

It can be remotely exploitable when the MCP server or its tool interface is reachable by an attacker who is authorized, or otherwise able, to invoke the affected file-writing tools. Local-only deployments require corresponding local access.

The attacker needs access to the write_file or write_files_batch operation. The consequences are limited by the operating-system permissions of the server process.

Normalize and resolve every supplied path, then allow the write only when the resolved destination is contained within the intended project root. Reject absolute paths, traversal components, and link-based escapes.

Treat file paths from tools and APIs as untrusted input, enforce least privilege, limit writable mounts, and add automated tests and policy checks for path-boundary violations.

Find out what's already
exploitable in your codebase.