Severity:

HIGH RISK

(7.3)

Path Traversal in mcpo-simple-server delete_shared_prompt

CVE-2026-7404

Deferred

Vulnerability type

Category:

Path Traversal

CWE:

CWE-22, CWE-23

Impact:

Arbitrary File Deletion / Manipulation on Server Filesystem

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

mcpo-simple-server up to version 0.2.0 contains a relative path traversal vulnerability in the delete_shared_prompt function, allowing crafted input to escape the intended directory.

When an attacker can control the detail argument over a remote interface, they may delete or manipulate files outside the expected prompt storage path on the server.

Affected context

This vulnerability appears in deployments of getsimpletool mcpo-simple-server (≤ 0.2.0) where the prompt management service is exposed over a network interface.

The delete_shared_prompt function in src/mcpo_simple_server/services/prompt_manager/base_manager.py operates on filesystem paths derived from the user-controlled detail parameter, without properly constraining them to a safe base directory.

Any environment where untrusted users can invoke this API is at risk, particularly multi-tenant or Internet-exposed instances.

Exploit preconditions

  • Attack surface: Network-exposed API or HTTP endpoint that invokes delete_shared_prompt
  • Required access: Ability to call the relevant delete/shared-prompt operation with a controlled detail value (e.g., via web UI, REST endpoint, or RPC)
  • Trigger point: Submission of a specially crafted detail argument containing relative path components (such as ../ segments)
  • Why exploitation is possible: The server-side code constructs filesystem paths using user-supplied values without canonicalization and enforcement of a fixed base directory, enabling traversal outside the intended storage location.

Why this happens

The core issue is improper restriction of file paths constructed from user-controlled input, aligning with CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') and CWE-23: Relative Path Traversal.

The delete_shared_prompt function likely concatenates the detail parameter with a base path or uses it directly when performing filesystem operations (such as delete or open) without:

  • normalizing the resulting path
  • validating that the final, canonical path still resides under an allowed directory
  • stripping or rejecting relative traversal sequences like ../

This insecure pattern allows attackers to escape the intended directory boundary and target arbitrary paths on the filesystem that the server process can access.

Potential impact

  • Deletion of files outside the intended prompt directory that are writable by the server process
  • Manipulation or overwriting of files if the code allows write or create operations along the same path construction logic
  • Disruption of application functionality by removing configuration, data, or prompt files
  • Potential denial of service if critical application files or state are removed
  • In some deployments, leverage as a stepping stone for further compromise (e.g., deleting logs, tampering with scripts, or interfering with security controls)

General mitigation guidance

Effective mitigation focuses on constraining all filesystem operations to vetted directories and treating path components as untrusted data:

  • Use a fixed, server-side configured base directory for all prompt-related files and never allow clients to supply absolute paths.
  • Normalize and canonicalize constructed paths (resolving symbolic links and relative components) before use, then enforce that the final path still resides under the allowed base directory.
  • Reject or sanitize any user input containing disallowed patterns such as ../, leading slashes, drive letters, or null bytes.
  • Represent prompts by opaque identifiers (IDs or UUIDs) rather than direct filenames, and map IDs to paths on the server side.
  • Apply least-privilege to the server process so that even if traversal is attempted, access to sensitive system locations is minimized.
  • Centralize file access logic behind a safe abstraction that enforces directory boundaries, rather than assembling paths ad hoc.

How teams detect issues like this

Organizations can detect and monitor for this class of issue with a combination of static and dynamic techniques:

  • Static analysis: Configure SAST tools or custom rules to flag string concatenation of user input into filesystem APIs (open, delete, remove, os.path.join, etc.) without validation or canonicalization.
  • Code review: During manual review, examine path-handling functions (such as delete_shared_prompt) and look for:
  • direct use of request parameters in path construction
  • absence of checks that ensure the final path is under a known safe directory
  • missing normalization steps and lack of a central file-access abstraction
  • Runtime monitoring: Use application logs or WAF rules to detect suspicious path patterns (../, ../../, URL-encoded traversal sequences) in parameters reaching file-related endpoints.
  • Security testing: Incorporate path traversal test cases into API and integration tests to exercise endpoints that perform file operations, and automatically fail builds if traversal strings are not correctly rejected.

Sources

SourceLink
github.comgithub.com/getsimpletool/mcpo-simple-server/
github.comgithub.com/getsimpletool/mcpo-simple-server/issues/4
vuldb.comvuldb.com/submit/803612
vuldb.comvuldb.com/vuln/360140
vuldb.comvuldb.com/vuln/360140/cti

Frequently asked

questions

Yes. The vulnerability sits on a network-accessible operation; if an attacker can invoke delete_shared_prompt or any associated endpoint that takes the detail parameter, they can attempt path traversal remotely.

The attacker needs whatever access is required to call the affected API—this might be unauthenticated in some setups or tied to a low-privileged account in others. No shell access to the server is required; the file operations are performed by the application on behalf of the attacker.

Use a strict server-side mapping from logical prompt identifiers to filesystem paths, normalize and canonicalize paths before use, and verify that the final path remains inside a predefined base directory. Reject any input that cannot be mapped safely or that includes path traversal sequences.

Establish a standard file-access utility that all code must use for filesystem operations, enforcing base-directory constraints and path validation centrally. Combine this with secure coding guidelines, automated static analysis focused on path manipulation, and security-focused code reviews for any feature that touches the filesystem.

Find out what's already
exploitable in your codebase.