Application Built as Debuggable

The released app is built with debugging enabled, letting anyone with access to the device attach a debugger to it and read its private data.

SeverityMedium
CVSS 3.16.1 CVSS:3.1/AV:P/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N Open in the calculator
CVSS 4.06.8 CVSS:4.0/AV:P/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N Open in the calculator
CWECWE-489: Active Debug Code
OWASP Top 10A02:2025 Security Misconfiguration
CategorySecurity Misconfiguration

Description

The application is distributed with debugging enabled. On Android this is the android:debuggable="true" attribute of the manifest's application element, which the build system sets automatically for debug builds; on iOS it is the get-task-allow entitlement, present in builds signed for development. Debug builds may also include extra logging, test endpoints or relaxed security settings, such as the debug overrides of the Android network security configuration.

A debuggable Android app accepts debugger connections over ADB and JDWP, and allows run-as to run commands as the app's own user; on iOS, the entitlement allows a debugger to attach to the running app. Anyone with access to an unlocked device with USB debugging enabled, or to a device they control, can therefore attach a debugger to the app, read and change its memory and variables and bypass client-side checks such as PIN or biometric gates, and on Android run-as gives direct access to every file in the app's private data directory, including tokens and databases, without rooting the device. Debugging also makes reverse engineering and tampering easier. The need for access to the device limits the likelihood.

The issue is identified from the decoded manifest or the app's entitlements, for example with apktool, aapt dump badging or codesign -d --entitlements. Google Play does not accept debuggable builds, so the finding usually concerns apps distributed outside the store, enterprise builds and test builds released to users.

Remediation

  • Build release versions with debugging disabled: do not set android:debuggable in the manifest, and leave the debuggable setting of the Gradle release build type false.
  • Sign iOS builds for distribution with a distribution profile, which does not include get-task-allow.
  • Add a check to the release pipeline that fails if the packaged manifest or entitlements allow debugging.
  • Remove debug-only code, logging and test endpoints from release builds.

Confirm the fix by inspecting the released package's manifest or entitlements, and by checking that run-as fails for the app's package on a test device.

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