Skip to main content

hagent EUVDEUVD-2026-110849

| CVE-2026-117573 HIGH
OS Command Injection (CWE-78)
2026-10-27 VulnCheck GHSA-j5hx-w574-wh9m
8.5
CVSS 4.0 · Vendor: VulnCheck
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Gain MCP client or agent access
  2. Delivery
    Craft args with shell metacharacters
  3. Exploit
    Invoke hagent_arduino/hagent_esp32 tool
  4. Execution
    Reach subprocess.run(shell=True) interpolation
  5. Impact
    Execute arbitrary commands as MCP server user

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization OS command sanitization, avoid shell exec
MITRE ATT&CK

2 techniques across 1 tactic: Execution

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

The exploit requires the attacker to be able to invoke the hagent_arduino or hagent_esp32 MCP tools and control their args parameter - either as an MCP client connected to the hagent MCP server or as a prompt-injected agent driving that client. No non-default configuration is needed beyond running the hagent MCP server (through commit 761eec6) exposing these build tools; the shell=True interpolation of args into arduino-cli/idf.py is the always-present trigger. Limiting factors: the attack is local-vector (AV:L), requires the privilege level of an MCP client that can reach these tools (PR:L), and is bounded to code execution as the MCP server user rather than automatic privilege escalation; it is therefore reachable only where the hagent MCP server is deployed and its Arduino/ESP32 tools are exposed to the caller.

Impact

Signals are moderately consistent and point to a real but bounded priority. The CVSS 4.0 base score of 8.5 reflects full compromise of the vulnerable system (VC:H/VI:H/VA:H) via a low-complexity attack (AC:L/AT:N) requiring only low privileges and no user interaction, but the attack vector is LOCAL (AV:L), which sharply limits mass remote exploitation - this is not an internet-wide, unauthenticated RCE. The vuln.today decision label is 'this_week' rather than act_now/emergency, consistent with a serious issue that is not under active mass exploitation. There is NO CISA KEV listing (not actively exploited per CISA) and NO EPSS score was provided in the input, so probabilistic exploitation likelihood cannot be quantified here. The references include a VulnCheck advisory and GitHub issue #98 documenting the flaw, plus direct links to the vulnerable source lines (mcp_arduino.py#L776, mcp_esp32.py#L682), so the mechanism is well evidenced even though no verified working exploit artifact is confirmed. The distinctive risk modifier is the prompt-injection angle: because the hagent_arduino/hagent_esp32 MCP tools interpolate caller-supplied args into shell commands, a prompt-injected LLM agent - not just a human attacker - can trigger code execution, which raises practical exposure in agentic deployments beyond what AV:L alone suggests. Net: a genuine high-severity local/agent-reachable RCE in a niche research tool, worth prompt remediation but not an emergency given the local vector, absent KEV, and tiny deployment footprint.

Exploit ScenarioDerived

An attacker or prompt-injected agent that can invoke the hagent MCP server's hagent_arduino or hagent_esp32 tools supplies an args value containing shell metacharacters (e.g. appended with ';' or '$(...)'). Because the args string is interpolated into arduino-cli or idf.py commands executed via subprocess.run(shell=True), the injected commands run as the MCP server user. A public PoC reference exists (VulnCheck advisory and GitHub issue #98); it is not verified as working exploit code.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
No patch listed yet 0.7% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Oct 28, 2026

OS command injection in the hagent MCP server (masc-ucsc/hagent, through commit 761eec6) lets an MCP client that can reach the hagent_arduino or hagent_esp32 tools run arbitrary shell commands as the MCP server user by placing shell metacharacters in the args parameter, which is interpolated into arduino-cli and idf.py command lines executed with subprocess.run(shell=True). The attacker must already hold the low-privileged position of an MCP client (or drive one through prompt injection), so this is local-vector code execution bounded by the server's account rather than a pre-authentication remote takeover, but any deployment that exposes these embedded-build tools to an untrusted or LLM-driven caller is fully compromised on confidentiality, integrity and availability. No public exploit code has been identified at time of analysis and there is no CISA KEV entry; the EUVD/VulnCheck disclosure and an upstream GitHub issue are the only public signals, and the vulnerability is tracked for patching this week.

RemediationAI

No vendor-released patch or fixed version is identified at time of analysis; the upstream tracking issue is https://github.com/masc-ucsc/hagent/issues/98 and the third-party advisory is https://www.vulncheck.com/advisories/hagent-through-commit-761eec6-os-command-injection-via-arduino-and-esp32-mcp-tools. Until a fix commit is published, the most direct control is to stop exposing hagent_arduino and hagent_esp32 to any caller you do not fully trust - unregister or disable those two tools in the MCP server configuration, or refuse to attach untrusted/LLM-driven MCP clients to it; the trade-off is that Arduino and ESP32 builds then must be run through arduino-cli and idf.py directly. Second, run the hagent MCP server under a dedicated low-privilege account or in a container with a read-only or narrow filesystem view, so that injected commands execute with minimal reach; this bounds blast radius but does not prevent the injection itself. Third, restrict who can connect: bind the MCP server only to localhost or a trusted management network behind authentication, and treat any prompt-injected agent as a hostile caller of the args parameter. Teams maintaining a fork can eliminate the flaw at the root by replacing subprocess.run(shell=True) calls with list-form argv execution and validating or allowlisting args before they reach arduino-cli and idf.py, at the cost of carrying that patch until upstream ships a fix.

Affected VersionsENISA

hagent 0 ≤761eec627a1e6fb128a2a8ce9245aa595cc2f7af

Affects your stack

Find out whether the stacks and servers you run are on an affected version.

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

hagent is a hardware-design agent framework from UCSC (masc-ucsc) that ships a Model Context Protocol (MCP) server exposing tool endpoints to LLM clients. Two of those tools - hagent_arduino (hagent/mcp/mcp_arduino.py, line 776 at commit 761eec6) and hagent_esp32 (hagent/mcp/mcp_esp32.py, line 682) - wrap the external build tools arduino-cli and Espressif's idf.py. The root cause is CWE-78: user-supplied argument values from the MCP tool call are concatenated into a command string that is handed to subprocess.run(..., shell=True), so a shell parses characters such as semicolons, pipes, backticks or command substitutions supplied in args. Because the injection point is the tool argument itself, no unusual configuration is required beyond running the MCP server at or before commit 761eec627a1e6fb128a2a8ce9245aa595cc2f7af and exposing the Arduino/ESP32 tools; the defect is in how the wrapper builds its process invocation, not in arduino-cli or idf.py. The CVSS vector places the attack locally (AV:L) with low privileges (PR:L) and no user interaction, reflecting that the caller must be an MCP client able to invoke the tools - including a prompt-injected agent acting on the client's behalf - rather than an anonymous network attacker.

Know when Hagent gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (VulnCheck) PRIMARY 8.5 HIGH
CVSS:4.0/AV:L/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
vuln.today AI 7.8 HIGH

MCP tool invocation over typically local transport (AV:L) with low-privilege client access (PR:L) and trivial metacharacter injection (AC:L) yields full command execution as the server user (C/I/A:H).

3.1 AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
4.0 AV:L/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N

Primary rating from Vendor (VulnCheck).

CVSS VectorVendor: VulnCheck

Attack Vector
Local
Attack Complexity
Low
Attack Requirements
None
Privileges Required
Low
User Interaction
None
Vulnerable system: Confidentiality
High
Vulnerable system: Integrity
High
Vulnerable system: Availability
High
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

DescriptionCVE.org

hagent through commit 761eec6 contains an OS command injection vulnerability that allows MCP clients to execute shell commands by injecting metacharacters into the args parameter of the hagent_arduino and hagent_esp32 tools. Attackers or prompt-injected agents can supply crafted args interpolated into arduino-cli and idf.py commands run with subprocess.run(shell=True) to execute commands as the MCP server user.

Executive ViewAI

Why It Matters

CVE-2026-117573 is a high-severity OS command injection in the hagent MCP server used for embedded development toolchains, allowing an attacker with MCP client access-or an LLM driven via prompt injection-to execute arbitrary commands as the server's user. This could let an adversary compromise the build environment, steal embedded device credentials or firmware signing keys, and tamper with firmware builds, undermining product integrity and supply chain trust.

Business Impact: High
Compensating Controls

No vendor-released patch identified at time of analysis. Interim mitigations: strictly limit network access to the hagent MCP server and its tools only to trusted, authenticated MCP clients; disable the hagent_arduino and hagent_esp32 tools if not essential; implement input validation to reject shell metacharacters in the args parameter; replace subprocess.run(shell=True) with safer execution methods; monitor for anomalous subprocess activity. Do not expose these tools to untrusted or LLM-driven callers without additional safeguards.

Threat Intelligence Overview

EPSS Score
0.7%
Top 47% exploitable
Prevalence
Rare
academic research tool (UC Santa Cruz MASC), negligible production footprint
Data Quality
4 sources
Confidence: Medium

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS 0.7%
Patch available No
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Defer
Exploitation· derived
None
System Exposure· derived
Small
Automatable· derived
No
Human Impact
High

Priority Score

43
Low Medium High Critical
KEV: 0
EPSS: +1
CVSS: +42
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

OS command injection occurs when an application passes unsanitized user input directly into system shell commands.

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy