Advisory

PYSEC-2026-2442

Details, part 2 of 2. The advisory

Details

Step 2 is provided for reference only and was not executed as part of this submission. Step 1 fully demonstrates the serialization behavior.

Screenshot from testing

<img width="2310" height="2992" alt="PoC3" src="https://github.com/user-attachments/assets/d6f39659-7d62-45cc-9332-5abdc06e7b48" />

Impact

Directly proven by this PoC:

  • Every key-value pair in every MCP tool call's arguments dict is JSON-serialized and included in the payload passed to log_proto(ToolCalled(...)).
  • This behavior is active by default with no user action required.
  • Affected tools include show (sql_query), run/build/test (vars, node_selection), compile (node_selection), and any future tool whose arguments contain sensitive data.

Compliance and privacy implications: Organizations processing personally identifiable information (PII) or regulated data through the show tool (e.g., ad-hoc SQL queries against production tables) transmit query content to a third party without explicit informed consent. This may conflict with GDPR Article 28, HIPAA data-handling requirements, and SOC 2 data-classification obligations.

Remediation

Option A (minimal) — redact known-sensitive argument values:

_REDACT_ARGS = frozenset({"sql_query", "vars"})

arguments_mapping: Mapping[str, str] = {
    k: ("***redacted***" if k in _REDACT_ARGS else json.dumps(v))
    for k, v in tool_called_event.arguments.items()
}

Option B (preferred) — transmit argument keys only, not values:

arguments_mapping: Mapping[str, str] = {
    k: "***" for k in tool_called_event.arguments
}

Option C — change to opt-in telemetry:

Set usage_tracking_enabled to False by default and require the user to set DBT_SEND_ANONYMOUS_USAGE_STATS=true to enable. Document this change prominently in the installation guide and README.

Sources & licences