Correct me if I'm wrong, but this still required to brute-force the password to match the leaked password hash, right?
The account was using the old password hashing method, so it probably would've been pretty easy to crack. But in this case no cracking was required:
If you look at your
SMFCookie129 cookie and urldecode it, the big 40-character hexadecimal string is your bearer-authentication code which logs you in. This will be the same on all of your logged-in browsers: it's constructed as
sha1(concat(passwordHash, userSessionCode)), where userSessionCode is a long random string. When you logout, your userSessionCode is reset to something new, invalidating all of your cookies.
In some atypical cases which most users will never experience, userSessionCode is set to the empty string. This often happens to locked users, for example, and it was the case for the "admin" user. In that case, you could log into the user by setting your cookie's authentication code as being just
sha1(passwordHash). This is normally still secure, since the passwordHash itself contains an unguessable salt and won't be known to anyone without access to the database. But for users who never changed their password since the 2015 database leak, computing this code is trivial, since the exact passwordHash is in that leak.
This was a definite security flaw, though with limited impact. I would've awarded a ~$4000 bounty if someone had reported this under the security bounty program before I noticed it being exploited on the admin user. I fixed it by disallowing login cookies from users with empty userSessionCodes, which should've been how it worked all along.
Logging in with an empty userSessionCode sets it to a proper random one. So the only users who would've been affected by this are those who last legitimately logged in (i.e. with their password) before the 2015 leak, almost all of which are locked. Though I did look into it more just now, and there were 335 unlocked users with empty userSessionCodes who registered before the 2015 leak. But I looked through them, and all of them either changed their password since the leak and thus couldn't actually have been affected, or they haven't been accessed since the 2015 leak and thus were not subject to this attack. If an unlocked user had been accessed in this way, the attacker still wouldn't have been able to change their password or email, since that requires knowing the password.