vuln-mcp-filesystem-workspace-actions
Intentionally vulnerable MCP server for AI security pentesting training.
Exposes filesystem tools (read/write/list/execute) with deliberate path traversal and code execution vulnerabilities. The server accepts a workspace directory but path validation is naive — ../../../etc/passwd escapes the workspace.
DO NOT use in production. This is a training target.
Tools
| Tool | Vulnerability |
|---|---|
read_file |
Path traversal — reads any file on the filesystem |
write_file |
Path traversal — writes to any location the process can access |
list_directory |
Path traversal — lists any directory on the system |
execute_code |
Arbitrary Python code execution, no sandboxing |
Usage
# Run via uvx (after publishing to PyPI)
uvx vuln-mcp-filesystem-workspace-actions /path/to/workspace
# Or locally
python -m vuln_mcp_fs /path/to/workspace
MCP Client Configuration
.mcp.json:
{
"mcpServers": {
"vuln-filesystem": {
"command": "uvx",
"args": [
"vuln-mcp-filesystem-workspace-actions",
"/path/to/workspace"
]
}
}
}
Lab Exercises
- Path traversal: Ask the agent to
read_filewith path../../../etc/passwd - Write outside workspace:
write_fileto../../../tmp/pwned.txt - Code execution: Use
execute_codeto run__import__('os').system('id') - Chain attacks: Read
.envfiles, SSH keys, or AWS credentials from the host
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file vuln_mcp_filesystem_workspace_actions-0.1.0.tar.gz.
File metadata
- Download URL: vuln_mcp_filesystem_workspace_actions-0.1.0.tar.gz
- Upload date:
- Size: 563.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
uv/0.11.23 {"installer":{"name":"uv","version":"0.11.23","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
708922a8d2790b6f84e265448297123e3578f6b107a5acf411547763d506e25d
|
|
| MD5 |
cd40e909de07cbc0b86c6d86d69d7da8
|
|
| BLAKE2b-256 |
537d59fe6949a0365a131edc7137cfcd5a76e93657b6ee3a08b64a5d53729f6d
|
File details
Details for the file vuln_mcp_filesystem_workspace_actions-0.1.0-py3-none-any.whl.
File metadata
- Download URL: vuln_mcp_filesystem_workspace_actions-0.1.0-py3-none-any.whl
- Upload date:
- Size: 5.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
uv/0.11.23 {"installer":{"name":"uv","version":"0.11.23","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7c888b1a5fecb46d3e0ab490abfe5e66491b66523aac83b41f02b07ece37b3bd
|
|
| MD5 |
01a2563dac74b437c4f4f5c6b59654b1
|
|
| BLAKE2b-256 |
4a165dbf26595ddfbd7f1acaa557c504547549f25ff771f4fe57ab60be143f7a
|