Severity:

HIGH RISK

(7.3)

Path Traversal in engineer-your-data File Operations

CVE-2026-7214

Deferred

Vulnerability type

Category:

Path Traversal

CWE:

CWE-22

Impact:

Arbitrary File System Access (Read/Write/List Outside Intended Directory)

Severity:

HIGH RISK

(7.3)

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 the file-handling APIs of engineer-your-data (up to version 0.1.3) allows attackers to manipulate the WORKSPACE_PATH argument to access arbitrary filesystem locations.

When exposed remotely, this can enable reading, writing, or enumerating files outside the intended workspace, depending on how the affected functions are used by the application.

Affected context

The issue occurs in deployments that expose the read_file, write_file, list_files, or file_inf functionality from src/server.py over a network interface or API and pass client-controlled values into WORKSPACE_PATH.

It is most relevant when the server is running on a host with access to sensitive files or shared resources, and when directory boundaries are expected to constrain file operations but are not strictly enforced.

Exploit preconditions

  • Attack surface: Remote, via HTTP or similar API endpoints that wrap read_file/write_file/list_files/file_inf.
  • Required access: Ability to send requests that influence the WORKSPACE_PATH or related path parameters (typically unauthenticated or low-privilege API access, depending on deployment).
  • Trigger point: Any call to the vulnerable functions where user input is combined with WORKSPACE_PATH and used in filesystem operations without canonicalization and validation.
  • Why exploitation is possible: The implementation does not adequately normalize and validate paths to ensure they remain under an intended base directory; sequences such as "../" or equivalent constructs can escape the workspace boundary.

Why this happens

This vulnerability stems from insufficient validation and normalization of user-influenced file paths before performing filesystem operations.

The server code appears to treat the WORKSPACE_PATH argument as trusted, concatenating it with user input or directly using it to construct paths for read, write, and listing operations.

This maps to CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'), where applications fail to enforce directory restrictions, allowing attackers to navigate outside the intended root.

Potential impact

  • Read access to files outside the intended workspace, which may include configuration files, credentials, or source code.
  • Overwriting or creating files in unexpected locations if write operations are exposed through the same path handling.
  • Discovery of filesystem structure and metadata via directory listing or file information queries.
  • Potential pivot to further compromise, such as modifying application configuration or scripts that are later executed by other components.
  • Exposure of other tenants' data in multi-tenant environments that share the same underlying filesystem.

General mitigation guidance

Effective mitigation focuses on strictly enforcing filesystem boundaries and treating all file path inputs as untrusted:

  • Constrain all file operations to a fixed, server-side base directory, and reject any request that resolves outside this root.
  • Canonicalize paths (e.g., using realpath/resolve) before checks, then validate that the resolved path starts with the expected base directory.
  • Avoid directly concatenating user input into filesystem paths; instead, map user-supplied identifiers to server-side paths via whitelists or lookups.
  • Implement an allowlist for permissible file names or subdirectories, rather than attempting to block known-bad patterns like "../".
  • Run the service under a dedicated, least-privileged OS account with minimal filesystem permissions to reduce blast radius if traversal occurs.

How teams detect issues like this

Detection typically combines code-centric and operational approaches:

  • Static analysis rules targeting unvalidated use of path parameters in open/read/write/list operations, especially where "../" sequences are not explicitly handled or canonicalization checks are missing.
  • Code review checklists that require reviewers to verify base-directory enforcement and path normalization for any file-access APIs.
  • Runtime monitoring or WAF rules looking for suspicious path patterns (e.g., "../", URL-encoded traversal sequences) in file-related endpoints.
  • File integrity and access logging on the host to detect unexpected reads/writes outside the intended workspace directory, correlated with API requests.

Sources

SourceLink
github.comgithub.com/eghuzefa/engineer-your-data-mcp/issues/1
vuldb.comvuldb.com/submit/802086
vuldb.comvuldb.com/vuln/359814
vuldb.comvuldb.com/vuln/359814/cti

Frequently asked

questions

Yes, if the file-handling endpoints are exposed over the network and accept user-controlled input for WORKSPACE_PATH or related path fields, an attacker can exploit it remotely.

The attacker generally needs the same level of access required to call the affected APIs. If those endpoints are publicly accessible or weakly protected, even unauthenticated users may be able to exploit the issue.

Implement strict base-directory enforcement and path normalization for all filesystem operations. Resolve the requested path to its canonical form and reject any request whose resolved path does not lie within the intended workspace directory, while avoiding direct use of raw user input in path construction.

Treat all file paths derived from external input as untrusted, centralize file-access helpers that enforce directory constraints by design, add automated tests for traversal attempts, and use static analysis or code-review policies that flag direct concatenation of user data into filesystem paths.

Find out what's already
exploitable in your codebase.