Skip to content

AAK-MCP-DBTMCP-CVE-2026-44968-001: dbt-mcp flag injection + tool-arg leakage (dbt-mcp below 1.17.1)

Severity
MEDIUM
Category
Supply Chain (supply-chain)
Scanner
agent_audit_kit/scanners/mcp_cve_pins_2026_07.py
Auto-fixable
No.
SARIF name
DbtMcpFlagInjection

What it detects

dbt-mcp before 1.17.1 appends unsanitized node_selection / resource_type values to the dbt subprocess argv, letting an MCP client inject dbt global flags such as --profiles-dir / --project-dir / --target into subprocess.Popen even with shell=False (CVE-2026-44968); it also emits every tool call's full arguments (sql_query, vars, node_selection) through telemetry (CVE-2026-44970, on by default) and file logging (CVE-2026-44969) without redaction. Treat < 1.17.1 (and unpinned) as exposed.

How to fix

Upgrade dbt-mcp to >= 1.17.1 and pin it. Validate node_selection / resource_type against an allow-list before adding them to argv, and redact tool arguments in telemetry / logs.

To confirm the finding is gone, report only this rule:

agent-audit-kit scan . --rules AAK-MCP-DBTMCP-CVE-2026-44968-001

Limitations

Reads dbt-mcp in requirements*.txt at any depth and, at the project root only, in pyproject.toml, Pipfile, package.json, .mcp.json, mcp.json, claude_desktop_config.json and the Pipfile.lock, poetry.lock, uv.lock, package-lock.json, pnpm-lock.yaml and yarn.lock lockfiles, taking the lowest version a range allows and reporting a reference that states no version. The dependency is not read when it is declared in a sub-directory manifest (services/api/pyproject.toml), in .cursor/mcp.json or .vscode/mcp.json, or in a lockfile format the reader does not parse (pdm.lock). A file over 2 MB, or a lockfile over 32 MiB, is not read. A declaration nested more than 64 levels deep in package.json, a TOML manifest or an MCP config (an MCP server more than 62) is still judged, and reported without a line; a lockfile entry keeps its line at any depth.

References


All rules. This page is generated from the rule registry when the documentation is built; to change it, change the rule in agent_audit_kit/rules/builtin.py. To give the rule a hand-written write-up, add docs/rules/AAK-MCP-DBTMCP-CVE-2026-44968-001.md: the page then shows that text, with the registry reference appended under it.