Skip to content
Account takeover Write-up Intermediate

—  …

The server issued a new valid session identifier (SID) whenever it received a malformed or missing SID, and a persistent cookie named ARL could be used to obtain working SIDs even after logout or account deletion. An attacker who obtained ARL could therefore log into and control the victim's account without credentials.

medium.com

Published on medium.com

𝘏𝘦𝘭𝘭𝘰, 𝘐’𝘮 𝐇𝒐𝐬𝐬𝐚𝐦 𝐌𝒐𝐬𝐭𝐚𝐟𝐚, 𝘬𝘯𝘰𝘸𝘯 𝘪𝘯 𝘵𝘩𝘦 𝘉𝘶𝘨 𝘏𝘶𝘯𝘵𝘪𝘯𝘨 𝘤𝘰𝘮𝘮𝘶𝘯𝘪𝘵𝘺 𝘢𝘴 𝑽𝒊𝒑𝒆𝒓. 𝘐 𝘸𝘰𝘳𝘬 𝘢𝘴 𝘢 𝘗𝘦𝘯𝘦𝘵𝘳𝘢𝘵𝘪𝘰𝘯 𝘛𝘦𝘴𝘵𝘦𝘳 𝘴𝘱𝘦𝘤𝘪𝘢𝘭𝘪𝘻𝘦𝘥 𝘪𝘯 𝘸𝘦𝘣, 𝘮𝘰𝘣𝘪𝘭𝘦, 𝘢𝘯𝘥 𝘯𝘦𝘵𝘸𝘰𝘳𝘬 𝘢𝘱𝘱𝘭𝘪𝘤𝘢𝘵𝘪𝘰𝘯𝘴. 𝘐𝘯 𝘵𝘩𝘪𝘴 𝘳𝘦𝘱𝘰𝘳𝘵 𝘐 𝘱𝘳𝘦𝘴𝘦𝘯𝘵 𝘢 𝘍𝘪𝘭𝘦-𝘜𝘱𝘭𝘰𝘢𝘥 𝘭𝘰𝘨𝘪𝘤 𝘢𝘯𝘥 𝘴𝘦𝘴𝘴𝘪𝘰𝘯 𝘭𝘦𝘷𝘦𝘳𝘢𝘨𝘦 𝘷𝘶𝘭𝘯𝘦𝘳𝘢𝘣𝘪𝘭𝘪𝘵𝘺 𝘵𝘩𝘢𝘵 𝘦𝘯𝘢𝘣𝘭𝘦𝘴 𝘢𝘤𝘤𝘰𝘶𝘯𝘵 𝘵𝘢𝘬𝘦𝘰𝘷𝘦𝘳 𝘷𝘪𝘢 𝘢 𝘱𝘦𝘳𝘴𝘪𝘴𝘵𝘦𝘯𝘵 𝘤𝘰𝘰𝘬𝘪𝘦 (ARL) — 𝘼𝙍𝙇 𝘵𝘩𝘢𝘵 𝘢𝘭𝘭𝘰𝘸𝘴 𝘵𝘩𝘦…

Hossam_Mostafa, 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 server treated the ARL cookie as sufficient proof of identity to mint new session identifiers, without checking whether the session or account was still valid.

Impact

An attacker who obtains the ARL cookie could obtain valid session IDs at will and log into and control user accounts without credentials, even after logout or account deletion; the real impact depends on how easily ARL can be obtained.

What the attacker needed

Attacker obtains the ARL cookie

The fix

The server should not issue new session identifiers based solely on a persistent cookie; it should require re-authentication and invalidate such cookies on logout or account deletion.

How it was found

  1. Send a file-upload request with a malformed or missing SID parameter.
  2. Observe that the server responds with a new SID.
  3. Try to use the new SID to log in; initially it fails.
  4. Repeat the request including all cookies; the server returns a new SID that works.
  5. Isolate cookies to find that the ARL cookie alone triggers the server to create a new SID.
  6. Verify that ARL still produces a valid SID after logout or account deletion, and that only a password change stops it.

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.

A session identifier is like a temporary key that proves you are logged in. The server was handing out new keys to anyone who presented a special long-lived cookie called ARL, even after the user had logged out or deleted their account. So if an attacker stole that ARL cookie, they could keep getting new keys and stay 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.

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.