Severity:

HIGH RISK

(7.3)

Path Traversal in Flux159 mcp-game-asset-gen MCP Interface

CVE-2026-7594

Deferred

Vulnerability type

Category:

Path Traversal

CWE:

CWE-22

Impact:

Arbitrary File Access / Modification via Path Traversal

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

Flux159 mcp-game-asset-gen 0.1.0 contains a path traversal vulnerability in the MCP Interface's image_to_3d_async function, where the statusFile argument is not properly constrained.

A remote attacker who can influence this parameter may traverse directories on the server filesystem, potentially accessing or manipulating files outside the intended path.

Affected context

The vulnerability appears in the MCP Interface component of Flux159 mcp-game-asset-gen, specifically within src/index.ts in the image_to_3d_async function.

It manifests when user-controlled values are accepted for the statusFile argument and then used to construct filesystem paths without sufficient validation or normalization.

Deployments that expose this interface over a network (e.g., via an API or MCP endpoint) and allow clients to specify or influence statusFile are more likely to be affected.

Exploit preconditions

  • Attack surface: Remote interface to the MCP component (e.g., HTTP, MCP protocol, or other API used to invoke image_to_3d_async).
  • Required access: Ability to send requests or messages that control or influence the statusFile parameter.
  • Trigger point: Invocation of image_to_3d_async where statusFile is incorporated into a file path for reading, writing, or updating status.
  • Why exploitation is possible: The implementation appears to trust statusFile input and combine it with base directories or file operations without adequately stripping, normalizing, or restricting directory traversal sequences such as ../, enabling paths that escape the intended directory.

Why this happens

This issue aligns with CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal').

The underlying flaw is that the code uses user-influenced path segments (statusFile) directly in filesystem operations, relying on assumptions about where files will reside rather than enforcing canonical constraints.

Without proper validation, normalization, or enforcement of a fixed base directory, attackers can inject path segments that step out of the intended directory tree and target arbitrary files on the host system.

Potential impact

  • Unauthorized reading of files that the application process can access, including configuration files or logs.
  • Overwriting or corrupting application-related files such as status files, temporary data, or other assets.
  • Interference with application behavior by modifying files used to track job state or results.
  • In some environments, potential escalation to code execution if writable files such as scripts or configuration files are altered and subsequently executed or loaded.

General mitigation guidance

Effective mitigation focuses on strict control of file paths derived from external input:

  • Constrain statusFile to a known safe directory and reject any value that resolves outside this directory after canonicalization.
  • Normalize and validate paths, explicitly disallowing sequences like ../, absolute paths, or symbolic link traversal where not needed.
  • Prefer using whitelists of allowed filenames or identifiers rather than accepting arbitrary path segments from clients.
  • Implement a clear separation between user identifiers and filesystem names, mapping user-supplied identifiers to server-chosen paths instead of embedding user data directly in paths.
  • Run the service with least-privilege filesystem permissions so that even if traversal occurs, the accessible damage is reduced.

How teams detect issues like this

Teams can detect and monitor for similar issues using a combination of review and tooling:

  • Static analysis rules that flag direct concatenation of user-controlled variables into file paths or filesystem APIs (fs.readFile, fs.writeFile, fs.createWriteStream, etc.).
  • Code review checklists that require reviewers to verify any input-derived path is resolved, canonicalized, and restricted to a known base directory.
  • Logging and monitoring of unexpected path patterns, especially those containing ../, absolute paths, or references outside the normal working directories.
  • Security tests or fuzzing focused on file-handling endpoints, sending crafted statusFile values with traversal sequences and confirming they are rejected.

Sources

SourceLink
github.comgithub.com/Flux159/mcp-game-asset-gen/
github.comgithub.com/Flux159/mcp-game-asset-gen/issues/3
vuldb.comvuldb.com/submit/805508
vuldb.comvuldb.com/vuln/360547
vuldb.comvuldb.com/vuln/360547/cti

Frequently asked

questions

Exploitability depends on how the MCP Interface is exposed. If the image_to_3d_async function is accessible over a network and clients can control statusFile, exploitation can be fully remote. In more restricted deployments (e.g., only internal or authenticated use), the scope is limited to those who can send requests to this interface.

The description indicates the attack can be executed remotely, implying that network access to the relevant interface is sufficient. Whether authentication is required depends on the surrounding application and how access to image_to_3d_async is controlled.

The safest approach is to decouple user input from filesystem paths. Treat statusFile as an identifier rather than a path, map it to a server-defined filename within a fixed directory, and ensure paths are canonicalized and validated so they cannot escape that directory.

Build a consistent file-handling strategy: centralize path construction, enforce a strict base directory, validate and normalize all input-derived paths, and add automated checks (static analysis, code review rules, and tests) to flag any direct use of user-controlled values in filesystem operations.

Find out what's already
exploitable in your codebase.