The latest 1.x release receives security fixes. Please reproduce issues on
Node.js 22 or newer.
Use GitHub private vulnerability reporting on https://github.com/obonhector/oauth-mcp-bridge/security/advisories/new. Please do not open a public issue for a suspected vulnerability.
Include the version, platform, Node version, the command you ran, and a minimal reproduction with redacted tokens. Never send a live access or refresh token.
Assets:
- OAuth access tokens, refresh tokens and client secrets.
- The PKCE verifier and the authorization
state. - The ability to act on the user's remote MCP account.
Adversaries considered:
- A malicious web page that can make the browser request
http://127.0.0.1:<port>/callbackwhile a login is in progress. - Another local process running as the same user (or a shared machine user).
- A malicious or compromised remote MCP / authorization server.
- A network attacker without TLS interception ability.
Out of scope:
- A local attacker who can already read the user's home directory or process memory.
- A compromised npm registry or GitHub account.
- Vulnerabilities in the remote provider itself.
- PKCE S256 is mandatory; the verifier never leaves the machine.
stateis exact-match: a callback with a missing or different state is rejected and the login fails. The state is rotated on every attempt.- The verifier and state are single-use and removed after the code exchange.
- The callback binds only loopback (
127.0.0.1,localhost,::1). - The callback response is
no-store,no-referrerandnosniff. - The authorization request includes the RFC 8707 resource indicator.
- Tokens are stored with
0600in a0700directory on POSIX. The defaultfilestore does not encrypt at rest; useoporlibsecretfor stronger isolation. - Client secrets are not written to
servers.json. Prefer--client-secret-envor--client-secret-stdin;--client-secretis visible in shell history andps. - State writes are atomic (temp file + rename), and a per-server lock prevents two processes from racing refresh-token rotation.
logoutattempts RFC 7009 revocation and, with--forget-client, RFC 7592 client deletion when the server supports it.- Error messages are redacted for common token fields. Tokens are never logged by the bridge itself.
- The default
filestore is plaintext JSON protected by filesystem permissions. On Windows those are the profile ACL, not POSIX0600. - A live
serveprocess holds tokens in memory.logoutrefuses to run while it is alive;--forcecan delete the state but the live process may refresh and write tokens again. Stop the bridge before logging out. --client-secreton the command line can leak via shell history, process listings, or terminal scrollback.- The proxy does not forward sampling, elicitation or roots requests from the remote server to the downstream client. A tool that needs those will fail.
serve-alldoes not rewrite resource URIs; two servers exposing the same URI collide (the first wins, with a warning).- The npm install path is a supply-chain boundary. Releases are published from GitHub Actions with npm provenance once trusted publishing is configured.
- Use a dedicated OAuth app per machine when the provider supports it.
- Prefer
op/libsecreton shared machines. - Keep
MCP_OAUTH_BRIDGE_DIRon a private filesystem, not a world-readable network share. - Run
oauth-mcp-bridge status <name> --jsonto audit expiry and scopes. - Revoke access in the provider's web console as well if you suspect a token leak; local deletion alone may not invalidate it if the provider has no revocation endpoint.