Summary
MCP Toolbox for Databases does not enforce per-tool authorization scopes consistently across older MCP protocol handlers. An authenticated client holding a low-privilege token may select an older or unspecified protocol version and invoke tools requiring higher privileges.
Affected context
The vulnerability occurs in MCP Toolbox deployments that support multiple protocol versions and apply per-tool restrictions through the scopesRequired configuration. The current handler enforces these restrictions, but older handlers may omit the check. Requests using an older protocol version, or requests that omit the protocol-version header and trigger a vulnerable default, may therefore receive weaker authorization enforcement.
Exploit preconditions
- Attack surface: MCP protocol request handling in MCP Toolbox for Databases
- Required access: An authenticated client with a valid, but potentially low-privilege, token
- Trigger point: Protocol negotiation through the
MCP-Protocol-Versionheader, including selecting an older version or omitting the header - Why exploitation is possible: Older protocol handlers do not consistently enforce the per-tool scopes defined by
scopesRequired, allowing authorization decisions to be made without the intended scope check
Why this happens
The underlying bug is inconsistent authorization enforcement across protocol-version-specific handlers. Although the newer handler checks whether a caller's token includes the scope required by a tool, older handlers omit the equivalent control. This maps to CWE-862: Missing Authorization, because access to privileged operations is not verified consistently at every applicable request-processing path.
Potential impact
- An authenticated low-privilege client may invoke tools intended for higher-privilege roles
- Unauthorized database or administrative operations could be performed
- Sensitive data may be accessed or modified through privileged tools
- Connected systems or downstream workflows could be affected
- Audit and authorization policy expectations may be weakened
General mitigation guidance
Mitigation generally focuses on making authorization checks consistent, centralized, and independent of protocol-version selection.
Common defensive patterns include:
- Enforcing required scopes for every tool in a shared authorization layer
- Applying a secure-by-default protocol policy when the version header is absent or unrecognized
- Treating protocol negotiation as a compatibility concern rather than an authorization decision
- Reducing trust in client-supplied protocol metadata and validating it against server policy
- Denying access when a requested tool's required scope cannot be established
- Assigning tools and tokens the minimum privileges necessary for their intended use
- Recording protocol version, identity, requested tool, and authorization outcomes for review
How teams detect issues like this
Detection can combine code review, testing, and runtime policy controls:
- Review every protocol-version handler for equivalent scope and authorization checks
- Use static analysis to identify request dispatch paths that invoke tools without a shared authorization function
- Test authenticated tokens with different privilege levels against every supported and unspecified protocol-version condition
- Add regression tests for missing, unknown, and legacy protocol headers
- Monitor for low-privilege identities invoking tools outside their documented scope
- Enforce policy that privileged tools require an explicit, validated authorization decision before execution
- Automated code review tools may help identify inconsistent authorization logic across parallel handlers

