CVE-2026-141546
## 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, 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`. Your `.env.example:48` documents `KICAD_MCP_PROFILE=full`, and `server.py:2388-2399` materialises the
Properties
- Summary
- KiCad MCP Pro: Variant export tools write outside KICAD_MCP_WORKSPACE_ROOT via unvalidated variant and output_name arguments
- Severity
- medium
- Nvd fetched at
- 2026-12-04T15:00:48.841578+00:00
- Epss score
- 0.00401
- Cvss score
- 5
- Cvss severity
- MEDIUM
- Retrieved at
- 2026-12-04T15:02:58+00:00
- Ghsa published
- 2026-12-03T02:28:48Z
- Source url
- https://github.com/advisories/GHSA-wfmg-598x-58c5
- Ghsa updated
- 2026-12-03T02:28:49Z
- Ghsa id
- GHSA-wfmg-598x-58c5
- Last source
- FIRST EPSS
- Score
- 5
- Cvss version
- 3.1
- Cve id
- CVE-2026-141546
- Cvss vector
- CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:N/I:H/A:N
- First seen by Signal
- 2026-12-02T22:45:38+00:00
- Name
- CVE-2026-141546
- Is ghsa only
- false
- Vector
- CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:N/I:H/A:N
Related Entities (3)
AFFECTS (1)
HAS_WEAKNESS (1)
VULNERABLE_TO (1)
Related research
Explore deeper with Ninja Signal's threat intelligence graph