CVE-2026-141546 — Kicad-mcp-pro — CWE-22
## Summary The three variant export tools build their output path by joining an unvalidated tool argument onto the output directory, so the write lands wherever that argument points. `KICAD_MCP_WORKSPACE_ROOT` does not contain it. Both `variant` and `output_name` work. `variant` has a suffix appended (`_bom.csv`, `_gerber`), while `output_name` has none, so with `output_name` the caller controls the entire final path component. It overwrote a pre-existing file outside the workspace root, wrote to an absolute path outside it, and created directories outside it with no KiCad installed at all. This is the same class as GHSA-h93v-ccrj-58fw, which was fixed in 4.15.1, in a module that fix did not touch. PR #1720 changed only `src/kicad_mcp/project/creation.py` and two test files, and added no shared guard, so the pattern survives in 4.20.0. ## Affected versions Tested on: - Repository: https://github.com/oaslananka/kicad-mcp-pro - Commit: 70ae5a77b644f039f83e82caa6d4b6b54e54c044 (main, 2026-11-18) - Package version: `kicad-mcp-pro` 4.20.0 from PyPI (latest). Everything below ran against the installed wheel; the checkout only supplied line numbers, which match. - Python version: 3.13.18 - OS: Linux (Debian, in Docker) ## Impact 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,
## Summary The three variant export tools build their output path by joining an unvalidated tool argument onto the output directory, so the write lands wherever that argument points. `KICAD_MCP_WORKSPACE_ROOT` does not contain it. Both `variant` and `output_name` work. `variant` has a suffix appended (`_bom.csv`, `_gerber`), while `output_name` has none, so with `output_name` the caller controls the entire final path component. It overwrote a pre-existing file outside the workspace root, wrote to an absolute path outside it, and created directories outside it with no KiCad installed at all. This is the same class as GHSA-h93v-ccrj-58fw, which was fixed in 4.15.1, in a module that fix did not touch. PR #1720 changed only `src/kicad_mcp/project/creation.py` and two test files, and added no shared guard, so the pattern survives in 4.20.0. ## Affected versions Tested on: - Repository: https://github.com/oaslananka/kicad-mcp-pro - Commit: 70ae5a77b644f039f83e82caa6d4b6b54e54c044 (main, 2026-11-18) - Package version: `kicad-mcp-pro` 4.20.0 from PyPI (latest). Everything below ran against the installed wheel; the checkout only supplied line numbers, which match. - Python version: 3.13.18 - OS: Linux (Debian, in Docker) ## Impact 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,
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
CVE-2026-141546
CVSS 5/10 · MEDIUM · 02.12.2026
CWE: CWE-22
Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:N/I:H/A:N
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🎯 WHAT IS THIS VULNERABILITY?
Path Traversal / LFI
Summary: ## Summary
The three variant export tools build their output path by joining an unvalidated tool argument onto the output directory, so the write lands wherever that argument points. KICAD_MCP_WORKSPACE_ROOT does not contain it. Both variant and output_name work.
Affected: kicad-mcp-pro
⚡ ATTACK VECTOR
Local/physical access (AV:L) · low-privilege account (PR:L) · user interaction required (UI:R) · low attack complexity (AC:L).
🌍 REAL WORLD IMPACT
Partial confidentiality disclosure (C:L); data can be modified or deleted.
🛡️ REMEDIATION
→ Apply vendor security update for kicad-mcp-pro.
→ Use realpath() canonicalization, implement allowlists.
→ Add WAF rule, create IDS alert for anomalous traffic.
⚠️ URGENCY
📋 Routine update cycle (30 days)
────────────────────────────────────────
[Automated Technical Vulnerability & CVSS Vector Analysis]