Skip to content
Mobile Disclosed report Intermediate CVE-2020-26954

Any websites can run with PWA privileges on Fenix

Fenix exposes a public activity that accepts an arbitrary web app manifest path from any app on the device, letting a malicious app silently install a fake progressive web app for any origin. The installed PWA runs fullscreen, so its content can spoof the address bar, and its manifest can register a fake share target to capture shared content.

Muneaki Nishimura Follow

Originally disclosed on Mozilla

  • Fixed in 3 months
  • Paid in 2 months
  • Disclosed after 3 months
Text
Created attachment 9167785
dummy_manifest.json

Fenix has a public interface that allows any apps to inject arbitrary PWA manifest for any origin.
That can be used for installing malicious PWAs on victim's device silently.
The installed PWA runs in fullscreen so spoofing address bar is possible by their contents.
Also through the malicious PWA's manifest, fake `share_target` (tries to steal victim's shared contents) can be registered (below).
https://github.com/mozilla-mobile/android-components/blob/ba0d00e94b15bb5ad1383c726a66340b80d6fe14/components/concept/engine/src/main/java/mozilla/components/concept/engine/manifest/WebAppManifestParser.kt#L79

The root cause is that `LauncherActivity` in Fenix is publicly accessible (below).
https://github.com/mozilla-mobile/fenix/blob/master/app/src/main/AndroidManifest.xml#L64
That activity receives MANIFEST_PATH key from incoming intent and store the specified manifest file to internal manifest database (below).
https://github.com/mozilla-mobile/fenix/blob/16b677693832d54c64f2ab1f67f0a881a704889d/app/src/main/java/org/mozilla/fenix/customtabs/FennecWebAppIntentProcessor.kt#L93

Here is the demo.
1) Save attached `dummy_manifest.json` file to your PC and send it to the connected Android device through ADB.
'''
adb push dummy_manifest.json /data/local/tmp/dummy_manifest.json
'''

2) Inject the manifest for example.com via `org.mozilla.gecko.WEBAPP` intent.
'''
adb shell am start -a org.mozilla.gecko.WEBAPP -d 'https://example.com/' -n org.mozilla.fenix/org.mozilla.gecko.LauncherActivity --es MANIFEST_PATH /data/local/tmp/dummy_manifest.json
'''

3) Then, example.com is shown in fullscreen (without address bar). That means PWA for example.com is injected.

4) Once inject the PWA, you can invoke through `mozilla.components.feature.pwa.VIEW_PWA` intent. Then, it runs again in fullsreen.
'''
adb shell am start -a mozilla.components.feature.pwa.VIEW_PWA -d 'https://example.com/'

'''

5) If you choose `Delete browsing data` from `Setting` menu, injected PWA can not be cleared.
   You need to remove all storage data of Fenix or re-install.

The original report as published on Mozilla's Bugzilla, by Muneaki Nishimura. Images and videos are our own copies; raw HTML is shown as text. View it on Mozilla's Bugzilla.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

The LauncherActivity that processes web app manifests is exported and accepts a manifest file path from the calling intent without verifying the caller or the manifest's origin.

Impact

A malicious app on the device could silently install a fullscreen PWA for any origin, enabling address-bar spoofing and theft of content shared to the fake share target; the injected PWA also survives clearing browsing data.

What the attacker needed

Malicious app installed on the device; Android device running Fenix

How it was found

  1. Push a crafted manifest file to the device's temporary storage.
  2. Send an intent to Fenix's exported LauncherActivity with a target URL and the manifest path.
  3. Observe the target site opening in fullscreen without an address bar, confirming the PWA was installed.
  4. Reopen the installed PWA through the VIEW_PWA intent, which again runs fullscreen.
  5. Note that clearing browsing data does not remove the injected PWA.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

A progressive web app (PWA) is a website installed like an app, with its own icon and fullscreen window. Fenix, the Firefox browser for Android, has a component that other apps on the phone can call to install such a PWA. Because it does not check who is calling, any app can install a fake PWA for a real site, and the fake one can look like the real site while hiding the address bar.

What is Mobile?

Flaws specific to Android and iOS apps: exported components, deep links, WebViews and data left on the device.

More by Muneaki Nishimura

View all

74 more disclosed reports, best first.

More from Mozilla

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Mobile app vulnerabilities

The lesson behind this report.

Flaws specific to Android and iOS apps: exported components, deep links, WebViews and data left on the device.