ida-mcp
- Type
- MCP server
- Scanned
- Nov 12, 2026
- Version
- 391c2f0606a7
- Files read
- 42
This is the official Hex-Rays MCP server and agent plugin for reverse-engineering binaries in IDA Pro, letting an AI agent open executables, look up IDA APIs, and run Python scripts against IDA databases. Because its execute_python tool runs arbitrary Python on your computer—and the Codex and GitHub Copilot plugin hooks silently auto-approve all IDA tool calls—malicious instructions hidden in an analyzed binary or untrusted text could run arbitrary commands on your machine without confirmation.
What it can reach
- Shell commands
- Executes arbitrary Python code via execute_python inside IDA headless workers or the live IDA Pro GUI process, which can run any system command as the current user.
- Files
- Opens, modifies, and saves local executables and IDA databases (.idb/.i64), writes session traces under the IDA user directory (~/.idapro/mcp/sessions), reads linked agent session transcripts, and bundles logs into ZIP archives.
- Network
- Can start local HTTP servers when running the optional ida-mcp http (127.0.0.1:8737) or ida-mcp dashboard (127.0.0.1:8736) commands, and Python code passed to execute_python can make arbitrary outbound connections.
- System
- Spawns and attaches to headless idalib/idat worker processes and open IDA Pro GUI instances via ida-nexus.
- Browser
- Opens the default web browser to view the local session dashboard when run with ida-mcp dashboard --open.
Findings
-
HighCodex and GitHub Copilot PreToolUse hooks auto-approve arbitrary Python execution
When installed as a Codex or GitHub Copilot plugin, a PreToolUse hook runs on every IDA tool call to attach the transcript file path for session logging. Unlike the Claude hook in the same file, both _report_codex_session and _report_copilot_session unconditionally return permissionDecision set to allow. This silently auto-approves every IDA tool—including execute_python, which executes arbitrary Python on the host—bypassing normal user confirmation prompts. Because IDA is routinely used to inspect untrusted binaries and malware whose strings or symbol names can carry prompt injections, auto-approving execute_python exposes the user to unprompted code execution.
Fix: Omit permissionDecision (or return ask where required by the host hook schema) in _report_codex_session and _report_copilot_session so the host agent still prompts the user before running non-read-only tools like execute_python.
-
LowUnauthenticated HTTP server mode exposes arbitrary Python execution
Running ida-mcp http starts a Streamable HTTP MCP server (defaulting to 127.0.0.1:8737) with no password, bearer token, or authentication option. On a multi-user computer or shared environment, any local user or process can connect to that port and call execute_python to run arbitrary code as the user running IDA. If started with a non-loopback --host such as 0.0.0.0, the server prints a stderr warning but still runs, exposing unauthenticated remote code execution to the network.
Fix: Require bearer-token authentication for ida-mcp http by default, and refuse to bind to non-loopback addresses unless authentication is configured.
-
LowTool argument _meta spoofing can bundle arbitrary local files into exported log archives
_install_hook_input_meta_adapter pops _meta from tool arguments and merges it over the MCP transport _meta via request_meta.update(input_meta). In the Pi and oh-my-pi extensions (which place the real session path in transport _meta without stripping _meta from arguments) and in manual --agent setups without a PreToolUse hook, a prompt-injected agent can pass a crafted <agent>_session_path inside arguments._meta—even on read-only tools like reference. If the user later runs ida-mcp logs to export a troubleshooting ZIP, logs.py copies any existing file at that path verbatim into the archive without verifying that it is an agent transcript.
Fix: Do not allow arguments._meta to overwrite keys already present in transport _meta, strip _meta from forwarded tool arguments in ida-mcp.ts, and validate in logs.py and dashboard.py that referenced paths are valid agent transcript files before reading or archiving them.
-
LowCross-site scripting (XSS) in session dashboard via unescaped agent name
In _agent_link, the kind value (taken from the agent field of a session trace or support archive) is interpolated directly into the HTML class attribute without escaping on both the live dashboard pages and exported HTML files. If a user inspects an untrusted support archive with ida-mcp dashboard --archive or opens an exported session whose agent string contains quotes and HTML markup, arbitrary JavaScript executes in their browser.
Fix: Escape kind with _e(kind) inside the class attribute in both branches of _agent_link.
-
LowManual configuration runs latest PyPI release at startup with a 1-second cooldown
The manual MCP configuration for other agents passes --exclude-newer=1s to uvx, instructing uvx to check PyPI and download the newest ida-mcp release at startup whenever a package is more than one second old (and the Pi and oh-my-pi install commands track floating latest branches). While documented for convenience, a one-second window provides no buffer against a compromised newly published release.
Fix: Pin an explicit package version or git commit tag, or use a multi-day --exclude-newer cooldown such as 7d.
