pal-mcp-server
BeehiveInnovations/pal-mcp-server
- Type
- MCP server
- Scanned
- Nov 12, 2026
- Version
- 7afc7c1cc96e
- Files read
- 361
PAL MCP Server connects AI coding assistants to cloud or local AI models and command-line AI tools to help with code review, debugging, and planning. Its biggest risk is that a built-in tool marks itself as read-only while launching external AI tools with safety prompts and sandboxes turned off, allowing hidden instructions in untrusted content to run commands or send sensitive local files like SSH keys and API secrets to outside AI services.
What it can reach
- Files
- Reads local files, folders, and images passed to its tools (blocking only a few system paths while still allowing subfolders inside your home directory), and writes generated code, log files, and AI client configuration files.
- Network
- Sends prompts, chat history, local file contents, and images to configured AI services (such as OpenAI, Gemini, Azure, X.AI, OpenRouter, DIAL, or custom endpoints), and checks GitHub for version updates.
- Shell commands
- Launches external AI command-line tools (such as Claude, Codex, and Gemini) with safety approvals turned off so they can edit files and run commands on their own, and runs Git commands to inspect repositories.
- Secrets
- Reads AI service API keys from environment variables and .env files, passes environment variables to the external command-line tools it runs, and copies .env settings into local AI client config files during setup.
- System
- Reads basic operating system and Python version details, and includes optional setup scripts that create virtual environments, install Python packages, and remove old Docker files.
Findings
-
Highclink CLI client configs disable sandboxing and approval prompts by default
The built-in clink configurations launch external AI CLIs with safety guardrails turned off: Codex runs with --dangerously-bypass-approvals-and-sandbox, Gemini runs with --yolo (in conf/cli_clients/gemini.json), and Claude runs with --permission-mode acceptEdits (in conf/cli_clients/claude.json). These flags apply to every role, including planner and codereviewer. If a user asks clink to review an untrusted repository, or if prompt injection tricks the host agent into calling clink, the spawned CLI can execute arbitrary shell commands and modify files on the user's machine with no sandbox and no confirmation prompt.
Fix: Remove --dangerously-bypass-approvals-and-sandbox, --yolo, and acceptEdits from the default CLI client manifests, enforce read-only sandboxed flags for review and planning roles, and require explicit user configuration to enable autonomous execution.
-
Highclink tool falsely advertises readOnlyHint as true
CLinkTool.get_annotations() declares readOnlyHint: True, telling MCP clients such as Claude Desktop, Cursor, and VS Code that the tool never modifies files or system state. In reality, clink invokes external AI CLIs configured by default to edit files and execute arbitrary shell commands without confirmation. MCP clients that automatically approve read-only tools will allow a prompt-injected agent to run clink without asking the user.
Fix: Change get_annotations() in tools/clink.py to return {"readOnlyHint": False, "destructiveHint": True} so MCP clients require user approval before invoking external CLI agents.
-
HighIncomplete path denylist allows exfiltration of SSH keys, cloud credentials, and .env secrets
Although utils/file_utils.py states that file access is restricted to PROJECT_ROOT, resolve_and_validate_path() only blocks a small denylist of system directories and the exact home directory root. It allows reading sensitive files inside home subdirectories (such as ~/.ssh/id_rsa, ~/.aws/credentials, and ~/.kube/config), /proc/self/environ on Linux, Docker, and WSL (which exposes all API keys in memory because /proc is missing from DANGEROUS_SYSTEM_PATHS), and the server's own .env file (whose folder is disclosed by the version tool, and which bypasses is_mcp_directory() and dotfile filters when passed as a direct file path). A prompt-injected agent can pass these paths to chat or readOnlyHint workflow tools, sending the secrets to external AI providers and returning summaries to the agent.
Fix: Enforce an explicit workspace root allowlist for file reads, add /proc, /sys, and /dev to DANGEROUS_SYSTEM_PATHS, block sensitive dotfile directories (~/.ssh, ~/.aws, ~/.gnupg, ~/.kube), and apply is_mcp_directory() and dotfile checks to individual file paths as well as directories.
-
MediumImage loader skips path validation and reads unbounded bytes before checking type or size
_validate_file_path() opens and reads image paths directly without calling resolve_and_validate_path(), and BaseTool.validate_file_paths() does not validate the images field. Because os.path.splitext() checks the filename before resolving symlinks, a symlink named diagram.png inside an untrusted repository can point to blocked paths such as /etc/passwd or /root/.ssh/id_rsa and send its base64-encoded bytes to an external model provider. Additionally, handle.read() runs before extension and size checks, so passing a device file like /dev/zero (which reports 0 bytes to stat()) causes unbounded memory growth and crashes the server.
Fix: Validate all image file paths with resolve_and_validate_path(), verify the resolved target is a regular file with an allowed image extension before reading, and cap reads to max_size_bytes + 1 instead of calling unbounded handle.read().
-
LowSetup script configures Codex CLI to download and run unpinned code from GitHub
Even when a user clones a specific version of the repository locally and runs ./run-server.sh, check_codex_cli_integration() writes a Codex MCP configuration into ~/.codex/config.toml (matching the uvx snippet in README.md) that executes uvx --from git+https://github.com/BeehiveInnovations/pal-mcp-server.git without pinning a commit hash or release tag, while passing the user's API keys in the environment. Whenever uvx refreshes the package, Codex pulls and runs the latest unpinned code from the remote main branch.
Fix: Update check_codex_cli_integration() in run-server.sh to run the local .pal_venv/bin/python and server.py (consistent with the Claude, Gemini, and Qwen integrations), and pin uvx examples in documentation to immutable release tags or commit hashes.
-
LowShell command injection via release notes in Docker release GitHub Actions workflow
.github/workflows/docker-release.yml:71
The Docker release workflow interpolates ${{ github.event.release.body }} directly into a bash script inside an unquoted << EOF heredoc. Because semantic-release populates release notes from merged commit messages and PR titles, backticks or $(...) command substitutions in the release notes are evaluated by bash on the runner with packages: write permissions. This CI workflow never runs on an end user's machine.
Fix: Pass ${{ github.event.release.body }} via a step environment variable and quote the heredoc delimiter (<< 'EOF') or pass --notes "$RELEASE_BODY" directly to gh release edit.
-
LowUnpinned Git repository in uvx quick-start configuration
Option B in the Quick Start instructs users to configure their MCP client to execute pal-mcp-server directly from git+https://github.com/BeehiveInnovations/pal-mcp-server.git via uvx without pinning a release tag or commit hash, while passing API keys in the environment. If the upstream repository default branch is ever compromised, uvx can download and execute untrusted code on the user's machine.
Fix: Pin the repository URL to a specific release tag or full commit SHA, such as git+https://github.com/BeehiveInnovations/pal-mcp-server.git@v9.8.2.
-
LowContainer runtime user owns application code and healthcheck script
The Dockerfile copies the entire application directory into /app (and healthcheck.py into /usr/local/bin) with --chown=paluser:paluser, giving the non-root runtime user write permission over its own executable code and periodic healthcheck script. In addition, while docker/README.md claims the container uses a read-only filesystem, none of its documented docker run commands include --read-only.
Fix: Copy /app and /usr/local/bin/healthcheck.py as root:root without --chown=paluser:paluser, keep paluser ownership only on /app/logs and /app/tmp, and add --read-only --tmpfs /tmp to the documented docker run commands.
