01Issue
Overview
Authentication verifies the identity behind a request using a password, passkey, second factor or trusted identity provider. An authentication failure occurs when the server grants access without the proof required by its policy. Authorization is a separate decision: signing in as one user must not grant access to another user’s records.
A typical login verifies the first factor, completes any required MFA, then establishes a session for that account. Before completion, a pending cookie or token should permit only the remaining authentication steps. Showing an OTP page in the browser does not protect an API that already accepts the pending credential as fully signed in.
The same identity rules must cover recovery links, remembered devices, mobile APIs and SSO. In real deployments, the weakest route often determines account security: a protected web login provides little protection if a legacy API accepts passwords alone. With SSO, the application must validate the provider’s response and account mapping rather than trust an email address or a client-supplied “verified” flag. OWASP Authentication Cheat Sheet
Common causes
- The UI requires MFA, but the backend accepts a password-only or pending session.
- Reset tokens are not bound to one account, remain valid too long or survive successful use.
- Passwords and short OTPs can be guessed repeatedly without effective server-side controls.
- Legacy, mobile or SSO routes apply weaker identity checks than the main login.
- Password, recovery-address or MFA changes accept an ordinary session without required fresh proof.
- Remembered-login tokens, default credentials or public recovery responses expose an unintended path to account access.
References: OWASP WSTG: Authentication Testing ↗OWASP Authentication Cheat Sheet ↗OWASP Forgot Password Cheat Sheet ↗OWASP MFA Cheat Sheet ↗OWASP Password Storage Cheat Sheet ↗
02Examples
MFA skipped by an API: A correct password creates PENDING_A while the browser displays an OTP prompt. If GET /api/me accepts PENDING_A and returns the synthetic private marker AUTH-A-PRIVATE-01 before MFA completes, the API has crossed the authentication boundary. Returning only challenge instructions is expected behavior.
Recovery token bound to the wrong account: A reset request contains A’s valid token and an accountId. Changing only accountId to B must not change B’s password. Confirming B’s new credential through a controlled login demonstrates the password-reset failure; an echoed B identifier does not.
Weaker mobile login: The main login requires MFA, but a supported mobile endpoint issues full access after a password alone. This is a bypass only if the account’s policy requires equivalent assurance and no approved exemption applies. Use dedicated accounts and harmless markers for every example.
03Impact
The vulnerable flow must be reachable and grant access or change authentication settings using insufficient proof. Required attacker knowledge varies: one flaw may need only a username, while another requires a stolen password, an ordinary session or a leaked recovery token. Record these prerequisites and whether MFA, a trusted-device exemption or an additional approval still prevents account access.
A confirmed failure can expose private account data, let an attacker impersonate a user or allow changes to a password, recovery address or enrolled factor. These changes can prolong access or prevent the owner from recovering the account. Administrative account compromise can have greater impact, but only when that account and its privileges are demonstrably affected.
Missing guessing controls can make password spraying, credential stuffing or OTP guessing more practical. They do not by themselves prove takeover. Likewise, account enumeration may reveal private membership or help target users, but a different error message is not evidence of authenticated access. Report the protected content, usable session or persisted account change actually demonstrated.
04Testing
Test cases
Use authorized test accounts and synthetic data. Start with a working request, change one relevant value, and verify protected content or account-state changes. Run conditional cases only when the feature exists. Requests use HTTPS unless stated otherwise; replace example endpoints and credentials with your test fixtures. For one-time tokens or state-changing tests, follow the setup and reset steps in that case.
Deny protected reads without an authenticated session
Applicability
Broadly applicable: a protected account/profile API or equivalent private read exists.
Objective
Test whether a private read requires a valid authenticated session.
Security rule
Anonymous requests must not receive A’s protected account content.
Controlled setup
A owns a private profile containing AUTH-A-PRIVATE-01; B owns AUTH-B-PRIVATE-01. Confirm the selected endpoint is private, not an intentionally public profile.
Steps
- Sign in as A using the normal workflow and send the baseline; confirm the full private marker in the network response.
- Remove only the session cookie and replay from a clean HTTP client with no Authorization header, client certificate or SSO session.
- Inspect the actual response body and server identity; do not rely on the rendered login page or status code.
Baseline request
GET /api/me HTTP/1.1
Host: app.example.test
Cookie: session=FULL_A
Baseline result
The response identifies A and contains AUTH-A-PRIVATE-01.
Test request
GET /api/me HTTP/1.1
Host: app.example.test
Changed value: Cookie session: FULL_A → absent (identity removal is the behavior under test).
Values kept the same: GET, /api/me, host, Accept/default headers and empty body; no other credential exists in either arm.
Expected secure result
Deny, redirect to sign-in without private response content, or return an anonymous representation without the marker.
Evidence confirming a finding
An unauthenticated response contains AUTH-A-PRIVATE-01 or protected synthetic profile fields, with no alternate valid authentication.
Evidence to preserve
Paired requests/responses; private/public policy; A ownership and marker; server identity; cache headers.
Likely false positives
Intentionally public fields, browser/service-worker cache, proxy-cached content, or hidden bearer/SSO credentials.
References
- OWASP WSTG: WSTG-ATHN-04 — Bypassing Authentication Schema.
- OWASP Cheat Sheet: Authentication Cheat Sheet.
Reject an incorrect password before issuing account access
Applicability
Broadly applicable to local password login. Omit for deployments that accept no passwords.
Objective
Verify that replacing the password with a known incorrect value cannot authenticate A.
Security rule
Only a verified credential may establish A’s session; client flags and generic success responses do not establish verification.
Controlled setup
Create dedicated A with the known password shown and private marker AUTH-A-PRIVATE-01. Disable remembered-device and SSO fallback for this test browser only, without changing application policy.
Steps
- Send the correct-password baseline and use its returned session to GET
/api/me; verify A’s private marker. - Discard the returned authenticated session. Replay the login with the same original preauth cookie and only password changed.
- Use only credentials returned by the test login in a clean client to request
/api/me.Never carry the baseline session into verification.
Baseline request
POST /api/login HTTP/1.1
Host: app.example.test
Cookie: preauth=PRE_A
Content-Type: application/json
{"username":"auth-a","password":"A-Only-Passphrase-7391!"}
Baseline result
Normal password login completes the required workflow; returned credentials retrieve A’s marker.
Test request
POST /api/login HTTP/1.1
Host: app.example.test
Cookie: preauth=PRE_A
Content-Type: application/json
{"username":"auth-a","password":"KNOWN-WRONG-7391!"}
Changed value: JSON password: A-Only-Passphrase-7391! → KNOWN-WRONG-7391!.
Values kept the same: Username auth-a, preauth cookie PRE_A, POST, /api/login, host and all other fields.
Expected secure result
Reject the password; no resulting credential grants A’s protected read.
Evidence confirming a finding
The test-issued credential retrieves AUTH-A-PRIVATE-01 despite the incorrect password. An anonymous cookie or success-shaped JSON alone is insufficient.
Evidence to preserve
Login pairs; sanitized session lineage; clean-client protected-read response; A’s known credential setup.
Likely false positives
Stale valid session, SSO fallback, cached /api/me, or a password accepted through a documented normalization rule rather than actually being incorrect.
References
- OWASP WSTG: WSTG-ATHN-04 — Bypassing Authentication Schema.
- OWASP Cheat Sheet: Authentication Cheat Sheet.
Keep password-only sessions restricted until MFA completes
Applicability
Conditional, common: login issues a pending/pre-MFA credential before a required second factor. Omit if no such staged session exists.
Objective
Test whether a first-factor-only credential can read MFA-protected account data.
Security rule
A pending session must not have the assurance or access of a completed MFA session.
Controlled setup
A has mandatory MFA, no trusted-device exemption and private marker AUTH-A-PRIVATE-01. Capture FULL_A after complete login and PENDING_A from a separate password-only attempt for the same A.
Steps
- Complete legitimate MFA login and send the baseline read using FULL_A.
- Replace only the session cookie with PENDING_A and send the same read before completing that challenge.
- Inspect the response and server assurance record; expire the pending session afterward.
Baseline request
GET /api/me HTTP/1.1
Host: app.example.test
Cookie: session=FULL_A
Baseline result
Full MFA session retrieves AUTH-A-PRIVATE-01.
Test request
GET /api/me HTTP/1.1
Host: app.example.test
Cookie: session=PENDING_A
Changed value: Cookie session: FULL_A → PENDING_A (assurance-stage substitution itself is under test).
Values kept the same: Same account A, GET, /api/me, host, other headers and empty body; no other credential.
Expected secure result
Deny the private read or require MFA; disclose no protected marker.
Evidence confirming a finding
PENDING_A retrieves the MFA-protected marker while its challenge is demonstrably incomplete.
Evidence to preserve
Both session assurance histories; read pairs; MFA policy/exemption record and challenge completion timestamps.
Likely false positives
Public profile data, legitimate risk-based exemption, an already completed challenge, or a separate full session sent alongside PENDING_A.
References
- OWASP WSTG: Multi-Factor Authentication — bypasses, management and OTP verification (latest).
- OWASP Cheat Sheet: Multifactor Authentication Cheat Sheet.
Reject an invalid MFA verification code
Applicability
Conditional: numeric OTP-based MFA is supported. Omit for passkey-only or push-only MFA; use their protocol-specific verification tests instead.
Objective
Check whether an incorrect OTP can complete an MFA challenge.
Security rule
The verifier must validate the submitted code against the pending challenge’s enrolled authenticator.
Controlled setup
A has a pending challenge CH-A-01. For the illustrated frozen test-time fixture only, its valid code is 482193 and 482194 is known invalid, including any adjacent accepted time windows. Restore the unconsumed challenge fixture between arms.
Steps
- Submit the valid code baseline and verify the issued full session reads A’s private marker.
- Restore the same pending challenge and pre-MFA session to their unused state; submit the same request with only code changed.
- Verify whether the test credential grants
/api/me.Do not reuse the baseline full-session cookie.
Baseline request
POST /api/mfa/verify HTTP/1.1
Host: app.example.test
Cookie: session=PENDING_A
Content-Type: application/json
{"challengeId":"CH-A-01","code":"482193"}
Baseline result
Valid OTP completes MFA and a clean protected read returns AUTH-A-PRIVATE-01.
Test request
POST /api/mfa/verify HTTP/1.1
Host: app.example.test
Cookie: session=PENDING_A
Content-Type: application/json
{"challengeId":"CH-A-01","code":"482194"}
Changed value: JSON code: 482193 → 482194.
Values kept the same: Pending A cookie, challenge CH-A-01, endpoint, method and every other value; unused challenge state restored.
Expected secure result
Deny MFA completion and keep the pending credential restricted.
Evidence confirming a finding
A test-issued credential reads AUTH-A-PRIVATE-01 after the known-invalid OTP.
Evidence to preserve
Challenge/account binding; validity-window record; verification pairs; session lineage and protected-read result.
Likely false positives
An adjacent-window valid code, an authenticator collision, restored fixture with wrong secret, or retained baseline authentication.
References
- OWASP WSTG: Multi-Factor Authentication — bypasses, management and OTP verification (latest).
- OWASP Cheat Sheet: Multifactor Authentication Cheat Sheet.
Bind recovery proof to the account whose password is reset
Applicability
Conditional, common: password-reset completion accepts an explicit account identifier together with a recovery token. Omit if the account is derived solely from the token.
Objective
Test whether A’s recovery token can reset B’s password by replacing the account identifier.
Security rule
A token for A must authorize only A’s password reset, regardless of the supplied account identifier.
Controlled setup
A and B are dedicated accounts with distinct old passwords and private markers. Obtain TOKEN_A for A through its controlled mailbox. Stage an unused-token fixture and record B’s original credential state.
Steps
- Complete A’s baseline reset and prove the new test password works for A through ordinary login.
- Restore A, TOKEN_A and reset cookie to the unused fixture; keep B unchanged. Change only accountId to B and submit.
- Attempt ordinary login as B with the submitted new password in a separate verification client, completing B’s configured MFA normally if required; inspect B’s credential-change audit. Restore both passwords and revoke reset tokens.
Baseline request
POST /api/password-reset/complete HTTP/1.1
Host: app.example.test
Cookie: reset=RESET_A
Content-Type: application/json
{"accountId":"A-100","token":"TOKEN_A","newPassword":"Reset-Only-Passphrase-7391!"}
Baseline result
A’s password changes and ordinary login proves the intended recovery flow works.
Test request
POST /api/password-reset/complete HTTP/1.1
Host: app.example.test
Cookie: reset=RESET_A
Content-Type: application/json
{"accountId":"B-200","token":"TOKEN_A","newPassword":"Reset-Only-Passphrase-7391!"}
Changed value: JSON accountId: A-100 → B-200.
Values kept the same: TOKEN_A, reset cookie RESET_A, newPassword, POST, endpoint, headers and A’s recovery proof.
Expected secure result
Reject the mismatch or reset only token-bound A according to the API contract; B’s password remains unchanged.
Evidence confirming a finding
B’s stored credential changes using A’s token, confirmed by B login with the submitted password and/or an authoritative credential-version audit. Do not claim B’s MFA was bypassed unless separately demonstrated.
Evidence to preserve
Reset pairs; token-to-A issuance record; A/B ownership; B’s before/after credential version and clean login result.
Likely false positives
An accountId field intentionally ignored while only A is reset, legitimate delegated recovery, wrong fixture ownership, or an echoed B identifier without B credential change.
References
- OWASP WSTG: WSTG-ATHN-09 — Weak Password Change or Reset Functionalities.
- OWASP Cheat Sheet: Forgot Password Cheat Sheet.
Require a valid recovery token for password reset
Applicability
Conditional, common: token-based self-service password recovery exists.
Objective
Test whether a corrupted recovery token can authorize a password change.
Security rule
Only a valid, account-bound recovery token may authorize reset completion.
Controlled setup
A’s recovery token TOKEN_A_VALID is a sanitized label for a real high-entropy token. Prepare a copy with exactly one encoded character changed while preserving syntax; label it TOKEN_A_BAD. Restore A’s old password and unused-token state between arms.
Steps
- Complete the valid-token baseline and verify A can log in with Reset-Only-Passphrase-7391!.
- Restore the original fixture and submit the same reset with the single-character-corrupted token.
- Verify A’s authoritative credential state and attempt the new password through ordinary login. Restore the account and revoke all recovery proofs.
Baseline request
POST /api/password-reset/complete HTTP/1.1
Host: app.example.test
Cookie: reset=RESET_A
Content-Type: application/json
{"token":"TOKEN_A_VALID","newPassword":"Reset-Only-Passphrase-7391!"}
Baseline result
The valid token resets A’s password and normal login succeeds.
Test request
POST /api/password-reset/complete HTTP/1.1
Host: app.example.test
Cookie: reset=RESET_A
Content-Type: application/json
{"token":"TOKEN_A_BAD","newPassword":"Reset-Only-Passphrase-7391!"}
Changed value: JSON token: TOKEN_A_VALID → TOKEN_A_BAD; in the real request this is one encoded character, not a literal placeholder swap.
Values kept the same: Reset cookie, newPassword, account derived from the original fixture, endpoint, method and headers.
Expected secure result
Reject the corrupted proof without changing A’s password or creating a usable reset grant.
Evidence confirming a finding
A’s password actually changes with the corrupted token, or the resulting grant can complete that same password-reset operation.
Evidence to preserve
Reset pairs with consistent token fingerprints; exact mutation location; issuance record; before/after credential state and login verification.
Likely false positives
Changing unused encoding/padding bits without changing decoded token bytes, a still-valid alternate recovery session, or retained baseline login credentials.
References
- OWASP WSTG: WSTG-ATHN-09 — Weak Password Change or Reset Functionalities.
- OWASP Cheat Sheet: Forgot Password Cheat Sheet.
Require current proof before changing a password
Applicability
Conditional, common: a signed-in local-password change endpoint requires the current password or an equivalent documented fresh proof.
Objective
Test whether an incorrect current password still permits a password change.
Security rule
An ordinary session alone must not replace the required current-password proof.
Controlled setup
A has a valid but non-recently-reauthenticated session SESSION_A, old password A-Only-Passphrase-7391!, and no pre-existing step-up grant. Prepare a resettable state for the baseline’s password mutation.
Steps
- Submit the legitimate current-password baseline; prove the new password works through normal login.
- Restore A’s old password and the original session/CSRF fixture without adding a reauthentication grant. Replay with only currentPassword changed.
- Verify the persisted credential version and login behavior; restore A and terminate test sessions.
Baseline request
POST /api/account/password HTTP/1.1
Host: app.example.test
Cookie: session=SESSION_A
X-CSRF-Token: CSRF_A
Content-Type: application/json
{"currentPassword":"A-Only-Passphrase-7391!","newPassword":"Changed-Only-Passphrase-7391!"}
Baseline result
The legitimate password change persists and the new password logs A in.
Test request
POST /api/account/password HTTP/1.1
Host: app.example.test
Cookie: session=SESSION_A
X-CSRF-Token: CSRF_A
Content-Type: application/json
{"currentPassword":"KNOWN-WRONG-7391!","newPassword":"Changed-Only-Passphrase-7391!"}
Changed value: JSON currentPassword: A-Only-Passphrase-7391! → KNOWN-WRONG-7391!.
Values kept the same: Session SESSION_A, CSRF_A, newPassword, method, endpoint, host and original assurance state.
Expected secure result
Deny the change and leave the old password active; an approved equivalent fresh proof may satisfy the policy only if actually present.
Evidence confirming a finding
The password changes and normal login accepts the new password despite the known-invalid required current proof.
Evidence to preserve
Change-request pairs; reauthentication policy and session age; credential version and normal-login results.
Likely false positives
A documented recent-authentication grant, equivalent passkey proof, a stale baseline fixture, or a response echoing a new password field without persisting it.
References
- OWASP WSTG: WSTG-ATHN-09 — Weak Password Change or Reset Functionalities.
- OWASP Cheat Sheet: Authentication Cheat Sheet.
Require fresh proof before disabling MFA
Applicability
Conditional: A may disable an enrolled MFA factor and policy requires a password, step-up grant or existing factor. Omit when disabling MFA is not offered.
Objective
Test whether an invalid required step-up proof can disable one existing factor.
Security rule
An ordinary authenticated session must not disable MFA without the policy-required fresh proof.
Controlled setup
A owns enrolled factor FACTOR-A-01; backup access is held by the authorized fixture owner. Record MFA-enabled state and no recent step-up. STEPUP_A is a legitimate current proof; STEPUP_BAD differs by one encoded character.
Steps
- Obtain STEPUP_A legitimately and send the baseline disable request; verify FACTOR-A-01 is disabled.
- Restore factor enrollment, session, unused step-up proof and CSRF state. Replay with only stepUpToken corrupted.
- Inspect factor state through A’s authorized settings and test the next normal login requirement. Re-enroll the factor immediately through the controlled owner workflow.
Baseline request
POST /api/mfa/factors/FACTOR-A-01/disable HTTP/1.1
Host: app.example.test
Cookie: session=SESSION_A
X-CSRF-Token: CSRF_A
Content-Type: application/json
{"stepUpToken":"STEPUP_A"}
Baseline result
The legitimate fresh proof disables only FACTOR-A-01.
Test request
POST /api/mfa/factors/FACTOR-A-01/disable HTTP/1.1
Host: app.example.test
Cookie: session=SESSION_A
X-CSRF-Token: CSRF_A
Content-Type: application/json
{"stepUpToken":"STEPUP_BAD"}
Changed value: JSON stepUpToken: STEPUP_A → STEPUP_BAD (one encoded character in the real proof).
Values kept the same: A’s session, factor ID, CSRF header, endpoint, method and original enrollment state.
Expected secure result
Deny the action and keep the factor enabled.
Evidence confirming a finding
The factor becomes disabled after the invalid proof, confirmed by persisted settings/audit and the changed factor requirement under the documented login policy.
Evidence to preserve
Paired action requests; factor owner; proof fingerprints/expiry; enrollment state before/after and audit event.
Likely false positives
An alternative required factor still active, a recent-authentication exemption explicitly allowed by policy, asynchronous UI state or a server response that reports success without disabling the factor.
References
- OWASP WSTG: Multi-Factor Authentication — bypasses, management and OTP verification (latest).
- OWASP Cheat Sheet: Multifactor Authentication Cheat Sheet.
Preserve MFA requirements on an alternative login interface
Applicability
Conditional: a deployed mobile, legacy or API login endpoint accepts the same request schema as the main login and should enforce the same account MFA policy. Omit if no alternate channel exists; for a different schema establish its own valid baseline and mutate its own MFA proof instead.
Objective
Test whether changing only the login route bypasses the same account’s mandatory MFA.
Security rule
An alternate channel must not issue full A access from password alone when the account requires MFA.
Controlled setup
A has mandatory MFA and no remembered-device or trusted-network exemption. /api/login and /api/mobile/login are actual supported routes using identical JSON and preauth cookies; document each route’s intended behavior.
Steps
- Legitimately complete the normal primary login including MFA and confirm A’s marker. Start a new password-only baseline at
/api/login; verify its documented MFA_REQUIRED pending result. - With the unchanged original preauth cookie and password body, change only the path to
/api/mobile/login. - Use only the alternate response’s credentials to request the MFA-protected
/api/me.Do not complete MFA in this arm.
Baseline request
POST /api/login HTTP/1.1
Host: app.example.test
Cookie: preauth=PRE_A
Content-Type: application/json
{"username":"auth-a","password":"A-Only-Passphrase-7391!"}
Baseline result
The complete primary workflow works; this first-stage request creates only a restricted MFA challenge.
Test request
POST /api/mobile/login HTTP/1.1
Host: app.example.test
Cookie: preauth=PRE_A
Content-Type: application/json
{"username":"auth-a","password":"A-Only-Passphrase-7391!"}
Changed value: Request path: /api/login → /api/mobile/login.
Values kept the same: POST, host, preauth PRE_A, username, password, Content-Type and absence of second-factor proof.
Expected secure result
The alternate route enforces equivalent MFA assurance before private access.
Evidence confirming a finding
The alternate route’s password-only credential retrieves AUTH-A-PRIVATE-01 without any approved MFA exemption.
Evidence to preserve
Both route contracts; primary full-login control; pending baseline; alternate request and resulting private read; assurance records.
Likely false positives
An intentionally narrower token with no private access, legitimate channel-specific authentication that already provides equivalent assurance, or a reused completed MFA session.
References
- OWASP WSTG: WSTG-ATHN-10 (v4.2) — Weaker Authentication in Alternative Channel.
- OWASP Cheat Sheet: Multifactor Authentication Cheat Sheet.
Expire recovery tokens at the documented deadline
Applicability
Conditional, common: recovery links are validated or exchanged for a restricted reset grant before final password reset. If there is no separate validation step, run the equivalent final-reset comparison in an owner-restored fixture with only token expiry/consumption state changed.
Objective
Test whether an expired recovery token can still authorize a new reset.
Security rule
A recovery token must be unusable after its documented expiry, including the allowed clock tolerance.
Controlled setup
A owns TOKEN_A. The validation endpoint does not consume the token, and validation itself grants no general login access. Record issue/expiry timestamps and token consumption events. Preserve the same reusable reset cookie RESET_A; baseline grants are kept separate and revoked after use.
Steps
- Submit the baseline validation and verify the restricted grant belongs to A. Prove the legitimate final-reset workflow with a separate sibling fixture, so TOKEN_A remains unused for the expiry comparison.
- Wait until the recorded expiry plus allowed skew, or use an owner-approved test clock without changing the token or request. Do not consume TOKEN_A.
- Replay the identical validation request. If it issues a new grant, use only that new grant to attempt a normal password reset to Lifecycle-Only-7391!, then verify the credential change through normal login. Restore A, revoke all grants and preserve the lifecycle audit.
Baseline request
POST /api/password-reset/validate HTTP/1.1
Host: app.example.test
Cookie: reset=RESET_A
Content-Type: application/json
{"token":"TOKEN_A"}
Baseline result
The live, unused token yields a restricted A reset grant; the independent legitimate reset control works.
Test request
POST /api/password-reset/validate HTTP/1.1
Host: app.example.test
Cookie: reset=RESET_A
Content-Type: application/json
{"token":"TOKEN_A"}
Changed value: Server-side TOKEN_A validity: unused and unexpired → unused and expired; elapsed time/expiry is the only tested variable.
Values kept the same: Exact method, endpoint, token, reset cookie, headers and body; this is a lifecycle/state comparison, not an input mutation. No baseline grant is sent in the test request.
Expected secure result
Reject the expired token; do not issue a grant capable of changing A’s password.
Evidence confirming a finding
A newly test-issued grant actually changes A’s password. A validation response merely saying valid or echoing accountId is not sufficient.
Evidence to preserve
Identical request/response pair; token fingerprint; issue/expiry/consumption times; allowed clock skew; new-grant lineage; before/after credential version and login result.
Likely false positives
Clock skew within policy, mistaking a new token for the old one, token consumption rather than expiry, or using a baseline grant that remained valid independently.
References
- OWASP WSTG: WSTG-ATHN-09 — Weak Password Change or Reset Functionalities.
- OWASP Cheat Sheet: Forgot Password Cheat Sheet.
Reject a recovery token after its first successful use
Applicability
Conditional, common: recovery links are validated or exchanged for a restricted reset grant before final password reset. If there is no separate validation step, run the equivalent final-reset comparison in an owner-restored fixture with only token expiry/consumption state changed.
Objective
Test whether an already consumed recovery token can still authorize a new reset.
Security rule
A recovery token must be unusable after one successful password reset, even if its nominal expiry is still in the future.
Controlled setup
A owns TOKEN_A. The validation endpoint does not consume the token, and validation itself grants no general login access. Record issue/expiry timestamps and token consumption events. Preserve the same reusable reset cookie RESET_A; baseline grants are kept separate and revoked after use.
Steps
- Submit the baseline validation and verify the restricted grant belongs to A. Prove the legitimate final-reset workflow with a separate sibling fixture, so TOKEN_A remains available for the deliberate consumption step.
- Complete one legitimate reset using the baseline grant, confirm TOKEN_A is consumed, then change A’s password again via the owner’s legitimate workflow to Intervening-Only-7391!; this lets a second reset produce a detectable final-state change.
- Replay the identical validation request. If it issues a new grant, use only that new grant to attempt a normal password reset to Lifecycle-Only-7391!, then verify the credential change through normal login. Restore A, revoke all grants and preserve the lifecycle audit.
Baseline request
POST /api/password-reset/validate HTTP/1.1
Host: app.example.test
Cookie: reset=RESET_A
Content-Type: application/json
{"token":"TOKEN_A"}
Baseline result
The live, unused token yields a restricted A reset grant; the independent legitimate reset control works.
Test request
POST /api/password-reset/validate HTTP/1.1
Host: app.example.test
Cookie: reset=RESET_A
Content-Type: application/json
{"token":"TOKEN_A"}
Changed value: Server-side TOKEN_A consumption state: unused → consumed after a completed reset; request bytes and credentials are identical.
Values kept the same: Exact method, endpoint, token, reset cookie, headers and body; this is a lifecycle/state comparison, not an input mutation. No baseline grant is sent in the test request.
Expected secure result
Reject the consumed token; do not issue a grant capable of changing A’s password.
Evidence confirming a finding
A newly test-issued grant actually changes A’s password. A validation response merely saying valid or echoing accountId is not sufficient.
Evidence to preserve
Identical request/response pair; token fingerprint; issue/expiry/consumption times; allowed clock skew; new-grant lineage; before/after credential version and login result.
Likely false positives
Validation alone does not count as token use, use of a different token, incomplete first reset, or reuse of a still-valid baseline grant rather than a newly issued one.
References
- OWASP WSTG: WSTG-ATHN-09 — Weak Password Change or Reset Functionalities.
- OWASP Cheat Sheet: Forgot Password Cheat Sheet.
Reject a code belonging to a different MFA account
Applicability
Conditional: the OTP verifier accepts a challenge ID and code. Omit for authentication mechanisms without transferable code input.
Objective
Test whether B’s valid OTP can complete A’s pending challenge.
Security rule
A challenge must accept only proof from A’s enrolled factor, not a globally valid code from another account.
Controlled setup
A and B have independent enrolled OTP secrets and pending challenges. At the controlled test time A’s valid code is 482193 and B’s is 915726; verify B’s code is not valid for A in any permitted time window. Restore the unused CH-A-01 fixture between arms.
Steps
- Submit A’s valid-code baseline and confirm its full session reads AUTH-A-PRIVATE-01.
- Restore A’s pending session/challenge without completing it; change only code to B’s known valid value.
- Use the test-issued session in a clean client to read
/api/me, then discard both accounts’ test challenges.
Baseline request
POST /api/mfa/verify HTTP/1.1
Host: app.example.test
Cookie: session=PENDING_A
Content-Type: application/json
{"challengeId":"CH-A-01","code":"482193"}
Baseline result
A’s own code completes A’s challenge and private read works.
Test request
POST /api/mfa/verify HTTP/1.1
Host: app.example.test
Cookie: session=PENDING_A
Content-Type: application/json
{"challengeId":"CH-A-01","code":"915726"}
Changed value: JSON code: 482193 (A) → 915726 (B).
Values kept the same: A’s pending cookie, CH-A-01, method, URL, headers and challenge ownership; B’s session is never sent.
Expected secure result
Reject B’s code and keep A’s challenge incomplete.
Evidence confirming a finding
B’s code produces a full A session that retrieves AUTH-A-PRIVATE-01, despite independent secrets and no collision.
Evidence to preserve
Code/challenge ownership and time-window record; verification pairs; clean-client private read and session identity.
Likely false positives
OTP coincidence, copied/shared enrollment secret, B actually delegating an approved authenticator, or baseline full-session contamination.
References
- OWASP WSTG: Multi-Factor Authentication — bypasses, management and OTP verification (latest).
- OWASP Cheat Sheet: Multifactor Authentication Cheat Sheet.
Keep login credentials off plaintext transport
Applicability
Broadly applicable to password login and other authentication forms. The HTTP comparison applies only when an actual supported client flow can begin on an unencrypted origin before HTTPS/HSTS upgrade. If the listener is absent or the browser upgrades before sending credentials, record that control and omit the plaintext credential submission.
Objective
Test whether the application’s normal login flow exposes a submitted password on an unencrypted network hop.
Security rule
The application must direct credentials over authenticated TLS before submission. Redirecting to HTTPS after receiving a plaintext password does not protect the already transmitted secret.
Controlled setup
A is a disposable local-password account with marker AUTH-A-PRIVATE-01. Use a controlled browser, test network and packet capture at the actual client-to-edge boundary, outside any TLS-terminating debugging proxy. Hold the destination host and application routing constant; the scheme/transport is the tested variable. Use only the synthetic password below. Record the browser’s HSTS state and any preloaded upgrade policy.
Steps
- Complete normal HTTPS login as A and confirm its resulting session reads AUTH-A-PRIVATE-01. Capture the legitimate form action and HTTPS POST baseline.
- Inspect the supported HTTP entry flow without submitting credentials first. If it upgrades to HTTPS before password submission, stop this case as secure for that path. If it delivers a functioning plaintext login flow, use that application-supplied form in a clean unauthenticated browser with the same fixed fields. The form must really target HTTP; do not invent an insecure form or disable HSTS to manufacture the result.
- Capture the resulting POST at the client boundary and verify whether the synthetic password crossed the network without TLS. A different port mandated by http/https is a transport consequence, not a second application field mutation. Discard comparisons where different endpoints, hidden form fields or authentication cookies changed; map an equivalent supported flow before comparing.
Baseline request
POST /api/login HTTP/1.1
Host: app.example.test
Content-Type: application/json
{"username":"auth-a","password":"A-Only-Passphrase-7391!"}
Baseline result
The request goes to https://app.example.test/api/login over verified TLS and the normal authentication workflow grants A’s private read. The JSON example represents a supported login client that serializes these same fields; use the actual client serialization unchanged in both arms.
Test request
POST /api/login HTTP/1.1
Host: app.example.test
Content-Type: application/json
{"username":"auth-a","password":"A-Only-Passphrase-7391!"}
Changed value: destination transport scheme https → http in the actual application-supported login flow. The HTTP message is byte-identical; scheme is a connection property and is not visible in an origin-form request line.
Values kept the same: username, password, method, host, /api/login, body serialization and Content-Type; both arms have no session, remembered-login, Authorization or SSO credentials. Preserve all actual client headers unrelated to transport.
Expected secure result
The browser upgrades before submitting credentials or the application redirects the credential-free entry request to HTTPS and serves no insecure credential-submission workflow. No password-bearing request crosses the observed network in plaintext.
Evidence confirming a finding
The application-supplied normal flow causes the exact synthetic credential to appear in a plaintext client-to-edge packet capture. This is protected credential disclosure even if the server later rejects or redirects the POST. A manually forced HTTP POST, missing HSTS alone, or decrypted traffic inside a debugging proxy is not sufficient evidence against the application.
Evidence to preserve
HTTPS baseline success; sanitized form/client configuration and action URL; supported HTTP-entry response; actual POST pair; transport destination; HSTS state; timestamps; restricted packet capture and a redacted report showing the credential marker outside TLS. Revoke all test credentials afterward.
Likely false positives
A TLS-intercepting local proxy exposing decrypted content, an intentionally fabricated HTTP request, a browser that upgraded before transmission, a public noncredential form, or an internal plaintext hop outside the approved observation scope. Scope internal-hop confidentiality separately when applicable.
References
- OWASP WSTG: WSTG-ATHN-01 — Credentials Transported over an Encrypted Channel.
- OWASP Cheat Sheet: Authentication — Transmit Passwords Only Over TLS.
Disable known shared or vendor-default credentials
Applicability
Conditional: the deployed product has documented factory/shared starter credentials or a seeded built-in account. Omit if no defaults exist; do not invent usernames or spray guesses.
Objective
Test whether a documented default password still grants normal access after deployment initialization.
Security rule
A completed deployment must not expose usable shared/default authentication for the built-in account.
Controlled setup
The owner supplies the exact product/version and one documented default for a synthetic built-in account auth-admin-test. A unique configured replacement password is known. Use only an isolated instance; no production administrator is targeted.
Steps
- Log in with the configured unique password and verify the protected test administrative identity/marker ADMIN-TEST-01 without executing an administrative action.
- Discard the full session; replay with only password changed to the owner-provided documented default.
- Use only the returned test credential to read the same protected identity endpoint. Stop after the single scoped candidate and restore the fixture if needed.
Baseline request
POST /api/login HTTP/1.1
Host: app.example.test
Cookie: preauth=PRE_A
Content-Type: application/json
{"username":"auth-admin-test","password":"Unique-Admin-Test-7391!"}
Baseline result
The configured unique credential authenticates the seeded test account and its protected marker is readable.
Test request
POST /api/login HTTP/1.1
Host: app.example.test
Cookie: preauth=PRE_A
Content-Type: application/json
{"username":"auth-admin-test","password":"DOCUMENTED_DEFAULT"}
Changed value: JSON password: Unique-Admin-Test-7391! → DOCUMENTED_DEFAULT; substitute the one verified vendor default in the real request.
Values kept the same: Username, preauth cookie, endpoint, method, host and all other body fields.
Expected secure result
Reject the shared default after initialization; a forced setup flow must not grant normal account access.
Evidence confirming a finding
The documented default issues a credential that reads ADMIN-TEST-01 after the instance is demonstrably initialized.
Evidence to preserve
Product/version and owner-approved default reference; initialization record; login pairs and protected identity read.
Likely false positives
Owner intentionally configured the same value as a temporary test password, an uninitialized isolated installer requiring secure setup, or a bootstrap token with no normal access.
References
- OWASP WSTG: WSTG-ATHN-02 — Default Credentials.
- OWASP Cheat Sheet: Authentication Cheat Sheet.
Enforce the password-guessing attempt budget
Applicability
Broadly applicable to password login. Requires an agreed attempt budget and enough isolation to avoid affecting other users. If the enforcement threshold exceeds the authorized test cap, report untested and review configuration rather than increasing traffic.
Objective
Test whether additional password candidates are verified after the documented account-level guessing limit.
Security rule
The application must enforce its stated account-level delay, challenge or denial policy; it need not use permanent account lockout.
Controlled setup
A is a disposable account. Owner documents threshold K, observation window, expected control and maximum K+1 safe attempts. Arrange visibility into verifier calls or rate-policy decisions; unrelated users and real password lists are excluded.
Steps
- Send the successful correct-password baseline and verify A’s private marker. Clear only the disposable account’s attempt counters via the approved owner workflow.
- Change only password to the fixed known-wrong value and repeat that exact request, sequentially and within the documented window, up to the authorized cap. Record each policy decision.
- At/after K, verify whether new password candidates are still evaluated despite a policy requiring delay/challenge/denial. Restore A’s counters. Stop on unexpected global throttling or lockout.
Baseline request
POST /api/login HTTP/1.1
Host: app.example.test
Cookie: preauth=PRE_A
Content-Type: application/json
{"username":"auth-a","password":"A-Only-Passphrase-7391!"}
Baseline result
The endpoint, A’s credential and normal login work before the attempt sequence.
Test request
POST /api/login HTTP/1.1
Host: app.example.test
Cookie: preauth=PRE_A
Content-Type: application/json
{"username":"auth-a","password":"KNOWN-WRONG-7391!"}
Changed value: JSON password: A-Only-Passphrase-7391! → KNOWN-WRONG-7391!; every failed request thereafter is byte-identical. Attempt count is the deliberately accumulated state.
Values kept the same: Username auth-a, preauth PRE_A, client route/IP, method, URL and headers; no account rotation, distributed traffic or IP-spoofing headers.
Expected secure result
Apply the documented account-level control before further guesses are evaluated; generic errors may remain unchanged.
Evidence confirming a finding
Authoritative verifier/rate-limit traces show password candidates continuing to be evaluated beyond the documented blocked budget. A 200 response, absent 429 or unchanged error text does not prove an unrestricted guessing oracle.
Evidence to preserve
Baseline success; bounded timestamped sequence; K/window/test cap; rate-policy and verifier decision records; cleanup result.
Likely false positives
Adaptive controls working silently, deliberate verification of the correct password despite failed-attempt throttling, gateway controls missing from application logs, or attempts outside the policy window.
References
- OWASP WSTG: WSTG-ATHN-03 — Weak Lock Out Mechanism.
- OWASP Cheat Sheet: Authentication Cheat Sheet.
Limit guessing of MFA codes independently of passwords
Applicability
Conditional: short numeric MFA codes are used and policy specifies a code-verification attempt budget. Omit for non-code factors.
Objective
Test whether a pending MFA challenge accepts unlimited code-verification attempts after its own budget.
Security rule
A password-authenticated pending session must still be subject to the configured code-guessing control.
Controlled setup
A has pending CH-A-01 with valid code 482193 and known-invalid 482194 at a controlled time. Owner provides code limit K and safe cap K+1, and challenge/verifier logs. Restore the unused pending fixture after baseline success.
Steps
- Verify the correct-code baseline completes MFA and reads A’s marker, then restore the pending fixture and attempt counters.
- Change only code to 482194; repeat the identical request sequentially within the code validity interval and authorized cap.
- Inspect whether OTP verification continues after the configured challenge/account budget. Stop if the challenge expires or a code becomes valid; reset the fixture for any further run.
Baseline request
POST /api/mfa/verify HTTP/1.1
Host: app.example.test
Cookie: session=PENDING_A
Content-Type: application/json
{"challengeId":"CH-A-01","code":"482193"}
Baseline result
The MFA endpoint accepts A’s correct code and grants normal protected access.
Test request
POST /api/mfa/verify HTTP/1.1
Host: app.example.test
Cookie: session=PENDING_A
Content-Type: application/json
{"challengeId":"CH-A-01","code":"482194"}
Changed value: JSON code: 482193 → 482194; subsequent test requests are identical as the attempt counter accumulates.
Values kept the same: Pending cookie, challenge ID, endpoint, method, headers and enrolled factor; only the configured attempt state evolves.
Expected secure result
Apply the documented code delay, denial, challenge invalidation or required restart before additional code guesses are verified.
Evidence confirming a finding
Verifier/audit evidence shows additional distinct guessing opportunities remain available beyond the configured blocked budget; do not infer this solely from a generic response or missing 429.
Evidence to preserve
Valid baseline and clean read; bounded failed-code sequence; code interval; K/window; challenge and verifier decisions.
Likely false positives
Code time-window rollover, wrong-password controls mistaken for OTP controls, asynchronous enforcement, or challenge expiry masking the rate-control result.
References
- OWASP WSTG: Multi-Factor Authentication — OTP attempt limits (latest).
- OWASP Cheat Sheet: Multifactor Authentication Cheat Sheet.
Enforce password strength when saving a new password
Applicability
Broadly applicable to local password creation/change. The illustrated endpoint saves one newPassword field after valid reauthentication; use the application’s actual policy. Omit for passwordless-only accounts.
Objective
Test one server-side rule: reject a password known to be on the application’s prohibited/common-password list.
Security rule
The password-saving backend must enforce its documented blocklist independently of browser-side validation.
Controlled setup
A owns a disposable account; policy explicitly rejects password123. A has SESSION_A and valid reusable proof REAUTH_A in the isolated fixture. Do not invent composition requirements or infer a universal minimum length.
Steps
- Save the allowed passphrase baseline and verify normal login with it.
- Restore A’s original credential, session, CSRF and unused reauthentication state. Submit the same endpoint with only newPassword changed to the prohibited string, bypassing UI validation.
- Verify the authoritative saved credential and attempt ordinary login with the prohibited value. Restore A immediately.
Baseline request
POST /api/account/password HTTP/1.1
Host: app.example.test
Cookie: session=SESSION_A
X-CSRF-Token: CSRF_A
Content-Type: application/json
{"reauthToken":"REAUTH_A","newPassword":"Allowed-Only-Passphrase-7391!"}
Baseline result
The allowed password persists and normal login succeeds.
Test request
POST /api/account/password HTTP/1.1
Host: app.example.test
Cookie: session=SESSION_A
X-CSRF-Token: CSRF_A
Content-Type: application/json
{"reauthToken":"REAUTH_A","newPassword":"password123"}
Changed value: JSON newPassword: Allowed-Only-Passphrase-7391! → password123.
Values kept the same: SESSION_A, REAUTH_A, CSRF_A, method, endpoint, host and all unrelated fields.
Expected secure result
Reject the prohibited value without storing it; provide only appropriate policy feedback.
Evidence confirming a finding
The backend saves the explicitly prohibited password and normal login accepts it. UI acceptance or a password-strength score is not enough.
Evidence to preserve
Exact relevant policy rule; paired saves; proof/session state; credential version and login verification.
Likely false positives
Blocklist not actually containing the chosen value, a frontend score mistaken for a mandatory rule, or a successful response that did not persist the new credential.
References
- OWASP WSTG: WSTG-ATHN-07 — Weak Password Policy.
- OWASP Cheat Sheet: Authentication Cheat Sheet.
Validate remembered-login proof before restoring a session
Applicability
Conditional: a persistent remember-me token restores login after the ordinary session is absent. Omit if the feature only remembers a username or is not offered.
Objective
Test whether a corrupted persistent-login token can authenticate its account.
Security rule
A remember-me cookie must be validated as authentication proof; an account identifier alone is insufficient.
Controlled setup
A legitimately opts into remembered login. Capture REMEMBER_A and one-character-corrupted REMEMBER_BAD with unchanged syntax/decoded-byte distinction. Remove every ordinary session and all SSO cookies. Restore the unconsumed remembered-token fixture if tokens rotate on use.
Steps
- In a clean client, send only the valid remember cookie to the documented session-restoration endpoint, then verify its newly issued session reads A’s marker.
- Restore the original unused remember proof state and send the same request changing only its token value.
- Use only the test response’s credentials to request
/api/me; revoke remembered devices afterward.
Baseline request
POST /api/session/restore HTTP/1.1
Host: app.example.test
Cookie: remember=REMEMBER_A
Baseline result
The genuine persistent token restores A’s session and protected read works.
Test request
POST /api/session/restore HTTP/1.1
Host: app.example.test
Cookie: remember=REMEMBER_BAD
Changed value: Cookie remember: REMEMBER_A → REMEMBER_BAD (one encoded character in the real token).
Values kept the same: POST, restore endpoint, host, empty body and absence of session/Authorization/SSO credentials.
Expected secure result
Deny restoration and issue no credential granting A’s private access.
Evidence confirming a finding
A corrupted token yields a usable full session and AUTH-A-PRIVATE-01 in a clean protected read.
Evidence to preserve
Remember-token fingerprints and actual mutation location; opted-in policy; restoration pairs; resulting session lineage and private read.
Likely false positives
An unchanged decoded token despite encoding mutation, a cookie that only remembers a username, residual full authentication, or a stale response.
References
- OWASP WSTG: WSTG-ATHN-05 — Vulnerable Remember Password.
- OWASP Cheat Sheet: Authentication Cheat Sheet.
Prevent unauthenticated recovery responses from disclosing private account details
Applicability
Broadly applicable to public login/recovery interfaces; the concrete case uses a recovery endpoint accepting public usernames. Protected-details disclosure applies only when that endpoint can reveal a stored nonpublic contact or profile field.
Objective
Test whether a public recovery response reveals B’s stored private recovery information.
Security rule
The requester must not learn protected recovery contact/profile information merely by supplying a username.
Controlled setup
A and B are dedicated, known accounts with private controlled recovery mailboxes a-private-7391@mail.example.test and b-private-7391@mail.example.test. Public usernames are auth-a/auth-b; the mailbox strings are not supplied in requests. Record the application’s membership-disclosure policy.
Steps
- Verify A’s normal recovery request delivers a fresh usable link to A’s controlled mailbox; do not confuse mailbox delivery with information visible to the requester.
- Replay with only username changed to auth-b. Inspect the unauthenticated network response for B’s stored private contact marker; verify B’s legitimate mailbox received the intended request.
- A separately controlled nonexistent username may be used as a further one-field comparison for enumeration indicators. Repeat only within a small approved cap. Invalidate all test links.
Baseline request
POST /api/password-reset/request HTTP/1.1
Host: app.example.test
Cookie: preauth=PRE_A
Content-Type: application/json
{"username":"auth-a"}
Baseline result
A’s controlled mailbox receives a usable A recovery link; the public response stays generic.
Test request
POST /api/password-reset/request HTTP/1.1
Host: app.example.test
Cookie: preauth=PRE_A
Content-Type: application/json
{"username":"auth-b"}
Changed value: JSON username: auth-a → auth-b.
Values kept the same: Unauthenticated preauth cookie PRE_A, endpoint, POST, host, headers and absence of any mailbox access credential.
Expected secure result
Return the documented generic acknowledgement without B’s private contact or profile fields; recovery mail may legitimately go to B.
Evidence confirming a finding
The public response discloses the stored b-private-7391 mailbox or other nonpublic synthetic field that was not submitted. Error-message/status/timing differences alone remain enumeration leads under this guide’s evidence standard, not demonstrated account takeover or protected-profile disclosure.
Evidence to preserve
Recovery pairs; public/private policy; known account/marker ownership; sanitized requester-visible content; mailbox delivery correlation without exposing links.
Likely false positives
Intentionally public usernames, user-supplied values echoed back, policy-approved masked contact hints, mail visible only in the owner’s mailbox, or caching/timing noise.
References
- OWASP WSTG: WSTG-IDNT-04 — Account Enumeration and Guessable User Account.
- OWASP Cheat Sheet: Authentication Cheat Sheet.
Testing references: OWASP WSTG: Authentication Testing ↗OWASP Authentication Cheat Sheet ↗OWASP Forgot Password Cheat Sheet ↗OWASP MFA Cheat Sheet ↗OWASP Password Storage Cheat Sheet ↗
05Mitigation
Enforce authentication on the server. Use a maintained authentication framework and apply the same assurance policy across web, API, mobile, SSO and recovery routes. Keep pending sessions restricted. Rotate the session identifier when authentication completes, and protect session cookies with appropriate Secure, HttpOnly and SameSite settings.
Protect credentials and limit guessing. Require TLS before credentials are submitted. Remove shared default passwords, screen new passwords against common or compromised values, and use a salted password-hashing algorithm such as Argon2id. Apply account-aware attempt limits, delays or challenges to password and OTP verification; combine network signals with account controls and monitor abuse without creating an easy lockout attack. OWASP Password Storage Cheat Sheet
Treat recovery as authentication. Generate unpredictable, account-bound reset tokens with short lifetimes and single use. Verify them at the final password-changing operation, not just when displaying the reset form. Rate-limit recovery requests and exclude passwords, OTPs and reset secrets from logs. OWASP Forgot Password Cheat Sheet
Protect factor and recovery changes. Require fresh authentication for sensitive changes such as disabling MFA or changing recovery details. Secure factor-recovery paths to the account’s required assurance level; a security question is not a substitute for a strong factor. Notify the owner through established channels and invalidate affected sessions or recovery proofs according to the documented recovery policy. OWASP MFA Cheat Sheet
Retest
Repeat the original bypass with the same controlled prerequisites, then verify legitimate login and recovery still work. Check the actual private response and persisted credential or factor state. Confirm equivalent enforcement on alternate routes and review audit events without retaining authentication secrets.