title: Upsonic MCP Command Allowlist Bypass RCE (CVE-2026-30625)
id: ATR-2026-00542
rule_version: 1
status: experimental
description: |
  Detects CVE-2026-30625 (CVSS HIGH, CWE-77): Upsonic passes the `command` field from MCP server configuration directly to subprocess execution. The framework maintains a nominal allowlist of safe launchers (npx, uvx, python -m) but does not enforce it at the subprocess call site, allowing an attacker who controls MCP server configuration to supply a shell binary or interpreter with inline-exec flags as the command value.
  The root cause is identical to CVE-2026-30624 (Agent Zero) and the class documented in OX Security's "MCP by design" advisory (April 2026): subprocess spawning without server-side allowlist enforcement.
  Upsonic uses a Python dict / JSON-style config with a top-level 'mcp_servers' key; server objects contain 'command' and 'args' fields that are passed to subprocess or anyio.open_process without validation.
  Detection covers: (a) Upsonic MCP config with shell binary or network tool in command field; (b) Upsonic config with interpreter + inline-exec flag (-c/-e) in args; (c) Explicit CVE-2026-30625 / Upsonic MCP exploitation framing.
author: ATR Community
date: 2026/05/28
schema_version: '0.1'
detection_tier: pattern
maturity: draft
severity: high
references:
  owasp_llm:
    - LLM05:2025
    - LLM06:2025
  owasp_agentic:
    - ASI05:2026
    - ASI04:2026
  mitre_atlas:
    - AML.T0049 - Exploit Public-Facing Application
  mitre_attack:
    - T1059 - Command and Scripting Interpreter
    - T1190 - Exploit Public-Facing Application
  cve:
    - CVE-2026-30625
metadata_provenance:
  mitre_atlas: human-reviewed
  owasp_llm: human-reviewed
  owasp_agentic: human-reviewed
compliance:
  eu_ai_act:
    - article: '15'
      context: |
        CVE-2026-30625 Upsonic passes mcp_servers command fields directly to subprocess without enforcing its own allowlist; Article 15 cybersecurity requirements mandate that AI agent configuration interfaces validate command parameters before execution.
      strength: primary
    - article: '9'
      context: Article 9 (risk management system) requires identified risks to be addressed by appropriate measures; this rule is a runtime risk-treatment control that detects the tool-poisoning technique (Upsonic MCP Command Allowlist Bypass RCE (CVE-2026-30625)).
      strength: secondary
  nist_ai_rmf:
    - subcategory: MP.5.1
      context: |
        Attacker-controlled mcp_servers command values reaching subprocess constitute an adversarial input; MP.5.1 requires scanning MCP server config for shell-binary command fields and inline-exec argument patterns.
      strength: primary
    - subcategory: MS.2.7
      context: NIST AI RMF MEASURE 2.7 (security and resilience evaluated and documented) is supported by this rule's runtime detection of the tool-poisoning technique (Upsonic MCP Command Allowlist Bypass RCE (CVE-2026-30625)).
      strength: primary
    - subcategory: MG.3.2
      context: NIST AI RMF MANAGE 3.2 (pre-trained models monitored as part of maintenance) is supported where this rule detects the tool-poisoning technique (Upsonic MCP Command Allowlist Bypass RCE (CVE-2026-30625)).
      strength: secondary
  iso_42001:
    - clause: '8.1'
      context: |
        Operational controls must detect and block Upsonic mcp_servers configurations containing shell binary command fields before agent MCP server initialisation.
      strength: primary
    - clause: '8.3'
      context: ISO/IEC 42001 Clause 8.3 (AI risk treatment) is supported by this rule, which implements runtime detection of the tool-poisoning technique (Upsonic MCP Command Allowlist Bypass RCE (CVE-2026-30625)) as a treatment control.
      strength: secondary
tags:
  category: tool-poisoning
  subcategory: mcp-config-command-injection
  scan_target: mcp
  confidence: high
  source: cve-disclosure
  vendor_sources: upsonic-cve-2026-30625
agent_source:
  type: mcp_exchange
  framework:
    - upsonic
    - any
  provider:
    - any
detection:
  condition: any
  false_positives:
    - Legitimate Upsonic MCP configs using npx/uvx/python -m with safe package names.
    - Security advisory text quoting CVE-2026-30625 payloads.
    - MCP configs with non-shell commands (e.g., npx, uvx) and no inline-exec flags.
  conditions:
    - field: content
      operator: regex
      value: (?i)(?:upsonic|mcp_servers|mcpServers)[^\n]{0,300}["\x27]command["\x27]\s*:\s*["\x27](?:(?:\/(?:usr\/(?:local\/)?)?bin\/)?(?:bash|sh|zsh)|cmd(?:\.exe)?|powershell(?:\.exe)?|pwsh|nc|ncat|netcat|curl|wget)["\x27]
      description: |
        Upsonic / mcp_servers config with a shell binary or network tool as the command value — direct CVE-2026-30625 allowlist-bypass attack shape. Matches bare name (sh) and full path (/bin/sh, /usr/bin/bash).
    - field: content
      operator: regex
      value: (?i)(?:upsonic|mcp_servers|mcpServers)[^\n]{0,300}["\x27]command["\x27]\s*:\s*["\x27](?:python3?|perl|ruby|node|bun)["\x27][^\n]{0,200}["\x27]args["\x27]\s*:\s*\[[^\]]*["\x27]-[ceE]["\x27]
      description: |
        Upsonic / mcp_servers config with interpreter command + -c/-e/-E inline-exec flag in args — interpreter-based RCE via MCP initialisation
    - field: content
      operator: regex
      value: (?i)(?:CVE-2026-30625|upsonic[^\n]{0,80}mcp)[^\n]{0,200}(?:inject|exec|exploit|bypass|rce|command[_\s-]?inject|allowlist[_\s-]?bypass)
      description: |
        CVE-2026-30625 or Upsonic + MCP reference combined with exploitation language — attack framing in skill or tool description
response:
  actions:
    - alert
    - block_tool
  message_template: |
    [ATR-2026-00542] HIGH: Upsonic mcp_servers configuration with shell binary command field detected (CVE-2026-30625, CWE-77). Upsonic passes mcp_servers command values to subprocess without enforcing its allowlist. Block this configuration; enforce a command allowlist (npx, uvx, python -m) at the subprocess call site and upgrade Upsonic to a patched version.
confidence: 78
