Skip to content

Field manual · ATO · Part III

Login Itself

The classic mistakes that never die

1 min readBroken Access Control

Part III: login itself: the classic mistakes that never die

Section titled “Part III: login itself: the classic mistakes that never die”

3.1 Credential-adjacent response differences (enumeration)

Section titled “3.1 Credential-adjacent response differences (enumeration)”

Why care: these two responses alone turn a login form into a username-confirmation oracle for credential stuffing.

POST /login {"email":"real@x.com","password":"wrong"} -> "Password incorrect" (204 ms)
POST /login {"email":"fake@x.com","password":"wrong"} -> "User not found" (51 ms)

Different messages, different content-lengths, different timing. Enumeration enables credential stuffing, which is what attackers do with it in the real world. Report with impact phrased as stuffing exposure.

3.2 Type-juggling on credentials (the PHP/JavaScript classics)

Section titled “3.2 Type-juggling on credentials (the PHP/JavaScript classics)”
password[] = "anything" ← array-passing kills string comparisons
password = null
password = true ← comparison via weak truthiness
{"password":{"$gt":""}} ← NoSQL (MongoDB) — matches ANY password
{'password': {'$ne': ''}} ← old but alive: bypass with not-equal
{"email":{"$regex":"^v"}} ← login-as-first-matching-user attacks

NoSQL injection on login is characteristically tested at home: send objects where strings expected.

Step 1: password → step 2: security question → step 3: session granted
Try: request step 3's endpoint directly after step 1. Try: replay step 1, skip ahead.
The "next" state is often tracked by the session, not enforced — walk the stairs in whatever order you want.
- Login doesn't rotate the session ID → fixation (Chapter 3 of BAC guide's cousin)
- Logout doesn't kill the session server-side → replayable forever tokens
- "Keep me logged in" long-lived cookies — can you use them after password change?
- Old tokens after password reset — do old-sessions die when password changes? Many don't.

Always check whether an existing session survives a password reset. If the old session still works, the victim’s reset never evicted the attacker. Report it: “password reset does not invalidate active sessions; a stolen session persists post-breach.”

3.5 What actually got authenticated: verify the session, not the login form

Section titled “3.5 What actually got authenticated: verify the session, not the login form”
POST /login {"email":"a@x.com","password":"a's pass"}
→ session JWT: {"sub": "a@x.com", "role":"user"}
Now: login as b@x.com, but tamper the POST /login to include "uid":1042 or
swapping email case ("A@X.com") — do identity claims get echoed from the request?
"Login as whoever you claim to be" — claim-injection at login (JWT-building bugs).

Next step: Part IV covers OAuth and social login, where the same claim-trust problem happens one hop earlier, at a third-party identity provider.

Connections1 backlink · 0 outgoingFull graph →
Open local graph around this page
Open full graph →
Click a node to open · Drag to reposition · Scroll to zoom

Links out to

No outgoing internal links on this page.

Broken Access ControlFor authorized security research only: bug bounty programs, your own systems, or scoped engagements with written permission.