提交 #1033132: agentscope-ai AgentScope 2.0.4 CWE-306 Missing Authentication for Critical Function信息

标题agentscope-ai AgentScope 2.0.4 CWE-306 Missing Authentication for Critical Function
描述AgentScope v2.0.4's Agent Service has no authentication mechanism — the X-User-ID HTTP header is accepted as identity without any verification. The FastAPI app exposes 45+ REST endpoints, and the only "authentication" is get_current_user_id() (src/agentscope/app/deps.py:20-42), which reads the X-User-ID header, rejects only the empty string, and returns whatever string the caller supplied as the authenticated identity; the function's own docstring states "Temporary header-based identity; will be replaced by JWT auth.". create_app() (src/agentscope/app/_app.py:195-261) mounts the routers with no authentication middleware of any kind, and the official example (examples/agent_service/main.py) binds x.x.x.x:8000. All tenant data in Redis is keyed by user:{user_id}:... and every endpoint resolves the "current user" through Depends(get_current_user_id), so the multi-tenant isolation rests entirely on this forgeable header. An unauthenticated remote attacker who knows or guesses a victim's user_id — typically an e-mail address, username, or UUID, with no rate limiting or brute-force protection in place — simply sets X-User-ID to that value and can read any user's credentials (including stored LLM API keys), agents, session history, knowledge bases, teams and schedules, modify or delete any user's resources, create resources as any user, and trigger chats in a victim's session context. This missing authentication also removes the auth barrier from the project's other confirmed flaws (CVE-031 MCP workspace command injection, CVE-032 bash tool write misclassification), turning them into unauthenticated attacks. Affected: agentscope <= 2.0.4 (pip). Patched versions: none. Reported to the vendor: https://github.com/agentscope-ai/agentscope/security/advisories/GHSA-v3ff-83f8-j32h (submitted 2026-07-08; status Triage as of the 2026-08-30 check) + public issue https://github.com/agentscope-ai/agentscope/issues/3314 (filed 2026-10-14).
来源⚠️ https://github.com/ybyu-ieu/agent-security-advisories/blob/main/agentscope/agentscope-agent-service-x-user-id-missing-authentication.md
用户
 Ybyu (UID 101038)
提交2026-10-14 10時27分 (22 日前)
管理2026-11-05 07時26分 (22 days later)
状态已接受
VulDB条目431397 [agentscope-ai AgentScope 直到 2.0.11 Agent Service deps.py get_current_user_id X-User-ID 弱身份验证]
积分20

Might our Artificial Intelligence support you?

Check our Alexa App!