fast-agent serve 默认无认证绑定 0.0.0.0,启用 --shell 可致未认证远程命令执行,0.7.21 已修复
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
AI 导读
fast-agent 的 serve 命令默认以 HTTP 传输将 Agent 服务绑定到 0.0.0.0 的 8000 端口,且默认无认证(auth=None)也不打印警告,任何能访问该端口的主机都可调用暴露的 agent 工具。启用 --shell(即 README 快速开始使用的 -x 参数)时,Agent 带有本地 execute shell 工具,未认证远程客户端可驱动 Agent 执行任意系统命令,构成未认证 RCE。报告者在 Docker 环境对已发布的 0.7.20 版本实测验证,使用 gpt-4o-mini 时一条自然语言消息即可让模型自主调用 shell 工具,命令以 root 身份执行且输出返回给未认证调用方;passthrough 模型下无需密钥也可确定性复现,非交互 serve 模式下的权限提示未能阻止。
推荐理由
公告附有实测验证与修复建议,用 fast-agent serve 暴露 Agent 的团队可据此检查绑定地址、认证与 shell 开关配置。