Jarsight has 129 rules. Each finding in a report carries its rule ID and a link to
its entry on this page, with what the rule detects, why it matters and how to fix it.
Vulnerabilities in libraries are not listed here: their IDs are those of the advisories (CVE, GHSA, Retire.js),
and their severity comes from the advisory. See Severities.
Manifest
Checks of AndroidManifest.xml and the network security configuration it points to.
What it detects
android:debuggable="true" on the <application> element.
Why it matters
Anyone with physical or ADB access to a device can attach a debugger to the app, read and change its memory, and run commands with its permissions (run-as), including reading its private files. Release builds should never be debuggable.
How to fix it
Remove android:debuggable from the manifest and let the build system set it: Gradle makes debug builds debuggable and release builds not. Check that debuggable is not set to true in the release build type.
https://developer.android.com/guide/topics/manifest/application-element#debug · CWE-489
JRS-MANIFEST-002 Application data can be backed up
- MEDIUM
android:allowBackup="true" is set explicitly, without backup rules
- LOW
android:allowBackup is not set (it defaults to true), or backup rules are defined
What it detects
Apps whose data is included in Android backups and device-to-device transfers.
Why it matters
Files, databases and shared preferences of the app end up in backups, where they can be extracted (for example with adb backup on older Android versions) or restored onto another device, together with tokens and session data.
How to fix it
Set android:allowBackup="false" if the app does not need backups. Otherwise, define which files are backed up with android:dataExtractionRules (Android 12+) and android:fullBackupContent, and leave out tokens, keys and personal data.
https://developer.android.com/guide/topics/data/autobackup · https://developer.android.com/guide/topics/manifest/application-element#allowbackup · CWE-530
- MEDIUM cleartext traffic is enabled explicitly for all domains (
android:usesCleartextTraffic="true" or cleartextTrafficPermitted="true" in base-config)
- LOW it is enabled by default (
targetSdkVersion below 28), or only for some domains
What it detects
Apps whose network security policy lets them use unencrypted HTTP.
Why it matters
HTTP traffic can be read and modified by anyone on the network path: public Wi-Fi, a compromised router, a malicious VPN. Pages and data loaded over HTTP can be replaced.
How to fix it
Use HTTPS for every connection and block cleartext traffic: set android:usesCleartextTraffic="false", or cleartextTrafficPermitted="false" in the base-config of the network security configuration. If a server cannot use HTTPS, allow cleartext only for its domain in a domain-config.
https://developer.android.com/privacy-and-security/security-config#CleartextTrafficPermitted · https://developer.android.com/privacy-and-security/risks/cleartext-communications · CWE-319
JRS-MANIFEST-004 Exported component not protected by a permission
- MEDIUM a service, broadcast receiver or content provider
- LOW an activity
What it detects
Activities, services, receivers and providers that other apps can start or query (android:exported="true", or exported implicitly by an intent filter on old target SDKs) and that are not protected by a permission, or only by a normal or dangerous one, which any app can obtain. The launcher activity is not reported.
Why it matters
Any app on the device can call the component with data it chooses. Depending on what the component does, that can leak data, trigger actions on the user's behalf or reach code that was meant to be internal. Services, receivers and providers usually do more with their input than activities.
How to fix it
Set android:exported="false" on components that only the app itself uses. For components that other apps must reach, require a permission (android:permission, with protectionLevel="signature" for your own apps) and validate every input.
https://developer.android.com/privacy-and-security/risks/android-exported · https://developer.android.com/guide/topics/manifest/activity-element#exported · CWE-926
JRS-MANIFEST-005 Supports Android versions older than 7.0
What it detects
minSdkVersion below 24.
Why it matters
The app can be installed on Android versions that no longer receive security updates, and that trust user-installed certificates by default and lack other platform protections.
How to fix it
Raise minSdkVersion when your users allow it. If old versions must stay supported, keep in mind that the platform protects the app less there.
https://developer.android.com/guide/topics/manifest/uses-sdk-element
- HIGH the
base-config of the network security configuration trusts user certificates for every connection
- MEDIUM user certificates are trusted by default (
targetSdkVersion below 24), only for some domains, or by debug-overrides in a debuggable build
What it detects
Apps that accept HTTPS certificates issued by certificate authorities the user (or someone with access to the device) installed.
Why it matters
Whoever installs a certificate authority on the device, such as malware, a company profile or an attacker with brief access, can intercept and change the app's HTTPS traffic.
How to fix it
Trust only system certificate authorities: remove <certificates src="user"/> from the network security configuration, and target API 24 or later. To test with an intercepting proxy, trust user certificates only in debug-overrides, which apply to debuggable builds.
https://developer.android.com/privacy-and-security/security-config#TrustingAdditionalCas · CWE-295
What it detects
android:testOnly="true" on the <application> element.
Why it matters
Android Studio sets it on builds launched from the IDE. A test build is rarely meant to be distributed, and may include debug code or settings.
How to fix it
Distribute builds made with ./gradlew assembleRelease (or bundleRelease), not the APK Android Studio installs when you run the app.
https://developer.android.com/guide/topics/manifest/application-element#testOnly · CWE-489
JRS-MANIFEST-008 Activities open to task hijacking (StrandHogg)
What it detects
Apps that run on Android 10 or older (minSdkVersion below 30) with activities that use launchMode="singleTask" or allowTaskReparenting="true" and the default task affinity (the package name) or another non-empty one.
Why it matters
A malicious app installed on the same device can declare the same task affinity and place its own activity in the app's task. When the user opens the app, they see the attacker's screen, for example a fake login page, instead of the real one. Android 11 closed this; it requires malware on the device.
How to fix it
Set android:taskAffinity="" on the reported activities, or on the <application> element for all of them, unless the app relies on task affinities. Avoid allowTaskReparenting="true".
https://developer.android.com/privacy-and-security/risks/strandhogg · https://developer.android.com/guide/topics/manifest/activity-element#aff · CWE-1021
What it detects
android:requestLegacyExternalStorage="true" with targetSdkVersion 29.
Why it matters
On Android 10, the app keeps the old model of shared storage, where files it writes to external storage can be read by other apps with storage permission.
How to fix it
Migrate to scoped storage (app-specific directories, MediaStore, the Storage Access Framework) and remove requestLegacyExternalStorage. Targeting API 30 or later ignores it.
https://developer.android.com/training/data-storage/use-cases#opt-out-in-production-app · CWE-276
What it detects
Intent filters that open http and https links for named domains without android:autoVerify="true", in apps that run on Android 11 or older.
Why it matters
Without App Links verification, any app can register the same links. On older Android versions the user is asked which app opens them, and a malicious app can receive links meant for this one, with the tokens they may carry (password resets, OAuth redirects). If the links belong to other sites, this is expected.
How to fix it
Add android:autoVerify="true" to the intent filter and publish /.well-known/assetlinks.json on each domain. Never send secrets in links that an unverified filter receives.
https://developer.android.com/training/app-links/verify-android-applinks · CWE-939
Signing
Checks of the APK signature and the signing certificates.
JRS-SIGN-001 APK signed with the Android debug certificate
What it detects
APKs signed with the debug certificate Android Studio generates (CN=Android Debug).
Why it matters
The app is a debug build, not the one meant for users, and the debug key is not protected like a release key: updates signed with it cannot be trusted.
How to fix it
Sign releases with your release key, or with Play App Signing, never with debug.keystore.
https://developer.android.com/studio/publish/app-signing
JRS-SIGN-002 APK signed only with the v1 (JAR) scheme
What it detects
APKs with a v1 (JAR) signature and no v2, v3 or v4 signature.
Why it matters
Android 5.0 to 8.0 without the December 2017 patch accept APKs with extra data that the v1 signature does not cover (Janus, CVE-2017-13156), so an attacker can inject code into a signed APK.
How to fix it
Sign with the v2 scheme or later: apksigner and the Android Gradle plugin do it by default unless v2SigningEnabled false is set.
https://source.android.com/docs/security/features/apksigning · https://nvd.nist.gov/vuln/detail/CVE-2017-13156 · CWE-347
JRS-SIGN-003 APK signed with a weak key
- HIGH an RSA or DSA key under 1024 bits, or an EC key under 224 bits
- MEDIUM an RSA or DSA key of 1024 to 2047 bits
What it detects
Signing keys shorter than current recommendations.
Why it matters
Whoever recovers the private key can sign updates that Android installs over the app, with access to all its data. 1024-bit RSA is within reach of well-funded attackers; shorter keys, of anyone.
How to fix it
Rotate to a key of at least 2048 bits (RSA) or 256 bits (EC) with APK Signature Scheme v3 key rotation, or with Play App Signing.
https://source.android.com/docs/security/features/apksigning/v3 · CWE-326
JRS-SIGN-004 v1 signature uses a weak digest
What it detects
v1-only signatures whose digests are MD5 or SHA-1.
Why it matters
Collisions can be computed for MD5, and at a high cost for SHA-1, which would let an attacker replace signed content on devices that only check the v1 signature.
How to fix it
Sign with the v2 scheme or later, whose digests are SHA-256 or stronger.
https://source.android.com/docs/security/features/apksigning · CWE-328
JRS-SIGN-005 Signing certificate has expired
What it detects
Signing certificates past their validity date.
Why it matters
Android does not check certificate dates when it installs apps, but an expired certificate is a sign of an old or unmaintained signing setup, and some stores and tools reject it.
How to fix it
No action is needed for Android itself. For new apps, create keys valid for at least 25 years, as Google Play requires.
https://developer.android.com/studio/publish/app-signing
Cordova
Checks of config.xml in Cordova apps, whose code runs in a WebView with access to native plugins.
JRS-CORDOVA-001 Cordova WebView can navigate to any site
What it detects
An <allow-navigation> entry that matches every host (*, http://*/*, https://*/*).
Why it matters
The WebView can load any site in the app's main frame, where pages have access to every Cordova plugin: files, camera, contacts, whatever the app can do.
How to fix it
List only the origins the app must navigate to in <allow-navigation>, and open other links in the browser (<allow-intent>, or the InAppBrowser plugin, which has no plugin access).
https://cordova.apache.org/docs/en/latest/guide/appdev/allowlist/ · CWE-749
JRS-CORDOVA-002 Cordova app can reach any network origin
What it detects
<access origin="*">, which the default Cordova template includes.
Why it matters
The app's code can send requests to any server. Since cordova-android 4 it no longer controls navigation, so the risk is limited, but it removes a layer of defense.
How to fix it
List the servers the app uses in <access origin>, and set a Content Security Policy in index.html.
https://cordova.apache.org/docs/en/latest/guide/appdev/allowlist/ · CWE-942
JRS-CORDOVA-003 Cordova app can open any URL in other apps
What it detects
<allow-intent href="*">.
Why it matters
Any link in the app's pages can launch other apps with arbitrary URLs and schemes, which injected content can abuse.
How to fix it
Allow only the schemes the app needs, such as https://*/*, tel:* or mailto:*.
https://cordova.apache.org/docs/en/latest/guide/appdev/allowlist/
JRS-CORDOVA-004 Cordova app loads its pages from file:// URLs
What it detects
<preference name="AndroidInsecureFileModeEnabled" value="true">.
Why it matters
Pages served from file:// run with file access, so a script injected into the app can read local files, as in Cordova apps before cordova-android 10.
How to fix it
Remove the preference: the app is then served from https://localhost, with the same-origin rules of a website.
https://cordova.apache.org/docs/en/latest/config_ref/ · CWE-552
JRS-CORDOVA-005 Cordova WebView can navigate to a cleartext site
What it detects
An <allow-navigation> entry for an http:// origin.
Why it matters
Pages from that origin travel unencrypted and get access to the Cordova plugins, so anyone on the network path can inject code with the app's native capabilities.
How to fix it
Use https:// for every origin in <allow-navigation>.
https://cordova.apache.org/docs/en/latest/guide/appdev/allowlist/ · CWE-319
Native libraries
Exploit mitigations of the native libraries (lib/*/*.so), as checksec reports them. Each rule reports how many libraries lack the mitigation, once per app.
JRS-NATIVE-001 Native libraries with an executable stack
What it detects
Libraries whose PT_GNU_STACK program header marks the stack executable.
Why it matters
A memory corruption bug in the library becomes easier to exploit: code written to the stack can run.
How to fix it
Rebuild with a current NDK, which marks the stack non-executable, and check that no assembly file or linker flag (-z execstack) asks for an executable one.
https://developer.android.com/ndk/guides/abis · https://github.com/slimm609/checksec · CWE-119
JRS-NATIVE-002 Native libraries with writable and executable segments
What it detects
Libraries with a loadable segment that is both writable and executable (W^X violation).
Why it matters
An attacker who can write to memory can write code into that segment and run it, which the separation of writable and executable memory normally prevents. Android refuses to load such libraries for apps targeting API 26 or later.
How to fix it
Rebuild with a current NDK and remove linker scripts or flags that merge code and data segments.
https://developer.android.com/ndk/guides/abis · https://android.googlesource.com/platform/bionic/+/main/android-changes-for-ndk-developers.md · https://github.com/slimm609/checksec · CWE-119
JRS-NATIVE-003 Native libraries with text relocations
What it detects
Libraries with text relocations (DT_TEXTREL).
Why it matters
The code segment has to be made writable while the library loads. Android refuses to load such libraries for apps targeting API 23 or later.
How to fix it
Compile every object of the library as position-independent code (-fPIC), including assembly files.
https://developer.android.com/ndk/guides/abis · https://android.googlesource.com/platform/bionic/+/main/android-changes-for-ndk-developers.md · https://github.com/slimm609/checksec · CWE-119
JRS-NATIVE-004 Native libraries without RELRO
What it detects
Libraries with relocations and no PT_GNU_RELRO segment.
Why it matters
The tables of addresses the library uses to call functions stay writable after loading, so a memory corruption bug can redirect a call to the attacker's code.
How to fix it
Rebuild with a current NDK, which links with -z relro -z now by default, and remove -z norelro.
https://developer.android.com/ndk/guides/abis · https://github.com/slimm609/checksec · CWE-119
JRS-NATIVE-005 Native libraries without stack canaries
What it detects
C and C++ libraries that use buffer functions (strcpy, memcpy, sprintf...) and do not import __stack_chk_fail. Go, Rust and Dart libraries, and libc++_shared.so, are not reported.
Why it matters
Stack buffer overflows are not detected before the function returns, which makes them easier to exploit.
How to fix it
Compile with -fstack-protector-strong (the NDK default) and check that no build script adds -fno-stack-protector.
https://developer.android.com/ndk/guides/abis · https://github.com/slimm609/checksec · CWE-121
Secrets
Credentials and other sensitive values in the app's code, resources, assets and native libraries. Reports show at most half of a secret, with a SHA-256 fingerprint. Jarsight does not test whether a key is valid.
What it detects
An AWS access key ID is embedded in the app; its secret access key is usually shipped next to it. A credential embedded in the app can be extracted by anyone who downloads it. Revoke it, rotate it and move the operation that needs it to a backend.
How to fix it
Treat the credential as compromised: anyone who downloads the app can extract it. Revoke and rotate it, then move the operation that needs it to your backend, which the app calls with the user's own session. If the credential is harmless (already revoked, or without permissions), leave the finding out with --ignore-rule.
https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_access-keys.html · CWE-798
What it detects
A Google API key is embedded in the app. Keys for client-side APIs (Maps, Firebase) are meant to ship in apps, but they must be restricted to this app's package and signing certificate and to the APIs it needs, or anyone can use the project's quota.
How to fix it
This value is meant to ship in apps, or is a test key, so it is not a leak by itself. Restrict it: API restrictions and app signatures for Google API keys, security rules for Firebase databases. Keep test keys out of release builds.
https://cloud.google.com/docs/authentication/api-keys#securing
What it detects
A Google OAuth client secret is embedded in the app. Mobile apps must use a client without a secret (PKCE). A credential embedded in the app can be extracted by anyone who downloads it. Revoke it, rotate it and move the operation that needs it to a backend.
How to fix it
Treat the credential as compromised: anyone who downloads the app can extract it. Revoke and rotate it, then move the operation that needs it to your backend, which the app calls with the user's own session. If the credential is harmless (already revoked, or without permissions), leave the finding out with --ignore-rule.
https://developers.google.com/identity/protocols/oauth2/native-app · CWE-798
What it detects
A Stripe live secret key gives full access to the Stripe account: charges, refunds and customer data. A credential embedded in the app can be extracted by anyone who downloads it. Revoke it, rotate it and move the operation that needs it to a backend.
How to fix it
Treat the credential as compromised: anyone who downloads the app can extract it. Revoke and rotate it, then move the operation that needs it to your backend, which the app calls with the user's own session. If the credential is harmless (already revoked, or without permissions), leave the finding out with --ignore-rule.
https://docs.stripe.com/keys#safe-keys · CWE-798
What it detects
A Stripe live restricted key grants the permissions it was created with on the Stripe account. A credential embedded in the app can be extracted by anyone who downloads it. Revoke it, rotate it and move the operation that needs it to a backend.
How to fix it
Treat the credential as compromised: anyone who downloads the app can extract it. Revoke and rotate it, then move the operation that needs it to your backend, which the app calls with the user's own session. If the credential is harmless (already revoked, or without permissions), leave the finding out with --ignore-rule.
https://docs.stripe.com/keys#limit-access · CWE-798
What it detects
A GitHub token gives access to repositories and settings of its owner. A credential embedded in the app can be extracted by anyone who downloads it. Revoke it, rotate it and move the operation that needs it to a backend.
How to fix it
Treat the credential as compromised: anyone who downloads the app can extract it. Revoke and rotate it, then move the operation that needs it to your backend, which the app calls with the user's own session. If the credential is harmless (already revoked, or without permissions), leave the finding out with --ignore-rule.
https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/about-authentication-to-github#githubs-token-formats · CWE-798
What it detects
A GitHub fine-grained personal access token gives access to the repositories it was granted. A credential embedded in the app can be extracted by anyone who downloads it. Revoke it, rotate it and move the operation that needs it to a backend.
How to fix it
Treat the credential as compromised: anyone who downloads the app can extract it. Revoke and rotate it, then move the operation that needs it to your backend, which the app calls with the user's own session. If the credential is harmless (already revoked, or without permissions), leave the finding out with --ignore-rule.
https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens · CWE-798
What it detects
A Slack token can read and post messages in the workspace it belongs to. A credential embedded in the app can be extracted by anyone who downloads it. Revoke it, rotate it and move the operation that needs it to a backend.
How to fix it
Treat the credential as compromised: anyone who downloads the app can extract it. Revoke and rotate it, then move the operation that needs it to your backend, which the app calls with the user's own session. If the credential is harmless (already revoked, or without permissions), leave the finding out with --ignore-rule.
https://api.slack.com/authentication/token-types · CWE-798
What it detects
Anyone with a Slack incoming webhook URL can post messages to its channel, e.g. for phishing. A credential embedded in the app can be extracted by anyone who downloads it. Revoke it, rotate it and move the operation that needs it to a backend.
How to fix it
Treat the credential as compromised: anyone who downloads the app can extract it. Revoke and rotate it, then move the operation that needs it to your backend, which the app calls with the user's own session. If the credential is harmless (already revoked, or without permissions), leave the finding out with --ignore-rule.
https://api.slack.com/messaging/webhooks · CWE-798
What it detects
A SendGrid API key can send email as the account's verified senders, a common phishing vector. A credential embedded in the app can be extracted by anyone who downloads it. Revoke it, rotate it and move the operation that needs it to a backend.
How to fix it
Treat the credential as compromised: anyone who downloads the app can extract it. Revoke and rotate it, then move the operation that needs it to your backend, which the app calls with the user's own session. If the credential is harmless (already revoked, or without permissions), leave the finding out with --ignore-rule.
https://www.twilio.com/docs/sendgrid/ui/account-and-settings/api-keys · CWE-798
What it detects
An OpenAI API key lets anyone use the account, at the owner's expense. A credential embedded in the app can be extracted by anyone who downloads it. Revoke it, rotate it and move the operation that needs it to a backend.
How to fix it
Treat the credential as compromised: anyone who downloads the app can extract it. Revoke and rotate it, then move the operation that needs it to your backend, which the app calls with the user's own session. If the credential is harmless (already revoked, or without permissions), leave the finding out with --ignore-rule.
https://help.openai.com/en/articles/5112595-best-practices-for-api-key-safety · CWE-798
What it detects
An Anthropic API key lets anyone use the account, at the owner's expense. A credential embedded in the app can be extracted by anyone who downloads it. Revoke it, rotate it and move the operation that needs it to a backend.
How to fix it
Treat the credential as compromised: anyone who downloads the app can extract it. Revoke and rotate it, then move the operation that needs it to your backend, which the app calls with the user's own session. If the credential is harmless (already revoked, or without permissions), leave the finding out with --ignore-rule.
https://docs.anthropic.com/en/api/overview#authentication · CWE-798
What it detects
A PEM private key is embedded in the app. Anyone can extract it and impersonate its owner (TLS client, signing, SSH). Remove it and revoke any certificate issued for it.
How to fix it
Treat the credential as compromised: anyone who downloads the app can extract it. Revoke and rotate it, then move the operation that needs it to your backend, which the app calls with the user's own session. If the credential is harmless (already revoked, or without permissions), leave the finding out with --ignore-rule.
https://www.rfc-editor.org/rfc/rfc7468 · CWE-321
What it detects
The app uses a Firebase Realtime Database. The URL is public by design, but if the database security rules allow unauthenticated access its data can be read or modified by anyone. Review the rules (e.g. a request to <url>/.json must be denied).
How to fix it
This value is meant to ship in apps, or is a test key, so it is not a leak by itself. Restrict it: API restrictions and app signatures for Google API keys, security rules for Firebase databases. Keep test keys out of release builds.
https://firebase.google.com/docs/database/security/core-syntax