UTC
Medium

KiCad MCP Pro: Variant export tools write outside KICAD_MCP_WORKSPACE_ROOT via unvalidated variant and output_name arguments

CVE-2026-141546 · GHSA-wfmg-598x-58c5 · published 2026-12-03

Severity
Medium
CVSS score
5.0
Chance of exploitation (EPSS)
0.40%
Fixed in
4.20.1
  • Exploitation Public proof of concept
  • Automatable No
  • Technical impact Partial
  • CISA SSVC
What it is

Anyone who can call these MCP tools can write and overwrite files outside the configured workspace root. That is the attacker model your own advisory for GHSA-h93v-ccrj-58fw describes, including an agent steered by prompt injection from a datasheet, a component description or a project file. Attacker requirements: One MCP tool call with chosen arguments. A schematic-capable profile. The tools are not in the default profile. I enumerated tools_for_profile at runtime: they appear in agent_full, builder, critic, expert, full, high_speed, power, schematic, schematic_authoring, schematic_only and simulation. …

What to do

Upgrade kicad-mcp-pro to 4.20.1 or later. If you start it from an MCP config with npx or uvx, pin that version so an old cached copy is not used.

Reject variant values that are not a single path component at variant_create, and run output_name and the derived paths through get_config().resolve_within_project(...), or the Path(...).name idiom already used in footprint.py, symbol.py and jobset.py, in all three export tools before any write_text, mkdir, or --output.

Affected
PackageRegistryAffectedFixed in
kicad-mcp-proPyPI<= 4.20.04.20.1

The impact, patch and workaround text comes from the advisory, shortened (GitHub Advisory Database, CC BY 4.0). Proof-of-concept and reproduction sections and code are left out; the original advisory has them.

Sources: GitHub Advisory Database, reviewed and malware advisories (CC BY 4.0, https://github.com/advisories); advisories published by Cursor (https://github.com/cursor/cursor/security/advisories); advisories published by OpenClaw (https://github.com/openclaw/openclaw/security/advisories); advisories published by vLLM (https://github.com/vllm-project/vllm/security/advisories); advisories published by Open WebUI (https://github.com/open-webui/open-webui/security/advisories); advisories published by n8n (https://github.com/n8n-io/n8n/security/advisories); advisories published by Flowise (https://github.com/FlowiseAI/Flowise/security/advisories); advisories published by Langflow (https://github.com/langflow-ai/langflow/security/advisories); advisories published by the MCP Python SDK project (https://github.com/modelcontextprotocol/python-sdk/security/advisories); advisories published by the MCP reference servers project (https://github.com/modelcontextprotocol/servers/security/advisories); advisories published by the MCP Inspector project (https://github.com/modelcontextprotocol/inspector/security/advisories); advisories published by the MCP TypeScript SDK project (https://github.com/modelcontextprotocol/typescript-sdk/security/advisories); advisories published by the MCP Go SDK project (https://github.com/modelcontextprotocol/go-sdk/security/advisories); advisories published by the MCP Java SDK project (https://github.com/modelcontextprotocol/java-sdk/security/advisories); advisories published by the MCP Kotlin SDK project (https://github.com/modelcontextprotocol/kotlin-sdk/security/advisories); advisories published by the MCP Rust SDK project (https://github.com/modelcontextprotocol/rust-sdk/security/advisories); advisories published by the MCP Ruby SDK project (https://github.com/modelcontextprotocol/ruby-sdk/security/advisories); advisories published by the MCP C# SDK project (https://github.com/modelcontextprotocol/csharp-sdk/security/advisories); advisories published by the MCP PHP SDK project (https://github.com/modelcontextprotocol/php-sdk/security/advisories); advisories published by the MCP Registry project (https://github.com/modelcontextprotocol/registry/security/advisories); advisories published by Open Terminal (https://github.com/open-webui/open-terminal/security/advisories); advisories published by MLflow (https://github.com/mlflow/mlflow/security/advisories); CISA Known Exploited Vulnerabilities catalog (CC0). Data as of 2026-12-06. ShieldMap describes how each problem works and how to fix it; it does not publish exploit code. Report a correction to [email protected].