I Found a Backdoor That Could Log Into Any Account on a Major Web Platform
An exposed .git directory revealed source code containing a superuser login route that authenticated users via a predictable MD5 hash of a hardcoded prefix, customer ID, and date. An attacker could compute a valid authkey for any customer ID and log in as that user without a password.
Before we get into it: this was a responsible disclosure engagement, and the vulnerability has since been patched. Because the target is still active and I have an obligation to protect them, I will be redacting a lot of identifying information throughout this write-up.
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
The application used a predictable, non-secret MD5 hash as an authentication token, and the source code was exposed via a publicly accessible .git directory.
Impact
An attacker could log in as any user on the platform, view and modify personal information, and perform actions on the user's behalf, leading to full account takeover for every registered user.
What the attacker needed
Exposed .git directory; knowledge of the hash formula; valid customer ID
The fix
The vulnerability was fixed by the security team after responsible disclosure.
How it was found
- Obtain a valid customer ID (sequential integers, trivially enumerable).
- Compute the authkey using the formula: MD5 of a hardcoded prefix, the customer ID, and the current date.
- Send a request to the /pc/account/sulogin endpoint with the customer ID and computed authkey as query parameters.
- The application validates the authkey, retrieves the user record, and logs you in as that user.
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 website accidentally left its source code folder (.git) publicly accessible, so anyone could download the code. Inside, there was a special login page meant for staff that let you log in as any user if you provided a special code. That code was just a hash (a scrambled string) made from a fixed word, the user's ID number, and today's date, so anyone who read the code could calculate the correct code and log in as anyone.
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.