GitHub advisory · PyPI
fast-agent: `fast-agent serve` binds HTTP to 0.0.0.0 with no authentication by default; with --shell this is unauthenticated remote command execution
Description
fast-agent serve exposes the agent over MCP. By default it uses HTTP transport bound to 0.0.0.0 (all interfaces) on port 8000 with no authentication (auth=None) and prints no warning. Any host that can reach the port can call the exposed agent tool. When the server is started with --shell (which is -x, the flag used in the README quickstart uvx fast-agent mcp@latest -x), the agent has a local execute shell tool, so an unauthenticated remote client can drive the agent into running arbitrary OS commands — unauthenticated RCE.
cli/commands/serve.py — transport defaults to HTTP; --host defaults to 0.0.0.0; port 8000.mcp/server/agent_server.py — auth_provider = None unless FAST_AGENT_SERVE_OAUTH=huggingface;
run_async(transport="http", host=host, ...) with host defaulting to 0.0.0.0.tools/local_shell_executor.py — the shell tool runs commands via create_subprocess_shell.initialize and tools/list (-> ['agent']) against http://HOST:8000/mcp. Model-independent.--shell, demonstrated two ways:
gpt-4o-mini): a single plain-language message asking the agent to run
a command via its shell tool -> the model autonomously called execute and the command output
(process identity showing it ran as root, the hostname, and the first lines of a sensitive
system file) was returned to the unauthenticated caller.passthrough model): the tool-call directive invoked the shell tool
directly, same result.
The server-side permission prompt did not block this in non-interactive serve mode.Environment: Docker python:3.13-slim, pip install fast-agent-mcp -> 0.7.20.
#…
Manual fix · PyPI
pip install --upgrade "fast-agent-mcp>=0.7.21"Sources