Closed Bug 1978587 (CVE-2026-74951) Opened 1 year ago Closed 5 months ago

tapjacking on Custom Tabs using transitioning task

Categories

(Firefox for Android :: General, defect, P2)

defect

Tracking

()

RESOLVED FIXED
154 Branch
Tracking Status
firefox152 --- wontfix
firefox153 --- wontfix
firefox154 + fixed

People

(Reporter: sas.kunz, Assigned: marcin)

References

()

Details

(Keywords: csectype-clickjacking, reporter-external, sec-moderate, Whiteboard: [client-bounty-form][adv-main154+])

Attachments

(2 files, 1 external file)

2.43 MB, video/mp4
Details
9.85 MB, application/vnd.android.package-archive
Details
Attached video Tapjacking POC.mp4 —

In the permission prompt, there is an anti-tapjacking that appears a few seconds after tapping, but does not immediately allow, but this can be bypassed.

This vulnerability is almost similar to https://bugzilla.mozilla.org/show_bug.cgi?id=1928334 (using makeCustomAnimation transition ), but in this bug occurs when the anti-clickjacking timing can be bypassed when transitioning between an app and a Firefox CT . on the permission dialog. I used the poc https://bugzilla.mozilla.org/show_bug.cgi?id=1928334 with some changes.

Steps to reproduce:

  1. Grant Firefox permission to access the user's camera
  2. Install the PoC application (find the source code here)
  3. do two taps on blue button
  4. do two taps on red button
    The site is now allowed to access the camera

OS : Android 15
Device: Samsung A56

Flags: sec-bounty?

I have reported to chromium vrp : https://issues.chromium.org/issues/425487297

Group: firefox-core-security → mobile-core-security
Component: Security → General
Product: Firefox → Firefox for Android
Attached file poc.apk —

The custom tab contents appear to be https://webrtc.github.io/test-pages/src/iframe-video/

I used the poc https://bugzilla.mozilla.org/show_bug.cgi?id=1928334 with some changes.

Could you describe the changes? publish a diff? There's a lot of random code to wade through

I changed the code from poc https://bugzilla.mozilla.org/show_bug.cgi?id=1928334 which is at :(https://gitfront.io/r/philippbeer/PZo34NhDiR1c/tapjacking-browser-poc/) (I read it at https://issues.chromium.org/issues/376491759).

I changed the post delayed section and others on MainActivity.kt:

https://gitfront.io/r/philippbeer/PZo34NhDiR1c/tapjacking-browser-poc/blob/app/src/main/java/com/beerphilipp/tapjacking/browser/MainActivity.kt

handler.postDelayed({
button.visibility = Button.INVISIBLE
button2.visibility = Button.INVISIBLE
val intent2 = Intent(this, MainActivity::class.java)
// start with no animations
intent2.addFlags(Intent.FLAG_ACTIVITY_NO_ANIMATION)
startActivity(intent2)
}, 2700)

from 2700 to 2100

handler.postDelayed({
button.visibility = Button.INVISIBLE
val intent2 = Intent(this, MainActivity::class.java)
// start with no animations
intent2.addFlags(Intent.FLAG_ACTIVITY_NO_ANIMATION)
startActivity(intent2)
}, 2100)

and on

https://gitfront.io/r/philippbeer/PZo34NhDiR1c/tapjacking-browser-poc/blob/app/src/main/res/anim/fade_in.xml

become :
<?xml version="1.0" encoding="utf-8"?>
<alpha xmlns:android="http://schemas.android.com/apk/res/android"
android:fromAlpha="0.0"
android:toAlpha="0.01"
android:duration="1000" />

Flags: needinfo?(sas.kunz)
Severity: -- → S3
Priority: -- → P2

Hi can fix of bugs (https://bugzilla.mozilla.org/show_bug.cgi?id=2040834) (happening in extension dialog) , Can it be applied to the bug here because almost similar ?

Flags: needinfo?(dveditz)
Flags: needinfo?(bugzeeeeee)
Flags: needinfo?(dveditz) → needinfo?(mkozinski)
Assignee: nobody → mkozinski
Status: NEW → ASSIGNED
Flags: needinfo?(mkozinski)
Attached file (secure) —

Comment on attachment 9597815 [details]
(secure)

Security Approval Request

  • How easily could an exploit be constructed based on the patch?: Moderately I guess? If someone understands that ExternalAppBrowserActivity means "custom tabs", then they know the exploit involves launching a custom tab. And since we modify onEnterAnimationComplete and forward it to SitePermissionsDialogFragment, they can deduce that it involves setting an enter animation to bypass protections in site permissions prompt.
  • Do comments in the patch, the check-in comment, or tests included in the patch paint a bulls-eye on the security problem?: No
  • Which branches (beta, release, and/or ESR) are affected by this flaw, and do the release status flags reflect this affected/unaffected state correctly?: all branches, would you like me to update the status flags?
  • If not all supported branches, which bug introduced the flaw?: None
  • Do you have backports for the affected branches?: No
  • If not, how different, hard to create, and risky will they be?: I assume this uplifts cleanly to other branches
  • How likely is this patch to cause regressions; how much testing does it need?: unlikely
  • Is the patch ready to land after security approval is given?: Yes
  • Is Android affected?: Yes
Attachment #9597815 - Flags: sec-approval?
Attachment #9597815 - Flags: sec-approval? → sec-approval+
Keywords: sec-moderate
Pushed by mkozinski@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/d29886aa0109 https://hg.mozilla.org/integration/autoland/rev/13c326b18bf8 Forward onEnterAnimationComplete to interested fragments r=android-reviewers,twhite
Group: mobile-core-security → core-security-release
Status: ASSIGNED → RESOLVED
Closed: 5 months ago
Resolution: --- → FIXED
Target Milestone: --- → 154 Branch
Flags: needinfo?(bugzeeeeee)

The patch landed in nightly and beta is affected.
:mkozinski, is this bug important enough to require an uplift?

For more information, please visit BugBot documentation.

Flags: needinfo?(mkozinski)
Flags: needinfo?(mkozinski)

This is an automated duplicate detection tool. It suggests that Bug 2036169 should be marked as a duplicate of this bug. The reasoning is: This reproduces the unmodified Chromium-376491759 / bug-1928334 PoC APK against the Custom Tabs site-permission prompt - the same enter-animation timing hole bug 1978587 fixed by forwarding onEnterAnimationComplete. Filed before that fix landed; a retest on ColorOS with the fix is recommended.

Duplicate of this bug: 2036169
Whiteboard: [client-bounty-form] → [client-bounty-form][adv-main154+]
Alias: CVE-2026-74951

Hi Is this bug eligible for bounty? Thanks

Flags: needinfo?(dveditz)

I don't know until the bounty committee decides, and the bug is already being tracked for that.

Flags: needinfo?(dveditz)

Although this is partly a vulnerability in Firefox, it's not abusable from other web content: it requires a malicious app installed as well. In this example, one you trusted enough to install but didn't trust enough to grant camera access to, so it hijacked Firefox for that? I suspect this is actually an Android vulnerability with their transition to the custom tab

Flags: sec-bounty? → sec-bounty-
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: