← Vulnerability class · MobileApp Security

Insecure Mobile Authentication & Session Management

Authentication logic enforced only on the client, or a biometric prompt that can be bypassed, gives an attacker with device or binary access a way around checks that should have held server-side.

Typical ceiling: CriticalCWE-287CWE-305
Ask Synthreat AI about Insecure Mobile Authentication & Session Management ✦Practice this on OWASP MASTG Crackmes →

Definition

Insecure mobile authentication and session management covers the ways a mobile app’s login and session logic can be bypassed or weakened specifically because part of that logic runs on a device the attacker controls, rather than entirely on a server the developer controls. This includes authentication decisions enforced only in client-side code, biometric prompts that can be circumvented, and session tokens that don’t expire or get validated the way a well-built backend session should.

The Trust Boundary That Breaks

Web authentication logic runs almost entirely server-side: the client just presents credentials and receives a result. A mobile app, running compiled code on the user’s own device, tempts developers into moving some of that decision-making client-side, checking a login state locally, or gating access to a feature based on a flag set after a successful login, because it’s simpler and feels faster. The temptation is exactly where the trust boundary breaks: any check performed only in code running on the attacker’s own device can be inspected, patched, or bypassed by an attacker with the tools and time to reverse engineer it, which is a meaningfully lower bar than compromising a server directly.

Where It Actually Shows Up

Why It Keeps Happening

Building authentication logic that’s genuinely enforced server-side, on every relevant request, is more work than trusting a client-reported state, and a mobile app’s local biometric prompt feels like a strong security control because it’s a real, hardware-backed check on the device, even when nothing on the backend actually depends on it having succeeded. The gap between “this feels secure to a user tapping their fingerprint” and “this is actually enforced somewhere an attacker can’t bypass by patching the app” is easy to miss without dedicated mobile-specific testing.

How to Find It

  1. Test whether any request to a sensitive endpoint succeeds without a valid, server-verifiable session token, by directly crafting requests to the backend API rather than only interacting through the app’s own UI.
  2. Review whether a biometric or local device-unlock gate is backed by a server-side check, or whether bypassing the local prompt (through a modified app binary or an emulator without biometric enforcement) grants full access to the underlying session regardless.
  3. Test session token expiration by inspecting whether a token continues to work well past any expiration the client-side UI implies, confirming the server independently validates and enforces it.
  4. Review the account-recovery and password-reset flows specifically within the mobile app for verification steps weaker than the equivalent web-based flow.

Impact by Scenario

Scenario Realistic impact
Authentication and session validation are fully enforced server-side, biometric gate is a local convenience layer only Low; matches the intended security model
Client-side state contributes to an authorization decision the server doesn’t independently re-check High; a direct, patchable bypass path
Bypassing a local biometric prompt grants access to a session with no further server-side check Critical; a device-level bypass becomes a full account compromise
Session tokens never expire, or expiration is enforced only by the client High; a leaked or extracted token remains useful indefinitely

Why a Business Should Care

A mobile app’s authentication is only as strong as whatever the backend actually enforces independently of the client, and this is a genuinely counterintuitive point to raise with a client who assumes “we added biometric login” is itself a meaningful security upgrade. Biometric authentication improves the user experience and adds a real local convenience and device-level protection, but unless the backend independently validates every sensitive request, the actual security boundary a determined attacker faces is whatever is enforced server-side, and no amount of on-device polish changes that.

A Worked Example

(Generalized from real assessment patterns. Company and identifiers below are invented; no real system or data is referenced.)

During a mobile assessment of Meridian Health Analytics’ patient portal app, intercepting and directly replaying the app’s backend API requests, bypassing the app’s own UI and biometric prompt entirely, succeeds against a sensitive record-retrieval endpoint using a session token that has already passed its intended, client-displayed expiration window. This confirms the server does not independently validate token expiration, relying instead on the app’s own local enforcement.

Testing is limited to a test account created for this assessment, and confirms only that the expired token still functions against the endpoint. No other user’s session or record is accessed.

sequenceDiagram
    participant Assessor as Security Assessor
    participant App as Mobile App (Test Device)
    participant Proxy as Interception Proxy (Burp)
    participant API as Patient Portal Backend API
    participant DB as Production Health Database

    Assessor->>App: Authenticate test account & record session token
    Note over App: App displays 'Session Expired' after timeout
    Assessor->>Proxy: Replay expired Bearer token directly via HTTP request
    Proxy->>API: GET /api/v1/patient/records (Header: Bearer [ExpiredToken])
    Note over API: Backend validates signature only<br/>fails to verify server-side TTL or revocation
    API->>DB: Query test account patient records
    DB-->>API: Return test records
    API-->>Proxy: 200 OK with patient data
    Proxy-->>Assessor: Payload rendered successfully
    Note over Assessor,DB: ENGAGEMENT BOUNDARY PRESERVED<br/>Confirmed server does not enforce expiration.<br/>Zero other patient records accessed or enumerated.
    Assessor->>Assessor: Document Critical finding (Perpetual Session Validity)

Severity Calibration

This rates Critical because a token the app itself indicates has expired remains fully valid against a sensitive endpoint indefinitely, meaning any previously extracted or intercepted token (see Insecure Mobile Data Storage and Insecure Mobile Communication) provides standing, long-term access rather than a narrow window. A session-expiration gap on a low-sensitivity, read-only endpoint with no personal data would rate meaningfully lower: severity tracks what a persistently valid token actually grants access to.

Remediation

The real fix is enforcing authentication and session validity entirely server-side, independent of whatever the client claims: every sensitive request re-validates the token’s authenticity and expiration against the backend, and any biometric or local device gate is treated purely as a convenience layer sitting in front of that server-enforced check, never as a substitute for it.

The common bad fix is adding a client-side timer or local flag that “logs the user out” after a period of inactivity, without the server itself invalidating the underlying token. The user experience looks correct, an idle session appears to expire, while the actual token remains fully usable if extracted or replayed directly against the backend.

AI Technical Drill

Test Your Understanding

On-demand, Gemini-generated technical drill testing root causes, exploit chains, and verified defenses.

🤖

Generate On-Demand Technical Quiz

Synthreat AI analyzes this topic's attack surface and compiles custom multiple-choice questions with verified explanations.

Question Count: