/

CVE-2026-14538

Severity:

HIGH RISK

(7.7)

Authorization Bypass (CWE-285) in Google mcp-toolbox SQL

CVE-2026-14538

Analyzed

Vulnerability type

Category:

Improper Authorization

CWE:

CWE-285, CWE-863

Impact:

Authorization Bypass and Unauthorized Data Access

Severity:

HIGH RISK

(7.7)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

An improper authorization vulnerability in the BigQuery SQL execution tool of Google mcp-toolbox can bypass configured dataset restrictions when validation receives an empty result from the BigQuery dry-run API. An authenticated attacker may use this behavior to retrieve structural schemas from excluded datasets and access downstream federated data through permitted connections.

Affected context

The issue occurs in deployments using the bigquery-execute-sql tool with allowedDatasets restrictions. Risk is present when the tool relies on BigQuery dry-run results to validate dataset usage and treats an empty array from specialized SQL constructs as successful validation. Queries using INFORMATION_SCHEMA or federated EXTERNAL_QUERY connections may then reach data sources that were intended to be excluded.

Exploit preconditions

  • Attack surface: The BigQuery SQL execution tool exposed through mcp-toolbox
  • Required access: An authenticated account permitted to invoke the tool
  • Configuration requirement: Dataset restrictions must be configured through allowedDatasets
  • Trigger point: Authorization processing for SQL that produces an empty or incomplete dry-run dataset result
  • Why exploitation is possible: Fail-open validation treats the absence of reported datasets as permission to continue, allowing excluded metadata or connected data sources to be referenced

Why this happens

The underlying flaw is an authorization decision based on incomplete information from a validation API. When the BigQuery dry-run operation returns an empty array for certain SQL constructs, the application interprets that result as a successful restriction check rather than an indeterminate or denied state. This fail-open behavior maps to CWE-285: Improper Authorization and is also consistent with CWE-863: Incorrect Authorization, because the authorization boundary does not reliably enforce the configured dataset policy.

Potential impact

  • An authenticated user may bypass configured dataset restrictions
  • Attackers could retrieve structural DDL schemas from explicitly excluded datasets
  • Queries may access downstream federated row data through EXTERNAL_QUERY connections
  • Sensitive metadata or business data could be disclosed
  • The intended separation between approved and restricted data sources may be weakened

General mitigation guidance

Mitigation generally focuses on making authorization decisions fail closed and ensuring that validation covers every data-access path.

Common defensive patterns include:

  • Treating empty, incomplete, or ambiguous validation results as denied or requiring additional verification
  • Authorizing referenced datasets and connections through an independent, explicit policy check
  • Restricting or disallowing metadata and federated-query constructs unless they are specifically modeled by policy
  • Applying least-privilege permissions to the identities used for BigQuery and external connections
  • Separating query parsing, resource resolution, and authorization so each referenced data source is evaluated
  • Reducing reliance on downstream API behavior as the sole enforcement mechanism

How teams detect issues like this

Detection approaches may include:

  • Static analysis and code review checks for fail-open authorization branches, especially conditions that allow access when validation collections are empty
  • Tests covering empty, malformed, partial, and unexpected responses from dry-run or policy-evaluation APIs
  • Policy tests for INFORMATION_SCHEMA, EXTERNAL_QUERY, views, routines, and other constructs that may obscure referenced resources
  • Audit monitoring for authenticated users querying excluded datasets, unusual schema enumeration, or federated connection activity
  • Runtime alerts when authorization succeeds without a positively resolved and approved dataset set
  • Automated security review tools that flag missing-deny defaults and authorization decisions based on incomplete API responses

Sources

SourceLink
github.comgithub.com/googleapis/mcp-toolbox/pull/3452

Frequently asked

questions

It may be exploitable through the exposed SQL execution interface when that interface is reachable by an authenticated user and the relevant BigQuery permissions are available.

The attacker generally needs valid authentication and permission to invoke the bigquery-execute-sql tool. They may also require access to data or connections that the underlying BigQuery identity can reach.

Enforce authorization with a fail-closed design. Empty or ambiguous validation results should not grant access, and every dataset, metadata namespace, and federated connection referenced by a query should be explicitly resolved and checked.

Maintain tests for specialized query constructs, independently verify referenced resources, monitor access to excluded datasets, and apply least-privilege permissions to both tool users and backend data identities.

Find out what's already
exploitable in your codebase.