Android icon indicating copy to clipboard operation
Android copied to clipboard

Security: Top level navigation to data URI is not being blocked.

Open gojo-satorou-v7 opened this issue 10 months ago • 3 comments

Describe the bug

Top level navigation to data URI has been blocked by every browser (including DuckDuckGo) however due to the exported activity not blocking data scheme can be launched through another application.

The activity SelectedTextSearchActivity does not filter/sanitize data URI schemes allowing the top level navigation to data URI which can result in GET, POST based CSRF, phishing, and other vulnerabilities.

How to Reproduce

  1. Run the command in adb shell linux adb shell am start -a android.intent.action.PROCESS_TEXT -t text/plain --es android.intent.extra.PROCESS_TEXT "data://text/html,<script>alert(3)</script>" -n com.duckduckgo.mobile.android/com.duckduckgo.app.SelectedTextSearchActivity

  2. Notice the app loads the URI scheme data://text/html,<script>alert(3)</script>

Note: adb shell is just being used to trigger the activity it can be launched by third party app too.

Expected behavior

It should either result in the text being passed as a search term to duckduckgo search engine (like it's with javascript: scheme) or simply not execute the scheme contents (even returning to text/plain is safer).

Environment

Latest

gojo-satorou-v7 avatar Jan 28 '26 17:01 gojo-satorou-v7

Thank you for opening an Issue in our Repository. The issue has been forwarded to the team and we'll follow up as soon as we have time to investigate. As stated in our Contribution Guidelines, requests for feedback should be addressed via the Feedback section in the Android app.

github-actions[bot] avatar Jan 28 '26 17:01 github-actions[bot]

I had reported this to bug bounty program but they closed it as informative. Hence opening it here. There's no such thing as free lunch ;)

gojo-satorou-v7 avatar Jan 28 '26 17:01 gojo-satorou-v7

Thanks @gojo-satorou-v7 for reporting the issue. Our security team has reviewed your report and determined the impact of the issue is limited, so addressing it is not a priority right now.

lmac012 avatar Feb 04 '26 09:02 lmac012