An authentication bypass is proven when a request with no valid credential returns authenticated data or performs an authenticated action. Test the edges: an expired token, a token for a deleted user, a reset link reused twice, and a logout followed by a replay.
Where this class of bug actually lives in an authentication system
- Token confusion. A JWT accepted by an endpoint that expects a session, or an API key accepted where a user token is required.
- Sessions that outlive logout. The cookie is cleared client-side and the server still honours the old token.
- Password reset. A reset endpoint that takes an email and a new password with no proof of possession, or a link that does not expire.
- OAuth and SSO callbacks. A missing
statecheck, or a callback that trusts an email claim without verifying the domain or the issuer.
What to try first
- Take a valid token, log out, and replay it. Then wait past the stated expiry and replay again.
- Delete a user and replay their token.
- Request a reset, use the link, then use it again. Then request a reset for another account and try to transplant the token.
- Send a token minted for one audience to an endpoint that expects another.
A reproduction you can keep
Logout replay is the shortest proof and the most commonly broken:
TOKEN='***'
curl -sS -o /dev/null -w 'before %{http_code}\n' \
https://staging.example.com/api/me -H "Authorization: Bearer $TOKEN"
curl -sS -X POST https://staging.example.com/api/logout -H "Authorization: Bearer $TOKEN"
curl -sS -o /dev/null -w 'after %{http_code}\n' \
https://staging.example.com/api/me -H "Authorization: Bearer $TOKEN"
# vulnerable: before 200, after 200
# fixed: before 200, after 401What "fixed" has to look like
Server-side revocation: the logout must invalidate the token or the session record, so the replay returns 401. Verify by replaying within a second of logout and again after the expiry window; both must fail.
Where people get this wrong
- Stateless JWTs cannot be revoked without a denylist or a short expiry plus refresh rotation. Logout that only clears the cookie is theatre.
- A reset link that is valid until used is valid forever if the mail is forwarded.
- Rate limiting the login endpoint does nothing for token replay.
What Offense does here
Offense runs an agent swarm against your app in a disposable sandbox, keeps the request, the identity and the vulnerable response as evidence, and replays the same attack after the fix so the retest is a control comparison rather than a green check. It does not read your source and it does not patch your code: the finding goes to your coding agent with the reproduction attached. The hosted workspace is invite-only — join the waitlist — and the free dependency audit in /install needs no account.
Questions this page answers
Can a JWT be revoked on logout?
Not on its own. You need a server-side denylist keyed by jti, or short-lived access tokens with rotating refresh tokens that are revoked.
What is the fastest auth bypass test?
Logout, then replay the exact previous request. If it still works, sessions are not revocable.
Written by Offense Research, reviewed December 2, 2026. Correct something? Email imran@offenseresearch.com.