Skip to content

Field manual · ATO · Part V

The Session Layer

After auth, what holds the door?

2 min readBroken Access Control

Part V: the session layer: after auth, what holds the door?

Section titled “Part V: the session layer: after auth, what holds the door?”

Why care: every other chapter in this manual ends with a session being created. This one asks how long that session, and its backups, keep working after they should have died.

5.1 Session token forensics (same discipline as reset tokens)

Section titled “5.1 Session token forensics (same discipline as reset tokens)”
1. Decode: base64? JWT? Custom structure? Signature?
2. What identifies you: userId in plain header? Cookie: user=8842?
3. Predictability: login twice, create accounts A then B — do sessions differ minimally?
4. Logout — dead or alive?
5. After password change — dead?
6. Expiry — is it how your life ends or just a suggestion?
- Sessions survive password reset, email change, 2FA enable → "I lost my device, attacker still in"
- Multiple parallel sessions survive the "log out other devices" button (the button only kills web, not mobile tokens)
- Old refresh-token still works after `refresh-token-rotation` was "fixed" three times

Key-source headers (kid path traversal, jku/x5u pointing the verifier at an attacker-hosted key) are the same forgery family as the alg:none and RS256-to-HS256 attacks. The main guide’s JWT and token flaws section has the full catalog. The ATO-specific risk is that enterprise JWTs still carry these headers long after the original login session should have expired.

5.4 Long-lived API keys and tokens: the credential that survives the reset

Section titled “5.4 Long-lived API keys and tokens: the credential that survives the reset”

Password reset is supposed to be the kill switch. It usually is not. Alongside the session cookie, modern apps hand out personal access tokens, API keys, OAuth refresh tokens, app passwords, and CI secrets. These are bearer credentials with long lives, and they frequently outlive the very event that should revoke them.

The test is one question, asked after each security event: does this credential still work?

  • Mint an API key or personal access token on an account you own.
  • Change the account password. Does the key still authenticate?
  • Trigger a full “sign out everywhere.” Does the key still authenticate?
  • Revoke one session. Do the refresh token and the key survive untouched?

A key that outlives a password reset means a thief who grabbed it once keeps access forever, and the victim’s reset does nothing. That is the finding. The same gap hides in app-specific passwords and in OAuth refresh tokens that no reset flow revokes.

Scope note: you are reading the lifecycle of your own credential across your own security events. You never test this with someone else’s key.

Next step: Part VI covers the recovery sub-flows (email change, forgot-username, security questions). They reopen the same door after the main login path is locked down.

Connections6 backlinks · 1 outgoing · 4 cross-guideFull graph →
Open local graph around this page
Open full graph →
Click a node to open · Drag to reposition · Scroll to zoom

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