Skip to content
Access control Write-up Intermediate

From Cross-Subdomain Cookie Reuse to Becoming Super Admin: An Exp

The application reused authentication cookies across different organisation subdomains, so a super-admin of one organisation could authenticate to another organisation's subdomain by swapping the login response. Once authenticated, broken access control allowed the attacker to create a new super-admin account and gain full read access to the victim organisation's data.

cyberpro151 Follow

Published on medium.com

Hey everyone! Myself cyberpro151 and I’m back with a new writeup.

cyberpro151, 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

Likely the authentication cookies were not scoped to a single organisation subdomain, and the administrator endpoint lacked proper authorisation checks.

Impact

An attacker who is a super-admin of their own organisation could become super-admin of any other organisation by knowing its subdomain, gaining full read access to that organisation's data.

What the attacker needed

Super-admin credentials for one organisation; knowledge of victim organisation's subdomain; ability to intercept and modify HTTP responses

How it was found

  1. Log in to the attacker's organisation subdomain and capture the successful login response containing authentication cookies.
  2. Go to the victim's organisation subdomain login page, enter wrong credentials, and intercept the login request.
  3. Replace the victim's login response with the attacker's successful login response.
  4. Forward the request and observe that the victim's subdomain accepts the attacker's cookies.
  5. Navigate to the administrator endpoint on the victim's subdomain and create a new admin with the super-admin role.
  6. Log in with the newly created credentials to gain full access to the victim's data.

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.

When you log in, the server gives your browser a cookie that proves who you are. This application gave the same kind of cookie to every organisation's subdomain, so a cookie from one organisation worked on another. The attacker also found that the victim's subdomain did not check permissions properly, letting them create a new admin account.

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.

More by cyberpro151

View all

4 more disclosed reports, best first.

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.