Skip to content

AAK-MCP-AGENTSCOPE-CVE-2026-123022-001: AgentScope 2.x: the service takes a caller-set X-User-ID header as identity, and its workspace API starts any stdio MCP command (no fixed release)

Severity
HIGH
Category
Supply Chain (supply-chain)
Scanner
agent_audit_kit/scanners/mcp_cve_pins_2026_07.py
Auto-fixable
No.
SARIF name
AgentScopeWorkspaceStdioCommand

What it detects

AgentScope (PyPI agentscope, agentscope-ai/agentscope) ships from 2.0.0 an agent service, agentscope.app, whose only identity is the X-User-ID header the caller sets: get_current_user_id accepts any value that is not empty, the code calls it a temporary header-based identity, and create_app adds no authentication, so anyone who reaches the API acts as whichever user the header names, listing, changing and deleting that user's stored credentials, agents, sessions and schedules and chatting as that user (CVE-2026-123024, CVSS 3.1 7.3, CWE-306). The same service's POST /workspace/mcp route takes an MCP client configuration from the caller. A stdio configuration's command is a free string and a stateful client connects as soon as it is added, so the server starts that program, with the caller's arguments and environment, as its own user, or inside the Docker or E2B sandbox where the workspace runs there (CVE-2026-123022, CVSS 3.1 7.3, CWE-78). Checked in the PyPI wheels: 1.0.21, the last 1.x release, has no agentscope.app; every 2.x release, 2.0.0 (2026-05-25) to 2.0.11 (2026-10-27), the newest, has the header identity (app/_deps.py in 2.0.0, app/deps.py from 2.0.1), and 2.0.0 and 2.0.11 have the route. agentscope-ai/agentscope#3312 and #3314 are open, and #3448, an opt-in allowlist of stdio commands, and #3329, an opt-in shared API key, are unmerged and would leave the default as it is, so neither flaw has a fixed release.

How to fix

There is no fixed release. Keep an AgentScope 2.x service's API off networks you do not trust: bind it to 127.0.0.1, or put authentication in front of it that drops any X-User-ID a client sends and sets the header itself, and block POST /workspace/mcp at the proxy where callers need not add MCP servers. The Docker and E2B workspace backends contain the started program but still run it.

To confirm the finding is gone, report only this rule:

agent-audit-kit scan . --rules AAK-MCP-AGENTSCOPE-CVE-2026-123022-001

Limitations

Reports a PyPI reference to agentscope from 2.0.0: a requirements*.txt entry at any depth, a pyproject.toml, Pipfile or lockfile entry at the project root, or the package a uvx launch in an MCP config names. Presence-only from 2.0.0: every 2.x release is reported, a future fixed one included, until the pin gets a floor, and so is a reference that states no version, which installs 2.0.11; 1.x releases, which have no service, are not. It reads the name and version, not whether the project runs the service (create_app, whose FastAPI and uvicorn come with the service extra), so a project that uses AgentScope only as a library is reported too. npm's agentscope is another project and is not matched. A file over 2 MB, or a lockfile over 32 MiB, is not read. A declaration nested more than 64 levels deep in package.json, a TOML manifest or an MCP config (an MCP server more than 62) is still judged, and reported without a line; a lockfile entry keeps its line at any depth.

References

  • CVE: CVE-2026-123022, CVE-2026-123024
  • OWASP MCP Top 10: MCP05:2025 (Command Injection & Execution), MCP07:2025 (Insufficient Authentication & Authorization), MCP04:2025 (Software Supply Chain Attacks & Dependency Tampering)
  • OWASP Agentic Top 10: ASI05 (Unexpected Code Execution (RCE)), ASI03 (Identity and Privilege Abuse), ASI04 (Agentic Supply Chain Vulnerabilities)
  • Adversa AI MCP Top 25 (AAK-defined ids): ADV-INJECT-01 (Shell Injection via MCP), ADV-AUTH-01 (Missing Authentication)
  • CSA AI Controls Matrix (AICM): IAM-01, AIS-07, STA-08

All rules. This page is generated from the rule registry when the documentation is built; to change it, change the rule in agent_audit_kit/rules/builtin.py. To give the rule a hand-written write-up, add docs/rules/AAK-MCP-AGENTSCOPE-CVE-2026-123022-001.md: the page then shows that text, with the registry reference appended under it.