Skip to main content

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

  1. Path traversal: Ask the agent to read_file with path ../../../etc/passwd
  2. Write outside workspace: write_file to ../../../tmp/pwned.txt
  3. Code execution: Use execute_code to run __import__('os').system('id')
  4. Chain attacks: Read .env files, 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

vuln_mcp_filesystem_workspace_actions-0.1.0.tar.gz (563.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

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

Hashes for vuln_mcp_filesystem_workspace_actions-0.1.0.tar.gz
Algorithm Hash digest
SHA256 708922a8d2790b6f84e265448297123e3578f6b107a5acf411547763d506e25d
MD5 cd40e909de07cbc0b86c6d86d69d7da8
BLAKE2b-256 537d59fe6949a0365a131edc7137cfcd5a76e93657b6ee3a08b64a5d53729f6d

See more details on using hashes here.

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

Hashes for vuln_mcp_filesystem_workspace_actions-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7c888b1a5fecb46d3e0ab490abfe5e66491b66523aac83b41f02b07ece37b3bd
MD5 01a2563dac74b437c4f4f5c6b59654b1
BLAKE2b-256 4a165dbf26595ddfbd7f1acaa557c504547549f25ff771f4fe57ab60be143f7a

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page