
Minimal Android Studio PoC reproducing CVE-2026-0087, an App Links wildcard matching flaw in DomainVerificationService that grants verified status to lookalike domains.
A minimal Android Studio project that reproduces vulnerability CVE-2026-0087 through two independent applications (:app without permissions and :handler receiving links).
CVE-2026-0087 is a logic-check bypass vulnerability in DomainVerificationService of the Android Framework when matching wildcard domain names of the form *.xyz.com. Because the string truncation drops the separating dot (.), an ordinary application that has verified the domain *.xyz.com can forge ownership of a foreign domain ending with that string (such as abcxyz.com) and automatically capture HTTPS links without needing special permissions or a dialog asking the user.
| Information | Details |
|---|---|
| CVE ID / Bug ID | CVE-2026-0087 (Android Bug ID: A-483142784) |
| Component | Android Framework (platform/frameworks/base), service DomainVerificationService |
| Classification & Severity | Elevation of Privilege (EoP), High · CWE-693 (Protection Mechanism Failure), Android Security Bulletin 2026-06 |
| CVSS v3.1 Score | 7.8 (High): CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H (NVD, GHSA-w57c-v5jc-4hch) |
| Affected versions | Android 14, 15, 16, 16-qpr2 (patched from Security Patch Level 2026-06-01) |
| Pre-patch baseline | Commit 2ad9f912e9ccfb19deb59fc11f4e7464f612844e |
| Official patch | 919d0cb125b31e1512417a69251f1cbee54ab12e (Compare period character as well during wildcard matching) |
Original description from NVD: "In
approvalLevelForDomainInternalofDomainVerificationService.java, there is a possible way to hijack an arbitrary app link due to a logic error in the code. This could lead to local escalation of privilege with no additional execution privileges needed. User interaction is not needed for exploitation."
Android rates CVE-2026-0087 as High (CVSS 7.8, EoP). The flaw does not cause memory corruption or code execution in system_server, so the exploiting application still runs in the sandbox with 0 special permissions (UID >= 10000). However, the vulnerability disables the domain-ownership verification barrier introduced from Android 12 onward, bypassing the default browser to automatically capture HTTPS links (UI:N). If the victim has not installed the legitimate application, or the legitimate application does not handle the sensitive path, an attacker can intercept OAuth/OIDC codes, Magic Links, or password reset links.
android:autoVerify="true": A mechanism that allows an app to open the https:// link directly instead of the browser after proving ownership of the domain name. During installation, the system downloads the /.well-known/assetlinks.json file on the domain's server to compare the APK signature.stateMap table and wildcard domains (*.example.test): DomainVerificationService stores the verification status of each app in the hash table stateMap, preserving the wildcard string with the prefix *. (status STATE_SUCCESS = 1 when verified over the network, or STATE_APPROVED = 2 when assigned via the pm set-app-links command in a test environment).ApprovalLevel): When opening a web link, the system scores the apps that match the URL. An app not yet approved at level 0 (APPROVAL_LEVEL_NONE), whereas an app that reaches level 4 (APPROVAL_LEVEL_VERIFIED) is prioritized to open directly and pushes the default browser out of the resolution results.<intent-filter> in the PoC: In handler/src/main/AndroidManifest.xml, HandlerActivity declares two separate filters:
autoVerify): accepts notexample.test and other.test to slip into the initial candidate list when the user opens the link.autoVerify="true"): registers *.example.test to load the wildcard key into the app's shared stateMap.
When opening https://notexample.test/check, the resolution flow skips the secondary check at the start of the function (because the includeNegative = false flag is passed) and proceeds down to the wildcard loop at DomainVerificationService.java:2040. Here, domain.substring(2) strips *. down to only "example.test", causing "notexample.test".endsWith("example.test") to return true and incorrectly granting level VERIFIED (4) to the app that receives the link.2026-06-01 (and with a default browser already installed, e.g., Chrome).adb in PATH, and a compatible JDK to run the Gradle Wrapper (gradlew.bat).:app (com.learning.cve_2026_0087_poc): The test app does not declare any <uses-permission>, calls PackageManager.queryIntentActivities(), and launches ACTION_VIEW to 4 domains (example.test, sub.example.test, notexample.test, other.test).:handler (com.learning.cve_2026_0087_poc.handler): The intercepting app declares 2 separate <intent-filter> in handler/src/main/AndroidManifest.xml.If the computer is connected to multiple devices/AVDs at the same time, add
-s <device_id>(e.g.,adb -s emulator-5554 ...) to theadbcommands below.
Step 1: Build the 2 debug APKs and install them on the device
.\gradlew.bat :app:assembleDebug :handler:assembleDebug
adb install -r app\build\outputs\apk\debug\app-debug.apk
adb install -r handler\build\outputs\apk\debug\handler-debug.apk
# Mở HandlerActivity một lần để gỡ trạng thái FLAG_STOPPED sau khi mới cài
adb shell am start -W -n com.learning.cve_2026_0087_poc.handler/.HandlerActivity
Step 2 (Phase 1 - Baseline): Set the verification state to 0 (none)
adb shell pm set-app-links --package com.learning.cve_2026_0087_poc.handler 0 all
adb shell am start -S -W -n com.learning.cve_2026_0087_poc/.MainActivity --es phase BASELINE_UNVERIFIED
Expected result: All 4 domains resolve in the browser (com.android.chrome).
Step 3 (Phase 2 - Reproduce the bug): Approve only *.example.test (STATE_APPROVED = 2)
adb shell pm set-app-links --package com.learning.cve_2026_0087_poc.handler 2 "*.example.test"
# Kiểm tra stateMap chỉ duyệt *.example.test, nhưng hệ thống lại gán VERIFIED[4] cho notexample.test
adb shell pm get-app-links com.learning.cve_2026_0087_poc.handler
adb shell pm get-app-link-owners --user 0 notexample.test other.test
# Chạy ứng dụng kiểm tra và mở thẳng liên kết mục tiêu
adb shell am start -S -W -n com.learning.cve_2026_0087_poc/.MainActivity --es phase WILDCARD_APPROVED
adb shell am start -W -a android.intent.action.VIEW -c android.intent.category.BROWSABLE -d "https://notexample.test/check"
Expected result: example.test and other.test still open with Chrome, while notexample.test (the red card on the :app screen) completely removes Chrome and opens HandlerActivity directly without showing the app chooser dialog. Detailed logs can be viewed with adb logcat -s CVE20260087_P1_PROBE CVE20260087_HANDLER.
Step 4: Uninstall after testing
adb uninstall com.learning.cve_2026_0087_poc
adb uninstall com.learning.cve_2026_0087_poc.handler