Skip to content
Access control Write-up Intermediate

Angular-ing for AuthZ, Problematic anti-patterns in Single Sign On Systems

The SSO login flow of an Angular application used an API key embedded in client-side JavaScript to authenticate calls to a user search API. By sending the value 'all' as the email parameter, the API returned all user records, and by modifying the client-side code an attacker could impersonate a Global Admin and access data of 7.5 million users.

Traceable ASPEN Follow

Published on traceable.ai

Authentication is one of the most crucial elements of any application. It is perhaps unsurprising that many choose to use Single Sign On (SSO) from Google, Microsoft, and others.

Traceable ASPEN, on traceable.ai

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

Likely the application used a client-side API key for authentication instead of the SSO token, and the user search API lacked proper authorization checks, allowing a wildcard value to return all users.

Impact

An attacker could gain Global Admin access to the application and access the records of 7.5 million users.

What the attacker needed

Access to the web application; Ability to modify client-side JavaScript

The fix

The vulnerability was fixed by the company after the report, and the website was taken offline to contain the issue.

How it was found

  1. Perform subdomain reconnaissance to find the Angular application with SSO.
  2. Observe the login flow: check for logged-in user, call Microsoft Graph API for email, then use email in a user search API.
  3. Try various email values in the user search API until 'all' returns all user information.
  4. Modify the Angular login function to trick the app into thinking a valid user is logged in.
  5. Short-circuit the canActivate function to return true for all routes.
  6. Modify the Microsoft Authentication Library's activateHelper function to simulate a logged-in account.

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.

Single sign-on (SSO) lets you log in once and use that identity across apps. Here, the app trusted a secret key that was visible in the browser to talk to its own API, and that API had a special search option that returned every user's details. An attacker could change the app's code in their browser to pretend to be an administrator and see everyone's data.

What is Access control?

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.

Similar reports

View all

Same bug class and techniques, clearest first.

Broken access control

The lesson behind this report.

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.