Closed Bug 2040834 Opened 6 months ago Closed 5 months ago

Tapjacking to Install Extension in Custom Tabs

Categories

(Firefox for Android :: WebExtensions, defect)

defect

Tracking

()

RESOLVED FIXED
153 Branch
Tracking Status
firefox151 --- wontfix
firefox152 --- wontfix
firefox153 --- fixed

People

(Reporter: sas.kunz, Assigned: marcin)

References

Details

(4 keywords, Whiteboard: [client-bounty-form][fxdroid][group2][adv-main153+r])

Attachments

(6 files, 1 external file, 1 obsolete file)

2.80 MB, video/mp4
Details
9.85 MB, application/vnd.android.package-archive
Details
3.64 KB, application/octet-stream
Details
1.82 KB, text/xml
Details
1.06 KB, text/xml
Details
21 bytes, text/plain
Details

When adding an extension via Custom Tabs, the extension install dialog does not appear immediately but will appear when the Firefox application is opened (the extension install dialog runs in the background). In addition, it can occur spoofing because the extension install dialog does not appear at addons.mozilla.org/en-US/android/addon/ (it will appear in the last opened tab or a new tab). In addition, it can cause tapjacking because the extension install dialog does not have a defense against tapjacking like the permission dialog (camera, microphone, or others). When Firefox is opened with the extension install dialog running in the background, it will cause tapjacking.

Steps to reproduce:

  1. Install the PoC application (find the source code here) (https://drive.google.com/file/d/1DpqO5k470fWyvUrIvdWDXyVZq8iXBSDe/view?usp=sharing)
  2. do two or more taps on the "tap count" button
    3 do two or more taps on "count here" button
    4 extensions https://addons.mozilla.org/en-US/android/addon/adguard-adblocker/ already installed

OS: Android 16
Device: Samsung S25 Edge

Flags: sec-bounty?
Attached file app-release.apk —
Attached file MainActivity.kt —
Attached file CustomTabHelper.kt (obsolete) —
Attached file activity_main.xml —
Attached file AndroidManifest.xml —
Attachment #9587897 - Attachment is obsolete: true
Group: firefox-core-security → mobile-core-security
Component: Security → WebExtensions
Product: Firefox → Firefox for Android

Thank you for the report!

One thing that's broken here, security issue or not, is the UX when installing an extension from a custom tab. The install dialog should show immediately over the custom tab, you shouldn't have to go to the full app to see it and approve an installation. I think this might also help mitigate this security issue, at least this specific proof of concept. I filed a separate issue for it: bug 2041249.

On tapjacking itself, would love a recommendation from security, if we should add tapjacking protection to Fenix on either the "Add" button in the install dialog or the "Add to Firefox" button on AMO and if yes, what kind of protection (I don't have experience with tapjacking, so the only thing that comes to mind is a delay before this button is clickable, but not sure if that's a good idea and if yes, then what would be a good delay duration.)

On desktop we have clickjacking protection by temporarily disabling the action button (for one second) if the window was recently focused. I think that we should do the same here.

See Also: → 2041249
Assignee: nobody → mkozinski
Status: NEW → ASSIGNED
Whiteboard: [client-bounty-form] → [fxdroid][group2]
Whiteboard: [fxdroid][group2] → [client-bounty-form][fxdroid][group2]
Attached file (secure) —
Flags: needinfo?(rob)
Flags: needinfo?(mkozinski)
Flags: needinfo?(rob)
Flags: needinfo?(dveditz)
Pushed by mkozinski@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/274b426d5241 https://hg.mozilla.org/integration/autoland/rev/f21c224366bc Add an initial delay before enabling positive button in addon permissions dialog r=android-reviewers,android-addons-reviewers,twhite,robwu
Flags: needinfo?(mkozinski)
Regressions: 2044133
Flags: needinfo?(dveditz)
Summary: Tapjacking to Install Extension → Tapjacking to Install Extension in Custom Tabs
Group: mobile-core-security → core-security-release
Status: ASSIGNED → RESOLVED
Closed: 5 months ago
Resolution: --- → FIXED
Target Milestone: --- → 153 Branch
Flags: in-testsuite+
See Also: → CVE-2026-16397
Flags: sec-bounty? → sec-bounty-

hi, if this bug gets a cve can the credit be given to:
hafiizh (https://www.linkedin.com/in/hafiizh-7aa6bb31) & kang ali (https://www.linkedin.com/in/mohammad-ali-syarief)? thank you

Flags: needinfo?(tom)
Attached file advisory.txt —
Flags: needinfo?(tom)
Whiteboard: [client-bounty-form][fxdroid][group2] → [client-bounty-form][fxdroid][group2][adv-main153+r]
Group: core-security-release
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: