Skip to content
OAuth / SSO Write-up Intermediate

The Permission the Consent Screen Never Mentioned: OAuth Scope Es

The OAuth token refresh endpoint accepted a client-supplied scope parameter and issued a new access token with that scope without checking it was a subset of the originally consented scope. An attacker could silently escalate a third-party application's access to any scope, including full administrative access, without further user interaction.

T4nv1 Follow

Published on medium.com

OAuth’s consent screen is supposed to be the user’s one clear moment of informed decision-making in the entire authorization flow — a plain statement of exactly what a third-party application is about to be granted, before they click approve. This bug existed because that moment of clarity turned out to describe only…

T4nv1, on medium.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

The refresh endpoint trusted the scope parameter supplied in the refresh request instead of enforcing the scope originally approved during the consent flow as a hard upper bound.

Impact

Any third-party application integrated with Westmoor could silently escalate its own access to any scope the platform defines, independent of what the user approved, without further user interaction or notification.

What the attacker needed

A registered third-party application; a user who approves a narrow scope; a valid refresh token

The fix

The refresh endpoint was fixed to enforce the originally consented scope as a hard upper bound, rejecting any request for a broader or different scope.

How it was found

  1. Register a test application requesting only a narrow, read-only scope.
  2. Complete the consent flow as a test user, approving exactly that narrow scope.
  3. Send a token refresh request specifying a considerably broader scope than was approved.
  4. Observe that the refresh endpoint issues a new access token carrying the broader scope.
  5. Confirm via token introspection that the new token actually has the expanded permissions.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

OAuth is a way for apps to get permission to access your account without sharing your password. When you approve an app, you see a consent screen listing what it can do. This bug meant that later, when the app renewed its access token, it could ask for more permissions than you ever approved, and the system would grant them silently.

What is OAuth / SSO?

Mistakes in OAuth, OpenID Connect, SAML or token handling that leak codes and tokens or link an attacker's identity to a victim's account.

More by T4nv1

View all

113 more disclosed reports, best first.

Similar reports

View all

Same bug class and techniques, clearest first.

OAuth and single sign-on flaws

The lesson behind this report.

Mistakes in OAuth, OpenID Connect, SAML or token handling that leak codes and tokens or link an attacker's identity to a victim's account.