Android Deep Link Location Data Exposure

x32x01
  • by x32x01 ||
Android Deep Link Location Data Exposure
An Android app with more than 10 million downloads could potentially expose a user's home address through a single tap on a malicious link. The issue involves a combination of an exported Activity, an insecure WebView, and an exposed JavaScript interface.

🔎 Step 1: Finding the Deep Link Entry Point​

While testing an Android delivery app, I decompiled its APK and inspected the AndroidManifest.xml file.
I was looking for Activities combining these characteristics:
  • exported="true"
  • BROWSABLE intent filter
  • A custom URI scheme
These settings can allow external links to launch an Activity directly, depending on the app's intent filters and security controls.
I found a Deep Link that opened a screen accepting a URL parameter.



🔗 Step 2: An Unrestricted WebView​

The Activity accepted a link similar to this: myapp://popupview?url=...
After examining the code, I found that the url parameter was loaded into a WebView without proper host validation or an allowlist.
This meant the WebView could potentially load an attacker-controlled webpage.
By itself, this behavior could create phishing or navigation risks. However, the more serious issue appeared when I examined how the WebView was configured.



⚠️ Step 3: From WebView to Sensitive Data​

The application registered a JavaScript interface using: addJavascriptInterface(bridge, "nativeBridge")
This mechanism allows JavaScript running inside a WebView to interact with exposed methods in the Android application.
The problem was that the interface was available to webpages loaded into the WebView without adequate origin restrictions.
After reviewing the exposed methods, I found one called getUserLocation, which reportedly returned location information associated with the user's saved address, including:
  • GPS coordinates.
  • City and neighborhood.
  • ZIP code.
  • Saved address details.
The security issue was the combination of an externally accessible entry point, an unrestricted WebView, and a sensitive native interface.



🔗 How the Vulnerability Chain Worked​

The vulnerability involved multiple components working together:

1. External Deep Link​

An external link opens the app's vulnerable Activity.

2. WebView Loads Untrusted Content​

The Activity loads a webpage without adequately validating its destination.

3. JavaScript Interface Exposure​

The webpage can interact with the exposed native interface.

4. Sensitive Location Data​

An exposed method could return the user's saved location information.



🧪 How I Tested It Without Accessing Real User Data​

I performed the testing using an Android emulator and an empty account.
The interface returned an empty object because no real location information was available.
To validate the data flow without accessing anyone's private information, I used Frida in the test environment to simulate a response containing a fictional address and coordinates.
This allowed me to demonstrate the behavior without retrieving real user location data.



🛡️ What Android Developers Should Fix​

To prevent this type of vulnerability:
  • Validate Deep Link parameters before processing them.
  • Restrict WebView navigation to trusted domains using an explicit allowlist.
  • Avoid exposing sensitive native functionality through JavaScript interfaces.
  • Never expose privileged interfaces to untrusted webpages.
  • Review exported Activities and their intent filters.
  • Require appropriate authorization before accessing sensitive user data.



🎯 Lessons for Mobile Security Researchers​

A seemingly minor Deep Link issue can become much more serious when combined with an insecure WebView and an exposed native interface.
When auditing Android applications, pay particular attention to the relationship between:
  • exported
  • BROWSABLE
  • addJavascriptInterface
The real impact often comes from chaining multiple weaknesses together, not from analyzing each vulnerability in isolation.

The original technical write-up:
The Delivery App That Told Strangers Where You Live: Anatomy of a Deep Link + WebView + JavaScript Interface Vulnerability
--------------------------------------------
 
Last edited:
Similar threads
x32x01
Replies
0
Views
280
x32x01
x32x01
x32x01
Replies
0
Views
130
x32x01
x32x01
x32x01
Replies
0
Views
149
x32x01
x32x01
x32x01
Replies
0
Views
196
x32x01
x32x01
x32x01
Replies
1
Views
176
x32x01
x32x01
Register & Login Faster
Forgot your password?
Forum Statistics
Threads
1,263
Messages
1,271
Members
22
Latest Member
elparqetcom
Back
Top