NIST SP 800-63B, Digital Identity Guidelines: Authentication and Lifecycle Management
The authoritative source on password policy, rate limiting, factor strength and session lifetime. It is also the document that killed mandatory password rotation and composition rules, so it is what you cite when a client insists on both. Read §5 (authenticators) and §7 (session management).
OWASP MASVS, MASVS-AUTH
The control taxonomy your report will be mapped against. Three controls: remote enforcement, local authentication correctness, step-up.
OWASP MASTG, the MASVS-AUTH test cases
The procedures. Read them alongside §7 — this chapter's ordering (proxy first, Frida last) is deliberate and the MASTG does not impose one.
W3C Web Authentication (WebAuthn) Level 3
The passkey ceremony. Read the relying party verification steps, because that is where every passkey integration is actually broken — see examples/03.
The modern unified API. Note the API-34 platform / androidx.credentials split described in §3.6.
Autofill framework and Optimize your app for autofill
What crosses the boundary to a third-party password manager, and the importantForAutofill attribute that is so often applied backwards.
Retrieve a verification code automatically (SMS Retriever API)
The permissionless OTP path, the 11-character hash, and the 140-byte message format.
Request one-time consent to read a verification code (SMS User Consent API)
Use this when you cannot control the message format.
AccountManager and Creating a custom account type
The consumer and the authenticator sides. The documentation does not tell you the storage is plaintext SQLite; §3.4 measures it.
Digital Asset Links / Verify Android App Links
The origin binding that makes a passkey app-specific. Fetch a target's assetlinks.json and read it — a wildcard, a debug certificate or a stale test package silently destroys the phishing resistance.
The SMS Retriever API is not in AOSP. It is a Google Play services component with no
public source, so its hash-matching behaviour is documented rather than verifiable. The
empirical check is whether a message carrying the computed hash is delivered.
Authentication defects rarely receive CVEs — they live in one application and its backend and
are fixed by a deployment. CWE is the correct taxonomy, and a CWE plus a clean reproduction is
stronger than an invented CVE number. See
§5.0.
CWE
Title
CWE-287
Improper Authentication
CWE-603
Use of Client-Side Authentication
CWE-306
Missing Authentication for Critical Function
CWE-307
Improper Restriction of Excessive Authentication Attempts
Authorization Bypass Through User-Controlled Key (IDOR / BOLA)
CWE-640
Weak Password Recovery Mechanism
CWE-798
Use of Hard-coded Credentials
CWE-384
Session Fixation
OWASP API Security Top 10 is worth reading alongside these: its API1 (Broken Object Level
Authorization) and API2 (Broken Authentication) are exactly §5.9
and §5.1, from the backend's side of the
same boundary.
Rather than list conference talks by title and risk misattributing them, here are the search
terms that find the current best material, which is more useful because this area moves:
"passkey relying party verification mistakes" — the recurring integration errors are
challenge reuse, unchecked origin, and trusting assetlinks.json served from infrastructure
the identity team does not control.
"OAuth and OIDC mobile app security" — for the boundary this chapter shares with
45-OAuth.
"BOLA API security testing methodology" — the two-account replay method in
§5.9 is the standard one.
"SIM swap account recovery" — the threat that bounds what SMS OTP can be worth.
"account recovery is the weakest link" — the general argument behind
§3.13, and the one
that becomes most important as passkeys remove the primary-flow weaknesses.
Recorded here because they are the kind of thing that gets "corrected" back to the wrong answer
by somebody editing from memory. All were taken on a physical Redmi M2101K6P (sweetin),
Android 11 / API 30, arm64-v8a, rooted with Magisk.
Claim
What measurement showed
Grep an APK for FLAG_SECURE to check it is set
Impossible. An Activity that provably sets it was compiled: the identifier is absent from the .class and the DEX, while setFlags survives and the constant appears only as const/16 v0, #int 8192. True-positive rate zero
AccountManager.setPassword is legacy and unused
In use on a shipping consumer device — a 352-character value in the plaintext accounts.password column
Modern bearer credentials are JWTs
117 real cached tokens, zero JWTs. 108 were opaque Google ya29 access tokens
dumpsys account masks names because of a permission check
Unconditional. Root and shell produce byte-identical masked output
A non-constant-time comparison of an OTP is a timing oracle
Did not reproduce at 6 bytes (delta −51 ns) or 64 bytes (+1 ns), locally, 200,000 samples. Distinguishable only at 512 bytes (+417 ns). ct_compare measured +0 ns at every length
Expired auth tokens are cleaned up
106 of 116 expiry records were in the past and retained indefinitely. Longest live TTL ~51 min
GET_ACCOUNTS in a manifest means the app can list accounts
Grants nothing since API 26. 7 of 17 real apps still declare it; 5 declare the removed AUTHENTICATE_ACCOUNTS
Credential Manager is available on modern devices
No credentials service below API 34.android.security.identity is present from API 30 and is a different API
Apps have moved to the permissionless OTP path
12 of 17 have SMS Retriever markers and 9 also have full-inbox SMS markers. The overlap is the finding
"Device binding" means a hardware key
15 of 17 use an OS identifier; 3 of 17 attest a key. The weak form is ~5x more common
Two of those corrected this chapter's own tooling, and the method is the transferable part:
getPassword was rated a STRONG AccountManager marker until cross-referencing the type
descriptor showed at least 2 of 15 hits were pure false positives, and the certificate parser in
sms-retriever-hash.py produced a confident, plausible, wrong fingerprint until it was
checked against apksigner. If the output looks reasonable, verify it against an independent
tool before believing it.
Owns the credential's format, storage and the eight verification failure classes — including the JWT distinction between signature failures and claim failures