Answers · Supabase

Supabase Auth before 2.198.0: could an OAuth client's access token change users through PUT /user or /admin, and how do you check?

If you run Supabase Auth with the OAuth 2.1 server turned on, upgrade to 2.198.0 or later. Before that release, an access token issued to an OAuth client was accepted on account-changing endpoints such as PUT /user, MFA, passkey and identity routes, and /admin/*, not just on the OAuth userinfo endpoint. 2.198.0 rejects those calls with 403 no_authorization. If you never enabled the OAuth 2.1 server, no OAuth client tokens exist, and this change doesn't apply to you.

This is a behavior change in the release notes and a pull request, not a published security advisory. We found no GitHub advisory or CVE for it, so we don't call it a breach or a disclosed vulnerability. Two things the sources don't say: which older versions are affected, and whether hosted Supabase projects ran the old behavior. Check your own instance and treat the audit-log steps below as a review, not a verdict.

What changed, from the release and the pull request

  • Release. supabase/auth v2.198.0 was published on GitHub on Nov 16, 2026. Its notes carry a "Behavior change: OAuth client access tokens" section: tokens issued through the OAuth 2.1 server /oauth/token flow "are now limited to OAuth endpoints and read-only user access." Normal user session tokens are not affected.
  • Now rejected with 403 no_authorization (release notes): PUT /user, /user/identities/*, /user/oauth/grants, /factors/*, /passkeys/*, /logout, /reauthenticate, /admin/* and /invite.
  • Still allowed: GET /oauth/userinfo, and GET /user. The notes call the GET /user exception temporary, so supabase.auth.getUser() keeps working for existing OAuth clients, and say a future release plans to reject OAuth client tokens on /user entirely. Pull request 2898 (merged Nov 3) originally rejected GET /user too; the follow-up fix 2926 put it back before the release.
  • Admin routes. The pull request says /admin/*, /invite and the admin captcha bypass now reject OAuth client tokens "even if the user's role is in JWT.AdminRoles." Our reading: the admin exposure needed a user whose role counted as an admin role to have authorized an OAuth client. The notes don't say that happened anywhere.
  • How it decides. The check reads oauth_client_id on the session row in the database, not the client_id claim in the token, because a custom access token hook can rewrite claims (pull request text).
  • Not in the sources: an advisory, a CVE, a first affected version, any exploitation, or whether hosted projects were exposed. The 2.198.0 notes also include many unrelated changes, so read them before you upgrade.

Who this plausibly matters to

  • Self-hosters with the OAuth 2.1 server on. The self-hosting guide enables it with GOTRUE_OAUTH_SERVER_ENABLED=true on the auth service (OAUTH_SERVER_ENABLED in the Docker .env). It is off by default.
  • Anyone who registered OAuth clients. That includes MCP-style clients, mobile apps and third-party integrations. Supabase's docs describe the feature as beta.
  • Hosted projects: the release notes say nothing about the platform, and we couldn't confirm which Auth version a given hosted project runs. If you use the OAuth server on a hosted project, the review steps below still apply.

Check your version

  1. Self-hosted Docker: read the image tag on the auth service. Pass: a tag of v2.198.0 or newer. (A latest-style tag tells you nothing; use the next step.)

    docker compose images auth
    grep -n 'image:.*auth' docker-compose.yml
  2. Ask the running service. Auth's /health handler returns a JSON object with version, name and description (source at v2.198.0). Go through your gateway or use the container's own port. Our note: the exact path prefix depends on your gateway setup, so adjust it:

    curl -s https://YOUR-DOMAIN/auth/v1/health | jq -r .version

    We tested the jq line against a local server returning that JSON shape, not against a live Auth instance. If the field says unknown version, that's the source's default for a build without a version; go by the image tag.

  3. Is the OAuth 2.1 server on? Fetch its discovery document.

    curl -s -o /dev/null -w '%{http_code}\n' 'https://YOUR-DOMAIN/.well-known/oauth-authorization-server/auth/v1'

    Supabase's self-hosting guide uses that URL to confirm the server is publishing its endpoints. A 200 with an endpoint list means it's on. Anything else means it's off or your gateway doesn't route that path, so also check that GOTRUE_OAUTH_SERVER_ENABLED isn't true on the auth service.

Review what OAuth clients could have done

  1. List the OAuth clients you registered and the users who authorized them. In the SQL editor or psql as an admin. The auth.sessions column is oauth_client_id per the Auth source; we couldn't run this against a live database, so check the column exists first:

    select oauth_client_id, user_id, created_at, ip, user_agent
    from auth.sessions
    where oauth_client_id is not null
    order by created_at desc;

    Sessions are deleted on sign-out and expiry, so an empty or short list is not proof nothing happened earlier. If you want per-client history, check your own logs too.

  2. Look at account-changing audit entries for those users. Auth writes entries such as user_modified and user_updated_password to auth.audit_log_entries when it handles PUT /user. In the Auth source we read, an entry records the actor, the action, the IP and a user agent (in the log line), but no session or client id, so you can't filter to OAuth-client calls directly. Match by user, time and IP:

    select created_at, ip_address, payload->>'actor_id' as user_id, payload->>'action' as action
    from auth.audit_log_entries
    where payload->>'action' in ('user_modified','user_updated_password','identity_linked','identity_unlinked','factor_in_progress','factor_unenrolled','factor_deleted','passkey_created','passkey_deleted')
    order by created_at desc
    limit 200;

    Our note: look for changes you can't tie to the user, such as an email, phone or password change or a new factor or passkey, from an IP that isn't theirs, shortly after they authorized a client. Not every action in the list fires on every endpoint; the list is our pick from the Auth source's action names.

  3. Admin routes: if your gateway or Auth logs record request paths, search them for /auth/v1/admin/ and /auth/v1/invite calls that didn't come from your own backend. Which of those logs you keep depends on your setup.

  4. If something doesn't fit, rotate: revoke the suspicious client (and its secret, if it's a confidential client), sign out the affected users, force a password reset, and have them re-check MFA factors and passkeys. If a client looks fine, you don't need to rotate anything just because of this release.

Upgrade, then confirm the new behavior

  1. Move the auth image to v2.198.0 or newer and recreate the container (the self-hosting guide uses sh run.sh recreate auth for the Docker setup). Back up first and read the release notes for the unrelated changes.

  2. Confirm on a test instance with a client you own. Pass: 403, with no_authorization in the body.

    curl -s -i -X PUT 'https://YOUR-TEST-DOMAIN/auth/v1/user' \
      -H "apikey: $PUBLISHABLE_KEY" -H "Authorization: Bearer $OAUTH_CLIENT_ACCESS_TOKEN" \
      -H 'Content-Type: application/json' -d '{"data":{"probe":true}}'

    Expected result is taken from the release notes; we didn't run it against a live instance. Use an account you own: a pre-fix instance would apply the change.

  3. Fix your own clients. Anything that read the user with an OAuth token should move to GET /oauth/userinfo (it returns claims by granted scope: sub, email, profile and phone claims). Anything that changed users with an OAuth token should do it from your backend with a normal user session or the service role.

Hardening: what Supabase's docs say

Related: Is my Supabase anon key safe to expose? (the RLS checks that apply to any token your project accepts), and Metr's vibe-coded dashboard: fail-open auth and API keys (what an auth check that doesn't check looks like).

  • Scopes don't protect your tables. The OAuth server docs: scopes (openid, email, profile, phone) control OIDC data, "They do not control access to your database tables or API endpoints." This release doesn't change that; Row Level Security does.
  • Use the client_id claim in RLS. The token-security guide shows (auth.jwt() ->> 'client_id') IS NULL to keep direct user sessions only, and restrictive policies to block OAuth clients from sensitive tables. Our note: test each policy with a client token before you trust it.
  • Dynamic registration. The self-hosting guide says that with OAUTH_SERVER_ALLOW_DYNAMIC_REGISTRATION=true "anyone who can reach your instance can register a client"; leave it off (the default) unless your clients, such as MCP clients, need it.
  • Least privilege and a client review. The same guide recommends giving each client only the access it needs and auditing the clients you have registered.

Checked against supabase/auth release v2.198.0 (published Nov 16), supabase/auth pull request 2898: restrict OAuth client access tokens to OAuth endpoints (merged Nov 3), supabase/auth source at v2.198.0: /health handler, audit log actions, session model, Supabase docs: Configure the OAuth 2.1 server (self-hosting), Supabase docs: Token security and Row Level Security, Supabase docs: Getting started with the OAuth 2.1 server on 2026-11-20. Only test apps and accounts you own or are allowed to test.