Authentication Testing Guide: How to Find OWASP A07 Vulnerabilities

OWASP A07 — Identification and Authentication Failures — covers a broad class of vulnerabilities that all share the same root problem: the application cannot reliably verify that a user is who they claim to be, or that an authenticated session remains controlled by the right person.

Authentication is the first gate. When it fails, everything behind it is exposed. Yet authentication testing is consistently under-scoped. Security assessments that spend days fuzzing API parameters often spend hours on login flows — the most targeted entry point for real-world attackers.

This guide covers the full surface area: credential security, brute force protections, session token analysis, JWT vulnerabilities, MFA weaknesses, password reset flows, and what automated tooling can and cannot detect.

What OWASP A07 Actually Covers

The OWASP Top 10 category renamed from "Broken Authentication" (2017) to "Identification and Authentication Failures" (2021) to capture a broader scope. The category now explicitly includes:

These are not esoteric edge cases. Credential stuffing attacks process billions of username/password combinations leaked from prior breaches. Authentication bypass via session fixation is a category of vulnerability that appears in enterprise applications built by experienced teams.

Testing Credential Security

Password policy enforcement

Start at registration. What does the application actually enforce versus what it claims?

The test for common passwords is particularly important. The NIST SP 800-63B guidelines explicitly recommend blocking passwords on known-compromised password lists. Many applications have minimum length and complexity rules but nothing that prevents Password1! from being accepted.

Brute force protection

A login form with no rate limiting is a direct invitation to credential stuffing. Test the following:

Enumeration through lockout: An application that locks an account after five failed attempts and returns a different error message for "account locked" versus "wrong password" leaks whether a username exists. Even subtle timing differences can be used to enumerate valid accounts.

Username enumeration

Many applications inadvertently reveal which usernames exist through their error messages, response times, or HTTP status codes:

The correct behavior is consistent responses regardless of whether the username exists. For password reset, the NIST recommendation is to always respond with "If an account exists with that email, a reset link has been sent" — this prevents enumeration without misleading users.

Session Token Analysis

Once authentication succeeds, the application issues a session token. The security of the session depends entirely on the quality of that token.

Token entropy and predictability

Collect 20–50 session tokens and analyze them:

Use Burp Suite's Sequencer to statistically analyze token randomness. It will calculate FIPS 140-2 test results and highlight specific bit positions that show low entropy.

Cookie security attributes

For session cookies, check every attribute:

Attribute Expected value Risk if missing
Secure Present Cookie transmitted over HTTP, exposed to network sniffing
HttpOnly Present Cookie accessible to JavaScript — stolen by any XSS
SameSite Strict or Lax Cookie sent cross-origin — enables CSRF
Domain Specific subdomain Overly broad domain makes cookie accessible to sibling subdomains
Path / or restricted path Usually acceptable; verify context
Expires Appropriate duration Persistent cookies increase hijacking window

Session lifecycle

A session token that never expires is a long-term credential that provides persistent access long after the user stops actively using the application. Test:

Logout-only-deletes-cookie: The most common session management failure. The application clears the cookie on logout but never invalidates the session server-side. Capture the token before logout and replay it afterwards — if you get a 200, session invalidation is broken.

Session fixation

Session fixation occurs when an application accepts a session ID that was set before authentication, rather than issuing a new one after successful login. The attack:

  1. Attacker visits the application and gets a valid (unauthenticated) session ID
  2. Attacker tricks a victim into clicking a URL or loading a page that sets that session ID in the victim's browser (via URL parameter, JavaScript, or subdomain cookie injection)
  3. Victim authenticates — the application now associates the known session ID with the victim's identity
  4. Attacker uses the known session ID to access the victim's authenticated session

Test by extracting your pre-login session token, completing authentication, and checking whether the post-login token is a new value or the same one. If it's the same value, session fixation is confirmed.

JWT Vulnerabilities

JSON Web Tokens (JWTs) are widely used for authentication and authorization. They introduce a distinct class of vulnerabilities separate from traditional session cookies.

Algorithm confusion attacks

The original "alg:none" attack allowed JWTs with the algorithm set to none to be accepted without signature verification. Modern libraries have patched this, but the broader algorithm confusion class persists:

Tools: Burp Suite's JWT Editor extension and jwt.io for manual inspection. For automated testing, jwt_tool covers most known JWT attack vectors.

Claim manipulation

If signature verification is absent or weak, payload claims can be modified directly:

The test: decode the JWT, modify a claim, re-encode without changing the signature, and see if the application accepts it. If it does, signature verification is not functioning.

Weak signing secrets

HS256 JWTs signed with weak secrets (short strings, default values like secret, jwt, or the application name) can be cracked offline once you have a valid token. Tools like jwt-cracker or hashcat with the JWT-HMAC mode can brute-force short secrets against wordlists.

Extract a valid JWT and run it through a wordlist attack. Common weak secrets found in the wild: secret, password, changeme, the application's domain name, and values from leaked configuration files.

Multi-Factor Authentication Testing

MFA reduces the impact of stolen credentials, but implementation flaws are common.

OTP bypass through response manipulation

Some applications implement MFA client-side or with weak server-side verification. Test:

Rate limiting on OTP codes

A six-digit TOTP code has only one million possible values. Without rate limiting, it can be brute-forced online in minutes. Test:

MFA fatigue (push notification attacks)

Applications using push-based MFA (Authenticator apps that send approve/deny prompts) are vulnerable to notification fatigue. An attacker with stolen credentials can trigger repeated push notifications until a user mistakenly approves one. Test:

Backup code handling

Backup codes are single-use recovery credentials. Test whether they are truly single-use, whether they have appropriate entropy, and whether they can be brute-forced due to absent rate limiting on backup code submission.

Password Reset Flow Vulnerabilities

Password reset flows are a secondary authentication path — and often less carefully tested than the primary login.

Predictable or weak reset tokens

Request multiple password reset tokens and analyze them:

Token delivery and handling

Host header injection in reset emails

Some applications construct the password reset URL using the HTTP Host header. If the application trusts the Host header without validation:

POST /password-reset HTTP/1.1
Host: attacker.com

email=victim@example.com

The reset email may be sent with a link pointing to attacker.com. When the victim clicks it, the reset token goes to the attacker's server. Test by manipulating the Host header and checking whether the generated reset URL reflects the injected value.

What Automated Scanning Catches

Automated tools are effective for a subset of authentication testing. Knowing what they find — and what they miss — helps you plan the manual testing scope.

Issue Automated detection Manual testing required
Missing cookie security flags Yes — reliable No
No brute force protection Partial — scanners can test rate limits IP bypass techniques, header manipulation
Username enumeration via error messages Partial — error message comparison Timing-based enumeration
Logout session not invalidated Yes — Ironimo tests this No
Session fixation Partial — token comparison pre/post auth Complex injection vectors
JWT alg:none / weak secrets Yes — for common attacks Novel algorithm confusion variants
Weak password policy Yes — scanner submits weak passwords Business logic around policy bypass
Password reset token entropy No — requires multiple samples Yes — statistical analysis
MFA bypass via forced browsing Partial Yes — context-dependent
Host header injection in resets Partial Yes — requires email inspection

The pattern holds across most security testing: automated tools are reliable for structural checks (cookie flags, basic rate limiting, common token attacks) and unreliable for business logic vulnerabilities that require understanding the application's intended flow.

Testing Checklist

Before signing off an authentication test:

Remediation Priorities

When authentication vulnerabilities are found, prioritization should be:

  1. Critical: Broken session invalidation on logout, session fixation, JWT signature bypass, MFA bypass via forced browsing — these allow attackers to maintain persistence in accounts they should not have access to
  2. High: Missing rate limiting on login and password reset, username enumeration, weak password reset tokens, missing HttpOnly flag (enables XSS-based session theft)
  3. Medium: Missing SameSite attribute (requires CSRF context), no inactivity timeout, weak password policy enforcement
  4. Low/Informational: Verbose error messages that reveal stack traces, missing Secure flag on non-sensitive cookies

Authentication fixes often require coordination between frontend and backend teams. Session management changes (particularly logout invalidation and token rotation) can introduce regressions in single-page applications where session state is managed client-side. Test regression paths carefully after any session management changes.

Ironimo runs automated authentication testing across your application — checking session token security, logout invalidation, brute force protections, JWT vulnerabilities, and cookie security attributes using Kali Linux tools on every scan.

Get the structural authentication checks done automatically on every deploy, so manual testing effort goes to the business logic vulnerabilities that require human judgment.

Start free scan
← Back to blog