Biometric Authentication Bypass

The application's biometric check is a client-side success or failure event rather than a cryptographic unlock, so instrumenting the app bypasses it.

SeverityMedium
CVSS 3.15.7 CVSS:3.1/AV:P/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N Open in the calculator
CVSS 4.05.3 CVSS:4.0/AV:P/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N Open in the calculator
CWECWE-603: Use of Client-Side Authentication
CategoryBroken Access Control

Description

The application uses fingerprint or face recognition to protect access, but treats the result as a simple success or failure event instead of binding it to a cryptographic key. On Android this is typically a BiometricPrompt call without a CryptoObject, where the application proceeds as soon as onAuthenticationSucceeded is called; on iOS, a call to LAContext.evaluatePolicy whose Boolean result decides whether to continue. Because the decision is made in the application's own code, anyone who can instrument the application can call the success path directly or change the result, without presenting a matching biometric, and so reach the account inside the application, view its data and use the functions the check protected, such as payments or changes to account details.

Related variants include a session token or password stored outside the Keystore or Keychain protections and released after the check, keys that remain usable after new fingerprints or faces are added to the device, and a fallback to the device passcode where the design intended biometrics only. Exploitation needs physical possession of the device and the ability to instrument the application, which in practice means the device is already rooted or jailbroken, or, for the related variants, that the attacker knows the device passcode. Remote exploitation is not possible, and the impact is higher where the biometric check is the only barrier to high-value actions.

The weakness is confirmed on a rooted or jailbroken test device, or with an instrumented build, by hooking the biometric callbacks with Frida (for example with objection's ios ui biometrics_bypass command or public Android scripts) and showing that the protected screen or function opens without a valid biometric. Code review shows whether the keys used after authentication require user authentication in the Android Keystore, or whether the secrets are protected by a biometric access control in the iOS Keychain.

Remediation

Bind biometric authentication to a key that the platform's secure hardware releases only after a successful match, and make the application depend on that key:

  • On Android, generate a key in the Android Keystore with setUserAuthenticationRequired(true) and, on Android 11 and later, setUserAuthenticationParameters(0, KeyProperties.AUTH_BIOMETRIC_STRONG), keep setInvalidatedByBiometricEnrollment(true), and pass a Cipher or Signature using that key to BiometricPrompt as a CryptoObject. Use the authenticated object to decrypt the stored token or to sign a server challenge.
  • On iOS, store the secret in the Keychain with an access control created by SecAccessControlCreateWithFlags using .biometryCurrentSet and the kSecAttrAccessibleWhenPasscodeSetThisDeviceOnly accessibility class, so that reading it requires a current biometric match, or use a Secure Enclave key to sign a server challenge.
  • Prefer designs in which the server verifies a signature made with the protected key, so that a bypass inside the application gains nothing, and keep server-side session expiry and step-up checks for high-risk actions.
  • Allow the passcode fallback only where the design intends it.

Confirm the fix by repeating the instrumentation bypass and checking that the protected function fails because the key or secret cannot be used without a real biometric match, and that adding a new fingerprint or face invalidates access.

References


Add This Finding to Your Library

In Pental this write-up is in Settings, Library. Add to my library copies it into your own, rated in your firm's CVSS version, ready to put in your own words.

Free trial  ·  No card required

Only need the reporting? Our reporting tool is free and open source, with the same library.


More Mobile Applications Findings

Every Mobile Applications finding