Skip to content
Access control Write-up Intermediate

missing session scopes lead to authentication bypass

The application used a single session cookie across all school subdomains without scoping it to the specific subdomain, so a session created for one school could be used to access another school's data by changing the Host header. An attacker with a valid account on one school could therefore read another school's user list and effectively take over that account.

Mr3Moe Follow

Published on medium.com

The session data is scoped to the user’s session. This means that data stored in the session is only accessible to the specific user who initiated the session.

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

Impact

An attacker with a valid account on one school could read another school's user data and effectively access that school's account, as demonstrated by the response containing John's users.

What the attacker needed

A valid account on one school subdomain; ability to modify the Host header or cookie

The fix

The session cookie should be scoped to the specific school subdomain, or the server should validate that the session belongs to the subdomain named in the Host header.

How it was found

  1. Log in to Bob's account on his school subdomain and open an intercepting proxy.
  2. Go to the Users page and capture the request, which includes Bob's session cookie.
  3. Change the Host header from Bob's subdomain to John's subdomain.
  4. Send the request in the proxy repeater and observe that the response contains John's users.
  5. Alternatively, copy Bob's session cookie into a new browser and paste it in the cookies section.

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 to a website, the site gives your browser a session cookie so it can remember who you are. This report says the cookie was not tied to the specific school subdomain, so a cookie from one school worked on another school's pages. That let someone with an account on one school see another school's users.

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 Mr3Moe

View all

1 more disclosed report, 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.