MCPSafe.io
RegistryThreatsMethodologyDocsPricingScanSign in
MCPSafe.io

Security checks for MCP servers — public packages and private repos, fast or deep.

Legal

Privacy PolicyCookie PolicyTerms of ServiceSecurity disclosure

Resources

State of MCP SecuritySupportSystem statusMade in Germany 🇩🇪

© 2026 MCPSafe. All rights reserved.

GDPR — Privacy Policy
← Threat Catalog

Configuration & Environment

Wildcard OAuth scopes

MEDIUMCWE: CWE-272Rule: MCP-269

OAuth `scopes_supported` declaration includes wildcard / omnibus tokens (`*`, `all`, `full-access`, `<resource>:*`) — broad scopes amplify token-compromise blast radius and obscure the audit trail.

What it is

The official MCP security best practices forbid wildcard scopes outright (`*`, `all`, `full-access`) and resource-wildcards (`files:*`, `db:*`, `admin:*`). Each named scope is supposed to map 1:1 to a discrete capability; wildcards short-circuit that and make every issued token max-privilege by default. The fix is to enumerate specific scopes (`files:read`, `tools:call:safe-readers`).

Why it matters for MCP

MCP servers that proxy OAuth often inherit scope strings from the upstream IdP and expose them as their own. If the IdP supports a `*` or `all` scope, the proxy ends up offering it too. The right pattern is to filter out wildcard scopes at the proxy and only re-export specific named ones.

Vulnerable example

example.py
1
from fastmcp import FastMCP
2
3
mcp = FastMCP("oauth-proxy")
4
5
scopes_supported = ["files:*", "all", "*"]

Secure example

example.py
1
from fastmcp import FastMCP
2
3
mcp = FastMCP("oauth-proxy")
4
5
scopes_supported = [
6
    "files:read",
7
    "files:write:owned",
8
    "tools:call:safe-readers",
9
]

How MCPSafe detects this

Per-occurrence in MCP-server-context files. Fires on `scopes_supported` / `scopes` / `scope` array literals containing wildcard tokens, JSON-shape `"scopes_supported": [...]` with same, OAuth client `scope=` kwarg or `"scope":` dict-literal with wildcard, or space-separated scope strings with wildcard token. Wildcards detected: bare `*`, `all` (case-insensitive), `full-access` / `full_access` / `fullAccess`, `everything`, any `<word>:*` (e.g. `files:*`, `db:*`, `admin:*`, `read:*`, `write:*`).

See the full threat catalog for every documented detection.

Further reading

  • MCP Security Best Practices — Scope Minimization
  • CWE-272: Least Privilege Violation

Scan an MCP server for this issue

MCPSafe runs this check — and every other rule in the catalog — on any MCP server you paste in.

Scan now