Skip to content
Account takeover Disclosed report Beginner

[REMOTE] Full Account Takeover At https://██████████████/CAS/

The session cookie used by the central authentication service was simply the victim's numeric user ID, so anyone who knew or guessed a six-digit ID could set the cookie and be logged in as that user. An attacker could therefore take over any account, including reading the victim's profile information.

karimrahal Follow

Originally disclosed on HackerOne

  • Triaged in 10 days
  • Fixed in 3 months
  • Disclosed after 2.5 years

Summary: A session cookie PROD_CAS_SESSION takes a User ID as an input, hence an attacker is able to insert his victim's User ID and takeover his victim's account. (P.S The User ID is only 6 numbers long).

Impact

An attacker is able to insert his victim's User ID into the cookie PROD_CAS_SESSION and takeover his victim's account.

Step-by-step Reproduction Instructions

  1. Go to https://██████/MOS/ (This is one of many websites you can do this from)
  2. Add a cookie with the domain ███, the name *PROD_CAS_SESSION, and the value should be ur victim's User ID (example: 195141).
  3. Refresh the page
  4. Done, you will be logged into your victim's account.

To Get User's Info 4. At https://████/MOS/, you will notice a dropdown on the right top corner with Welcome (Your Victim's Name), click the dropdown and click My Profile 5. Done, you will be able to see your victim's user info.

Suggested Mitigation/Remediation Actions

Add a more secure session value.

The original report as published on HackerOne, by karimrahal. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

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

How it worked

Root cause

Likely the authentication service used the user's sequential numeric ID directly as the session cookie value instead of a long random, server-validated session token.

Impact

An attacker could take over any account whose six-digit user ID they set in the cookie, and could view that victim's profile information.

What the attacker needed

Victim's user ID known or guessed; ability to set a cookie for the service domain

The fix

The session cookie should be replaced with a long random, server-side validated session value rather than the user ID.

How it was found

  1. Open one of the sites that relies on the central login service.
  2. Add a cookie for the service's domain named PROD_CAS_SESSION whose value is the victim's user ID.
  3. Refresh the page.
  4. The session is now the victim's account.
  5. Open the account dropdown and the profile page to view the victim's information.

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 report has not been written yet. The Original tab links to the source.

A website usually remembers who you are by giving your browser a random-looking session cookie after you log in. Here the cookie was not random at all: it was just the victim's user number, which is only six digits long. Anyone who could guess or learn that number could put it in their own cookie and be treated as that person, without ever knowing their password.

What is Account takeover?

Getting into someone else's account through a flaw in sign-in, password reset, second factor, single sign-on or session handling.

More by karimrahal

View all

1 more disclosed report, best first.

More from U.S. Dept Of Defense

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Account takeover

The lesson behind this report.

Getting into someone else's account through a flaw in sign-in, password reset, second factor, single sign-on or session handling.