auth0-mcp-server
- Type
- MCP server
- Scanned
- Oct 29, 2026
- Version
- 10390b40dc48
- Files read
- 152
This MCP server lets AI coding agents manage an Auth0 tenant's applications, APIs, actions, forms, logs, and local project onboarding configurations. The biggest risk is that prompt injection can cause the agent to modify live Auth0 tenant authentication settings (such as allowed OAuth callback URLs or custom login Actions) or inject malicious environment variables into local .env files.
What it can reach
- Secrets
- Reads and writes Auth0 Management API tokens, refresh tokens, and tenant domains in the system keychain via keytar (or reads AUTH0_TOKEN and AUTH0_DOMAIN from environment variables), and fetches application client secrets to write into local .env files.
- Network
- Makes authenticated requests to the user's Auth0 Management and OAuth APIs, fetches quickstart specs and prompts from cdn.auth0.com, and sends usage analytics to heapanalytics.com unless AUTH0_MCP_ANALYTICS=false is set.
- Files
- Reads and modifies MCP client config files (Claude, Claude Code, Cursor, Windsurf, VS Code, Gemini CLI) during initialization, and reads/writes .env files, .gitignore, and state/audit logs in user-specified project directories.
- Browser
- Opens the system default web browser during the OAuth 2.0 device authorization flow when running the init command.
Findings
-
HighMutating quickstart tool matches documented read-only auth0_get_* pattern and modifies OAuth callbacks
The documentation instructs users to pass
--tools 'auth0_list_*,auth0_get_*'as an alternative way to enable only read-only operations. However,auth0_get_quickstart_guideuses theauth0_get_prefix while directly callingAPPLICATION_HANDLERS['auth0_update_application']in-process, bypassing the server's tool allowlist. Through prompt injection, an attacker can callauth0_get_quickstart_guidewith an attacker-controlledbase_urlto append malicious OAuth callback and logout URLs to an existing Auth0 application even whenauth0_update_applicationis filtered out.Fix: Rename
auth0_get_quickstart_guideso it does not matchauth0_get_*, and check thatauth0_update_applicationis enabled before mutating application settings. -
MediumNewline injection into .env files via unsanitized credential values
src/utils/credentials-writer.ts:95
When
auth0_save_credentials_to_filewrites credentials to a project's.envor.env.localfile, it concatenates keys and values without rejecting newline characters (\nor\r). Insrc/utils/env-credentials.ts,callback_url(in fallback and spec modes) andclient_id(in SPA specs where no API lookup occurs) are taken directly from tool arguments. A prompt-injected tool call can include newline sequences in these arguments to inject arbitrary environment variables (such asNODE_OPTIONSorPYTHONSTARTUP) into the project's.envfile.Fix: Reject any credential key or value containing
\r,\n, or null bytes before writing to the environment file, and validatecallback_urlas a well-formed HTTP/HTTPS URL. -
MediumIncomplete path denylist in hasProjectMarker allows writes to hidden config subpaths and symlinked system paths
hasProjectMarkeris used byauth0_onboardingandauth0_save_credentials_to_fileto prevent writing.envand.gitignorefiles into system or hidden configuration directories, but it does not check for any actual project marker files. It only blocks hidden directories in the user's home directory whenpath.basename(resolvedDir)starts with a dot, which fails to block subdirectories such as~/.config/Claudeor~/.local/bin. It also checksPOSIX_DENIED_PREFIXESbefore resolving symlinks, allowing/private/tmpor/private/etcon macOS.Fix: Resolve
projectPathwithfs.realpathSyncbefore callinghasProjectMarker, check all path segments underos.homedir()for leading dots, and include/privateand/LibraryinPOSIX_DENIED_PREFIXES. -
MediumResource server responses do not redact HS256 signing secrets
src/tools/resource-servers.ts:453
Unlike the application tools,
auth0_get_resource_server,auth0_create_resource_server, andauth0_update_resource_serverreturn the rawresourceServerobject from the Auth0 Management API without callingmaskSensitiveFields, andsigning_secretis missing fromDEFAULT_SENSITIVE_FIELDSinsrc/utils/response-masker.ts. When an API uses symmetric signing (HS256), its plaintextsigning_secretis exposed to the AI agent and client logs.Fix: Add
signing_secrettoDEFAULT_SENSITIVE_FIELDSinsrc/utils/response-masker.tsand applymaskSensitiveFields(resourceServer)insrc/tools/resource-servers.ts. -
MediumGemini CLI extension init command requests all scopes and tools without user confirmation
While the project documentation states that no scopes are requested by default so users can interactively grant least-privilege access, the
/auth0:initcommand for the Gemini CLI extension runsinitwith--tools "*" --scopes "*" --no-interaction. This automatically requests every Management API scope (including create and update permissions for clients, actions, forms, and grants) and opens the browser without interactive scope selection.Fix: Remove
--scopes "*"and--no-interactionfrom the command incommands/auth0/init.tomlso users interactively choose the scopes they need.