Getsimpletool Mcpo-Simple-Server Relative Path Traversal Vulnerability in Delete_Shared_Prompt Function
Vulnerability
A relative path traversal vulnerability has been identified in Getsimpletool's Mcpo-Simple-Server, specifically in versions up to 0.2.0. The issue arises in the 'delete_shared_prompt' function within 'src/mcpo_simple_server/services/prompt_manager/base_manager.py'. The vulnerability allows remote attackers to manipulate the 'detail' argument, enabling unauthorized access to the filesystem by traversing directories and potentially reaching sensitive files or disrupting server operations.
Impact
Exploitation of this vulnerability allows for arbitrary file access, where an attacker can read, modify, or delete files on the server. This could lead to the exposure of sensitive information, unauthorized changes to files, or disruption of services by affecting critical files or directories.
Reproduction
To reproduce this vulnerability, send a request to the 'delete_shared_prompt' function with a 'detail' parameter that includes traversal sequences, such as '../../../../tmp/codex_poc.txt'. The server will process the request and, without proper validation, access the specified file, demonstrating the path traversal flaw.
Remediation
It is recommended to restrict filesystem operations to a designated root directory, canonicalize and validate paths before use, and enforce boundary checks to prevent traversal attacks. Additionally, sensitive file operations should be limited to trusted, authenticated users.
Vulnerability Rating
Our algorithm analyzes dozens of metrics to generate these 8 key vulnerability categories, which are then combined to calculate the overall risk score.
