Skip to content
Account takeover Write-up Beginner

Active Session Hijacking via Authentication session_id Exposed in URL

After a successful login the application put the active session token in the redirect URL as a query parameter. Anyone who obtained that URL could open it in a fresh browser and be logged in as the victim without credentials or cookies.

sohanxp56 Follow

Published on sohanxp56.medium.com

Session tokens are meant to stay private and secure, but when they are exposed inside a URL query string, it becomes extremely easy for attackers to steal and replay them. In this write-up, I’ll explain how I found a vulnerability where an active authentication token (sessionid) is included in the redirect URL after…

Sohan, on sohanxp56.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 login flow passed the session token as a URL query parameter instead of setting it in a cookie or POST body, so the credential travelled in a place that is logged and shareable.

Impact

An attacker who obtains the URL could replay it to take over the victim's active session across browsers and devices, though the text does not show how an attacker would obtain the URL in practice.

What the attacker needed

Attacker obtains the victim's redirect URL; victim has an active session

How it was found

  1. Log in with a valid account on the login page.
  2. Observe the redirect URL after login, which contains the session_id parameter.
  3. Copy the full URL including the session_id.
  4. Open a private window or a different browser or device with no cookies.
  5. Paste the copied URL and open it.
  6. Observe that the session loads and the user is authenticated automatically.

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 site gives your browser a secret token so it knows who you are on later visits. Here that secret was placed in the web address itself, and web addresses leak easily through history, logs, screenshots and shared links. Anyone holding the address could paste it into another browser and be logged in as the victim.

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 sohanxp56

View all

2 more disclosed reports, best first.

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.