CVE-2026-141546: KiCad MCP Pro: Variant export tools write outside KICAD_MCP_WORKSPACE_ROOT via unvalidated variant and output_name arguments
KiCad MCP Pro is an MCP server connecting AI agents to KiCad schematic and PCB workflows. Prior to 4.20.1, variantexportbom, variantexportschematic, and variantexportmanufacturingpackage in src/kicadmcp/tools/variants.py join unvalidated variant or outputname values to the output directory after the workspace check. A caller able to invoke these tools can use traversal or an absolute path to create directories or write and overwrite files outside KICADMCPWORKSPACEROOT. Exploitation requires an active project and a schematic-capable profile; the tools are not in the default profile. No confidentiality impact is claimed. This issue is fixed in version 4.20.1.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 4.20.1
Event History
Frequently Asked Questions
Which deployments are exposed?
Deployments running versions prior to 4.20.1 are exposed only when the variant export tools are available through a schematic-capable profile. These tools are not included in the default profile, and exploitation also requires an active project.
What level of access does an attacker need?
An attacker must be able to invoke the variant_export_bom, variant_export_schematic, or variant_export_manufacturing_package tools. They must also be able to supply a malicious variant or output_name value and interact with the user as indicated by the UI:R vector.
What can successful exploitation do?
A malicious traversal sequence or absolute path can cause directories to be created or files to be written or overwritten outside KICAD_MCP_WORKSPACE_ROOT. The reported impact is integrity only; no confidentiality impact is claimed.
What is the remediation?
Upgrade KiCad MCP Pro to version 4.20.1, which fixes the issue. If upgrading is not immediately possible, do not expose the affected variant export tools through schematic-capable profiles to untrusted callers.