Unauthenticated Persistent Nimbus Configuration Injection via Exported Firefox Android Activity
Firefox for Android's exported HomeActivity accepted Nimbus CLI tooling parameters from an external fenix:// deeplink, letting a webpage inject attacker-controlled experiment recipes that persisted. An attacker could thereby disable security-sensitive features such as Safe Browsing, Fission, post-quantum TLS and banned-port protections, and block port 443.
- Fixed in 45 days
- Paid in 4 months
- Disclosed after 45 days
Created attachment 9605485 poc_video_payload.zip
Steps to reproduce:
I tested Firefox for Android 152.0.4 (org.mozilla.firefox) and found that the exported org.mozilla.fenix.HomeActivity accepts release-build Nimbus CLI parameters from an external deeplink.
The vulnerable entrypoint accepts a URL in this form:
fenix://enable_private_browsing?--nimbus-cli=true&--experiments=<urlencoded-json>&--log-state=true
The supplied --experiments value is an attacker-controlled Nimbus recipe. Firefox applies it through the local Nimbus tooling path.
In the attached PoC I use visible buttons so the triager can clearly choose which recipe to trigger. In a real webpage, the page can navigate to the same fenix:// deeplink automatically or from any normal user gesture. The essential user interaction is the Android app-open prompt where the user selects Firefox.
PoC files
- Web PoC:
poc-repro/nimbus-deeplink-web-poc.html
Setup
Start from a clean Firefox state for reproducibility:
adb shell pm clear org.mozilla.firefox
Start the local PoC server:
cd poc-repro
python -m http.server 8000
Open the PoC page on the Android device in a browser other than Firefox, for example Chrome:
http://<test-machine-ip>:8000/nimbus-deeplink-web-poc.html
Repro 1: web-triggered port 443 block
- Before applying the recipe, open this target in Firefox:
acb.com.vn:443
-
Return to the PoC page in Chrome.
-
Click
Trigger HTTPS 443 Block.This click is only for PoC clarity. A real webpage can trigger the same
fenix://navigation automatically or from another normal page interaction. -
When Android asks which app should open the
fenix://link, select Firefox. -
Force-stop Firefox so Gecko reads the updated networking configuration:
adb shell am force-stop org.mozilla.firefox
- Reopen Firefox and type the same target exactly:
acb.com.vn:443
The recipe used by this button enrolls networkingBannedPorts with:
{
"featureId": "networkingBannedPorts",
"value": {
"bannedPortList": "443"
}
}
Repro 2: persistent security downgrade state
Clear logcat before triggering the web PoC:
adb logcat -c
Start a live logcat monitor in a separate terminal and keep it running:
adb logcat -v time | findstr /i /c:"bb-security-downgrade" /c:"nimbus_client" /c:"nimbus::stateful::nimbus_client"
PowerShell alternative:
adb logcat -v time | Select-String -Pattern "bb-security-downgrade","nimbus_client","nimbus::stateful::nimbus_client"
Open the PoC page in Chrome:
http://<test-machine-ip>:8000/nimbus-deeplink-web-poc.html
Click Trigger Downgrade Recipe.
This click is only for PoC clarity. A real webpage can trigger the same fenix:// navigation automatically or from another normal page interaction.
When Android asks which app should open the fenix:// link, select Firefox.
The live logcat terminal should print the downgrade recipe after Firefox processes the deeplink.
If you prefer to check after clicking instead of monitoring live, use:
adb logcat -d | grep -i "bb-security-downgrade\|nimbus::stateful::nimbus_client"
On Windows after clicking, use:
adb logcat -d | findstr /i "bb-security-downgrade nimbus_client"
Expected logcat marker after the web click:
Slug | Features | Branch
bb-security-downgrade | third-party-cookie-blocking, pki, lna-blocking, fingerprinting-protection, baseline-fpp, networkingBannedPorts, safe-browsing-v5, fission, pqcrypto, doh, safe-browsing-real-time | treatment
The feature order in logcat can vary. The important evidence is that bb-security-downgrade is enrolled and the listed security-sensitive feature IDs are active in the treatment branch.
Actual results:
Firefox accepted Nimbus CLI/tooling parameters from an external exported/browsable activity path. The external deeplink caused Firefox to apply attacker-controlled local Nimbus recipes and persist the resulting state. The visible PoC buttons are not a required exploit primitive; they are included to make the demonstration easy to review.
The reachable behavior is:
- External caller supplies
--nimbus-cli=true. - External caller supplies an attacker-controlled
--experiments=<json>payload. - Firefox applies the local recipe.
- Firefox persists the experiment state.
- Firefox disables normal Nimbus fetching through the same tooling path.
Actual result 1: visible port 443 block
After clicking Trigger HTTPS 443 Block, selecting Firefox, force-stopping Firefox, and reopening:
acb.com.vn:443
Firefox blocked the URL and displayed:
Port restricted for security reasons
The browser has canceled the request for your protection and security.
This is a visible impact without relying on logcat. A webpage-triggered deeplink persistently changed Firefox/Gecko banned-port configuration for port 443.
Actual result 2: security downgrade state
The downgrade PoC enrolled bb-security-downgrade and logcat showed security-sensitive Nimbus features active in the treatment branch, including:
fissionsafe-browsing-v5safe-browsing-real-timepkipqcryptolna-blockingfingerprinting-protectionbaseline-fppthird-party-cookie-blockingnetworkingBannedPortsdoh
The downgrade was triggered completely from the web PoC. Logcat was only used as an observation channel to confirm Firefox applied the externally supplied Nimbus recipe.
Web deeplink evidence
Observed from the web flow:
ActivityTaskManager: START ... dat=fenix://enable_private_browsing?... slug":"bb-security-downgrade" ... from uid 10212
nimbus::stateful::nimbus_client: bb-security-downgrade | pqcrypto, safe-browsing-real-time, safe-browsing-v5, third-party-cookie-blocking, pki, doh, fingerprinting-protection, lna-blocking, baseline-fpp, fission, networkingBannedPorts | treatment
Security impact
This is not a cosmetic experiment issue. Nimbus-backed values in this build feed into Firefox/Gecko security behavior, including:
- Fission/site isolation
- Web content isolation strategy
- Safe Browsing V5 and realtime/global-cache behavior
- Certificate Transparency / CRLite
- Post-quantum TLS key exchange
- Fingerprinting protection and baseline FPP
- Third-party cookie protections
- DoH autoselect behavior
- Local Network Access blocking controls
- Banned-port configuration
Suggested CVSS:
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:L = 8.8 High
Rationale:
AV:N: a webpage can invoke the browsablefenix://deeplink.AC:L: exploitation requires only a crafted URL with URL-encoded JSON.PR:N: no Firefox account, Android permission, or local privilege is required.UI:R: the user clicks the link/button and accepts the Android app-open prompt.S:U: the impact is within Firefox's security boundary/configuration.C:H: the attacker can downgrade confidentiality-related protections such as Safe Browsing, TLS/PKI, fingerprinting protection, third-party cookie controls, DoH, and LNA controls.I:H: the attacker persistently controls Firefox security/privacy configuration and disables normal Nimbus fetch recovery.A:L: browser security behavior can be degraded, and the port-block PoC shows externally triggered browsing disruption.
Expected results:
Firefox release builds should not accept Nimbus CLI/tooling commands from untrusted external activities, apps, or browsable deeplinks.
Expected behavior:
HomeActivityshould reject--nimbus-cli=truefrom external callers.- Release builds should not process local Nimbus experiment injection through exported/browsable activity paths.
- Untrusted deeplinks should not be able to call
setExperimentsLocally(payload). - Untrusted deeplinks should not be able to call
applyPendingExperiments(). - Untrusted deeplinks should not be able to call
setFetchEnabled(false). - A webpage should not be able to persistently modify Gecko banned-port configuration.
- A webpage or third-party app should not be able to persistently enroll security-sensitive Firefox Nimbus features.
Suggested remediation:
- Disable Nimbus CLI/tooling argument processing in release builds.
- Require a debug-only build flag or signature-level permission for
nimbus-cli. - Reject Nimbus tooling parameters from exported activities and browsable deeplinks.
- If release support is required for internal testing, restrict it to trusted callers.
- Remove or protect
setFetchEnabled(false)from externally reachable paths. - Consider rejecting or clearing locally injected recipes when they originate from untrusted external intents.
Cleanup after testing:
adb shell pm clear org.mozilla.firefox
Context
Firefox for Android ships as org.mozilla.firefox, and its main entry point is the exported activity org.mozilla.fenix.HomeActivity. Because the activity is browsable, any web page or third-party app can hand it a fenix:// URL and let Android route that URL to Firefox, subject to the usual app-open prompt.
Nimbus is Mozilla's experimentation system. In a normal build, experiment recipes are fetched from Mozilla's servers and applied to feature configurations. The build also contains a local tooling path, normally meant for developers and QA, that accepts Nimbus CLI parameters such as --nimbus-cli, --experiments and --log-state. The report shows that this tooling path is reachable from the exported activity in a release build, so an external caller can supply its own recipe and have Firefox persist it.
The researcher tested Firefox for Android 152.0.4 (org.mozilla.firefox). The weakness is classified as privilege escalation, severity high.
Setup
No account, Android permission or local privilege is needed on the attacker side. The preconditions are:
- A Firefox for Android
152.0.4install on the device. - A second browser on the device, for example Chrome, to host the web PoC. The PoC must not be opened in Firefox itself.
- A machine on the same network serving the PoC page over HTTP.
adbaccess to the device for clearing state, force-stopping Firefox and reading logcat.
The report includes an attachment, poc_video_payload.zip, and a web PoC file at poc-repro/nimbus-deeplink-web-poc.html. The PoC page uses visible buttons so a triager can choose which recipe to trigger. The buttons are not a required exploit primitive: a real page can navigate to the same fenix:// deeplink automatically or from any normal user gesture. The essential user interaction is the Android app-open prompt where the user selects Firefox.
Start from a clean Firefox state for reproducibility:
adb shell pm clear org.mozilla.firefox
Start the local PoC server:
cd poc-repro
python -m http.server 8000
Open the PoC page on the Android device in a browser other than Firefox, for example Chrome:
http://<test-machine-ip>:8000/nimbus-deeplink-web-poc.html
Finding it
The exported HomeActivity accepts release-build Nimbus CLI parameters from an external deeplink. The vulnerable entrypoint accepts a URL in this form:
fenix://enable_private_browsing?--nimbus-cli=true&--experiments=<urlencoded-json>&--log-state=true
The --experiments value is an attacker-controlled Nimbus recipe, and Firefox applies it through the local Nimbus tooling path. That is what looked wrong: a browsable deeplink, reachable from any web page, was being treated as a trusted source of experiment configuration in a release build.
Exploitation
Step 1: trigger the port 443 block recipe
Before applying the recipe, open this target in Firefox:
acb.com.vn:443
Return to the PoC page in Chrome and click Trigger HTTPS 443 Block. As noted above, the click is only for PoC clarity; a real page can trigger the same fenix:// navigation automatically or from another normal page interaction.
When Android asks which app should open the fenix:// link, select Firefox.
The recipe behind this button enrolls networkingBannedPorts with:
{
"featureId": "networkingBannedPorts",
"value": {
"bannedPortList": "443"
}
}
The recipe enrolls networkingBannedPorts with port 443, the HTTPS port, in the banned-port list.
Step 2: force Gecko to read the new configuration
Force-stop Firefox so Gecko reads the updated networking configuration:
adb shell am force-stop org.mozilla.firefox
Reopen Firefox and type the same target exactly:
acb.com.vn:443
Firefox blocked the URL and displayed:
Port restricted for security reasons
The browser has canceled the request for your protection and security.
This is a visible impact that does not rely on logcat: a webpage-triggered deeplink persistently changed the Firefox/Gecko banned-port configuration for port 443.
Step 3: observe the downgrade recipe
Clear logcat before triggering the web PoC:
adb logcat -c
Start a live logcat monitor in a separate terminal and keep it running:
adb logcat -v time | findstr /i /c:"bb-security-downgrade" /c:"nimbus_client" /c:"nimbus::stateful::nimbus_client"
PowerShell alternative:
adb logcat -v time | Select-String -Pattern "bb-security-downgrade","nimbus_client","nimbus::stateful::nimbus_client"
Open the PoC page in Chrome:
http://<test-machine-ip>:8000/nimbus-deeplink-web-poc.html
Click Trigger Downgrade Recipe, again only for PoC clarity, and select Firefox in the Android app-open prompt. The live logcat terminal should print the downgrade recipe after Firefox processes the deeplink.
To check after clicking instead of monitoring live:
adb logcat -d | grep -i "bb-security-downgrade\|nimbus::stateful::nimbus_client"
On Windows after clicking:
adb logcat -d | findstr /i "bb-security-downgrade nimbus_client"
The expected logcat marker after the web click is:
Slug | Features | Branch
bb-security-downgrade | third-party-cookie-blocking, pki, lna-blocking, fingerprinting-protection, baseline-fpp, networkingBannedPorts, safe-browsing-v5, fission, pqcrypto, doh, safe-browsing-real-time | treatment
The feature order in logcat can vary. The important evidence is that bb-security-downgrade is enrolled and the listed security-sensitive feature IDs are active in the treatment branch.
Step 4: confirm the web deeplink path
The web flow produced this evidence:
ActivityTaskManager: START ... dat=fenix://enable_private_browsing?... slug":"bb-security-downgrade" ... from uid 10212
nimbus::stateful::nimbus_client: bb-security-downgrade | pqcrypto, safe-browsing-real-time, safe-browsing-v5, third-party-cookie-blocking, pki, doh, fingerprinting-protection, lna-blocking, baseline-fpp, fission, networkingBannedPorts | treatment
The first line shows Android's activity manager starting the Firefox activity with the crafted fenix:// data URI. The second shows the Nimbus client enrolling the bb-security-downgrade slug with the listed features in the treatment branch. Logcat was used only as an observation channel to confirm that Firefox applied the externally supplied recipe; the downgrade itself was triggered entirely from the web PoC.
What the deeplink achieves
The reachable behaviour is:
- An external caller supplies
--nimbus-cli=true. - An external caller supplies an attacker-controlled
--experiments=<json>payload. - Firefox applies the local recipe.
- Firefox persists the experiment state.
- Firefox disables normal Nimbus fetching through the same tooling path.
The downgrade PoC enrolled bb-security-downgrade and logcat showed these security-sensitive Nimbus features active in the treatment branch:
fissionsafe-browsing-v5safe-browsing-real-timepkipqcryptolna-blockingfingerprinting-protectionbaseline-fppthird-party-cookie-blockingnetworkingBannedPortsdoh
Root cause
Release builds process Nimbus CLI/tooling arguments arriving through the exported, browsable HomeActivity. The tooling path is normally meant for developers and QA, yet in this release build an external deeplink reaches it. As a result, an untrusted deeplink can reach the same operations the tooling uses: setExperimentsLocally(payload), applyPendingExperiments() and setFetchEnabled(false). The last of these disables normal Nimbus fetching through the same path.
The report does not describe the code that performs the argument parsing, so the exact check that is missing is not shown. What is established is the observable behaviour: the parameters are accepted from an external caller in a release build, the recipe is applied and persisted, and fetching is disabled.
Impact
Nimbus-backed values in this build feed into Firefox/Gecko security behaviour, including:
- Fission/site isolation
- Web content isolation strategy
- Safe Browsing V5 and realtime/global-cache behaviour
- Certificate Transparency / CRLite
- Post-quantum TLS key exchange
- Fingerprinting protection and baseline FPP
- Third-party cookie protections
- DoH autoselect behaviour
- Local Network Access blocking controls
- Banned-port configuration
An attacker who can get a user to open a crafted page and accept the Android app-open prompt can persistently change these settings. The port-block demonstration shows browsing disruption without relying on logcat. The downgrade recipe enrolls security-sensitive features such as Safe Browsing, TLS/PKI, fingerprinting protection, third-party cookie controls, DoH and LNA controls in the treatment branch. and that the attacker keeps control of the configuration because normal Nimbus fetch recovery is disabled.
The researcher's suggested CVSS is:
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:L = 8.8 High
with this rationale:
AV:N: a webpage can invoke the browsablefenix://deeplink.AC:L: exploitation requires only a crafted URL with URL-encoded JSON.PR:N: no Firefox account, Android permission, or local privilege is required.UI:R: the user clicks the link/button and accepts the Android app-open prompt.S:U: the impact is within Firefox's security boundary/configuration.C:H: the attacker can downgrade confidentiality-related protections such as Safe Browsing, TLS/PKI, fingerprinting protection, third-party cookie controls, DoH, and LNA controls.I:H: the attacker persistently controls Firefox security/privacy configuration and disables normal Nimbus fetch recovery.A:L: browser security behaviour can be degraded, and the port-block PoC shows externally triggered browsing disruption.
The impact depends on the user accepting the Android app-open prompt for the fenix:// link. The report does not describe any way to bypass that prompt.
Fix
The expected behaviour is that Firefox release builds should not accept Nimbus CLI/tooling commands from untrusted external activities, apps or browsable deeplinks. Specifically:
HomeActivityshould reject--nimbus-cli=truefrom external callers.- Release builds should not process local Nimbus experiment injection through exported/browsable activity paths.
- Untrusted deeplinks should not be able to call
setExperimentsLocally(payload). - Untrusted deeplinks should not be able to call
applyPendingExperiments(). - Untrusted deeplinks should not be able to call
setFetchEnabled(false). - A webpage should not be able to persistently modify Gecko banned-port configuration.
- A webpage or third-party app should not be able to persistently enroll security-sensitive Firefox Nimbus features.
The suggested remediation is:
- Disable Nimbus CLI/tooling argument processing in release builds.
- Require a debug-only build flag or signature-level permission for
nimbus-cli. - Reject Nimbus tooling parameters from exported activities and browsable deeplinks.
- If release support is required for internal testing, restrict it to trusted callers.
- Remove or protect
setFetchEnabled(false)from externally reachable paths. - Consider rejecting or clearing locally injected recipes when they originate from untrusted external intents.
After testing, clear the injected state:
adb shell pm clear org.mozilla.firefox
Variants to test
- Other exported activities that parse intent data or extras. A positive result is an external
adbor browser intent that changes persisted configuration without a signature-level permission. - Other
fenix://hosts and paths that forward query parameters to internal tooling. A positive result is a tooling flag such as--nimbus-clibeing honoured from a browsable URI. - Other debug or QA flags accepted in release builds, for example logging or state-dump switches. A positive result is a release build acting on a flag that should only exist in debug builds.
- The
--experimentspayload with other feature IDs that affect networking or isolation. A positive result is a persisted change visible after a force-stop and restart, with the recipe still enrolled. - The fetch-disable path on its own. A positive result is that a later server-side recipe change does not replace the injected local state.
- The same deeplink delivered from a third-party app rather than a browser. A positive result is the same enrolment without any web page involved.
What happened, in plain words
Firefox for Android is a web browser app. Like most Android apps, it can be opened in more than one way: you can tap its icon, or another app or web page can ask Android to open a special kind of link that belongs to Firefox. Those special links start with fenix:// instead of https://.
This report shows that one of those special links can carry hidden instructions that Firefox normally reserves for its own developers. When a user taps such a link and chooses Firefox in the pop-up Android shows, Firefox accepts the instructions, saves them, and then behaves differently from then on. The instructions enroll security-sensitive experiment features, and they can make Firefox refuse to load a site on a particular network port.
The person who found this is credited as HiWorld. The weakness is filed under privilege escalation, with severity high. The report does not state a bounty amount.
Some background first
What an Android activity is
An Android app is built from pieces called activities. An activity is roughly one screen or one entry point of the app. Firefox for Android's main entry point is called org.mozilla.fenix.HomeActivity. When you tap the Firefox icon, Android starts that activity.
What "exported" and "browsable" mean
An activity can be marked exported, which means other apps on the phone are allowed to start it. It can also be marked browsable, which means Android will offer it as a candidate when a link of a certain scheme is tapped. Firefox's HomeActivity is both. That is normal and necessary: it is how links that belong to Firefox reach Firefox. The consequence is that any web page or any other app can hand this activity a fenix:// URL, and Android will route that URL to Firefox, after showing the usual prompt asking the user which app should open the link.
Think of it like a building with a public reception desk. Anyone can walk in and hand an envelope to the receptionist. That is fine as long as the receptionist only accepts ordinary mail. The problem in this report is that the receptionist also accepts envelopes marked "internal staff instructions only".
What Nimbus is
Nimbus is Mozilla's experimentation system. Mozilla uses it to try out changes in Firefox on a subset of users before rolling them out to everyone. An experiment is described by a recipe: a small piece of configuration that says which feature to change and what value to give it. In a normal build, Firefox downloads these recipes from Mozilla's servers and applies them.
Firefox also contains a local tooling path, a set of switches meant for developers and quality-assurance testers. It accepts command-line style parameters such as --nimbus-cli, --experiments and --log-state. The word "CLI" means command line interface: options you would normally type after a program's name in a terminal. The report shows that in a release build, meaning the normal version people install from the app store, this developer path can be reached from the exported activity. So an outside caller can supply its own recipe and have Firefox save it.
What the vulnerability class means
Privilege escalation means someone with fewer rights gets to do something that should require more rights. Here, a web page, which should have no say over Firefox's internal configuration, gets to change settings that only Mozilla's own tooling should touch.
Setting up the test
The attacker needs no account, no Android permission and no special access to the phone. The preconditions listed in the report are:
- A Firefox for Android
152.0.4install on the device. - A second browser on the device, for example Chrome, to host the web proof of concept. The page must not be opened in Firefox itself, because the point is to show an outside source feeding Firefox.
- A machine on the same network serving the PoC page over HTTP.
adbaccess to the device.adbis the Android Debug Bridge, a tool that lets a computer send commands to an Android device over a cable or network. It is used here to clear state, force-stop Firefox and read logs.
The report includes an attachment, poc_video_payload.zip, and a web PoC file at poc-repro/nimbus-deeplink-web-poc.html. The PoC page uses visible buttons so a triager, the person reviewing the report, can choose which recipe to trigger. The buttons are not a required part of the attack: a real page can navigate to the same fenix:// deeplink automatically or from any normal user gesture. The essential user interaction is the Android app-open prompt where the user selects Firefox.
Start from a clean Firefox state so the test can be repeated the same way every time:
adb shell pm clear org.mozilla.firefox
Line by line:
adbruns the Android Debug Bridge on your computer.shellsays: run the rest of the line as a command on the phone.pmis the phone's package manager, the part of Android that manages installed apps.cleartells the package manager to wipe the app's stored data.org.mozilla.firefoxis the package name of Firefox for Android, the app's unique identifier on the phone.
Why this step: any experiment recipe injected earlier would still be stored. Clearing the app's data puts Firefox back to a fresh state, so anything you see afterwards must have come from the test you are about to run.
Start the local PoC server:
cd poc-repro
python -m http.server 8000
Line by line:
cd poc-repromoves your terminal into the folder that holds the PoC files.python -m http.server 8000starts a small web server using Python, serving the files in the current folder on port8000. A port is a numbered channel on a computer; web servers usually listen on port80for plain HTTP and443for HTTPS, and8000is a common choice for a temporary test server.
Why this step: the phone needs to load the PoC page from somewhere. Serving it from your own machine over the local network is the simplest way to do that without putting anything on the public internet.
Open the PoC page on the Android device in a browser other than Firefox, for example Chrome:
http://<test-machine-ip>:8000/nimbus-deeplink-web-poc.html
Line by line:
http://is the ordinary, unencrypted web protocol.<test-machine-ip>is a placeholder for the local network address of the computer running the server. The report does not give a real address.:8000is the port the Python server is listening on./nimbus-deeplink-web-poc.htmlis the file name of the PoC page.
Why this step: the page has to be opened in a browser that is not Firefox, because the attack is about an outside page convincing Firefox to do something. If you opened it in Firefox, you would not be testing the boundary between an outside caller and Firefox.
Finding it
The exported HomeActivity accepts release-build Nimbus CLI parameters from an external deeplink. The vulnerable entrypoint accepts a URL in this form:
fenix://enable_private_browsing?--nimbus-cli=true&--experiments=<urlencoded-json>&--log-state=true
Line by line:
fenix://is the custom scheme that belongs to Firefox. Android uses the scheme to decide which app should handle the link.enable_private_browsingis the host part of the URL, the part that normally names a website. Here it names an action inside Firefox.?starts the query string, the part of a URL that carries parameters.--nimbus-cli=trueis a parameter that looks exactly like a developer command-line switch. It tells Firefox to treat the rest of the input as Nimbus tooling instructions.&separates parameters.--experiments=<urlencoded-json>is the parameter that carries the recipe. The angle brackets are a placeholder: the real value is a JSON document, a structured text format for data, that has been URL-encoded, meaning special characters are replaced with percent codes so the value can travel safely inside a URL.--log-state=trueasks Firefox to write its Nimbus state to the log.
The --experiments value is an attacker-controlled Nimbus recipe, and Firefox applies it through the local Nimbus tooling path. That is what looked wrong: a browsable deeplink, reachable from any web page, was being treated as a trusted source of experiment configuration in a release build.
Exploitation
Step 1: trigger the port 443 block recipe
Before applying the recipe, open this target in Firefox:
acb.com.vn:443
Line by line:
acb.com.vnis a host name, the name of a server on the internet.:443is the port number. Port443is the standard port for HTTPS, the encrypted version of the web.
Why this step: you want to see the site working normally first. Then, after the recipe is applied, you open the same address again and see it blocked. The before-and-after comparison is what makes the change visible.
Return to the PoC page in Chrome and click Trigger HTTPS 443 Block. As noted above, the click is only for PoC clarity; a real page can trigger the same fenix:// navigation automatically or from another normal page interaction.
When Android asks which app should open the fenix:// link, select Firefox.
Why this step: Android will not silently hand a link to an app. It shows a prompt and the user picks. That prompt is the one interaction the attack depends on.
The recipe behind this button enrolls networkingBannedPorts with:
{
"featureId": "networkingBannedPorts",
"value": {
"bannedPortList": "443"
}
}
Line by line:
- The outer braces
{and}mark a JSON object, a collection of named values. "featureId": "networkingBannedPorts"names the feature to change.networkingBannedPortsis the setting that controls which network ports Firefox refuses to connect to."value": { ... }holds the new setting for that feature."bannedPortList": "443"sets the list of banned ports to port443, the HTTPS port.
Why this matters: port 443 is the port almost every secure website uses. Banning it means Firefox will refuse to load sites on that port, as the PoC shows for one host.
Step 2: force Gecko to read the new configuration
Force-stop Firefox so Gecko reads the updated networking configuration:
adb shell am force-stop org.mozilla.firefox
Line by line:
adb shellruns a command on the phone, as before.amis the activity manager, the part of Android that starts and stops apps.force-stopstops the app completely, not just sending it to the background.org.mozilla.firefoxis the Firefox package name.
Why this step: Gecko is the engine inside Firefox that actually loads web pages and handles networking. Some configuration is read when the engine starts. A full stop and restart makes sure the new recipe is picked up.
Reopen Firefox and type the same target exactly:
acb.com.vn:443
Firefox blocked the URL and displayed:
Port restricted for security reasons
The browser has canceled the request for your protection and security.
Line by line:
- The first line is Firefox's message that the port is on its restricted list.
- The second line is the standard explanation shown to the user: the request was cancelled for their protection.
This is a visible impact that does not rely on logcat: a webpage-triggered deeplink persistently changed the Firefox/Gecko banned-port configuration for port 443. Logcat is Android's system log, a stream of diagnostic messages that apps and the operating system write. "Persistently" means the change survives a restart: it is saved, not just held in memory for the current session.
Step 3: observe the downgrade recipe
Clear logcat before triggering the web PoC:
adb logcat -c
Line by line:
adb logcatreads the Android system log.-cclears the existing log buffer.
Why this step: the log is noisy and full of unrelated messages. Clearing it first means anything you see afterwards was written during your test.
Start a live logcat monitor in a separate terminal and keep it running:
adb logcat -v time | findstr /i /c:"bb-security-downgrade" /c:"nimbus_client" /c:"nimbus::stateful::nimbus_client"
Line by line:
adb logcat -v timeprints log lines with a timestamp.|is a pipe: it sends the output of the left command into the right command.findstris a Windows command that searches text./imakes the search case-insensitive./c:"..."searches for an exact string. The three strings are the experiment name and two names used by the Nimbus client in the log.
Why this step: you want to watch the log while you click, so you can see the moment Firefox processes the deeplink.
PowerShell alternative:
adb logcat -v time | Select-String -Pattern "bb-security-downgrade","nimbus_client","nimbus::stateful::nimbus_client"
Line by line:
adb logcat -v timeis the same as above.Select-Stringis PowerShell's text search command.-Patterntakes a list of strings to look for, separated by commas.
Why this step: the same filter, written for PowerShell instead of the classic Windows command prompt.
Open the PoC page in Chrome:
http://<test-machine-ip>:8000/nimbus-deeplink-web-poc.html
Line by line: the same address as in the setup, pointing at the PoC page on your local server.
Click Trigger Downgrade Recipe, again only for PoC clarity, and select Firefox in the Android app-open prompt. The live logcat terminal should print the downgrade recipe after Firefox processes the deeplink.
To check after clicking instead of monitoring live:
adb logcat -d | grep -i "bb-security-downgrade\|nimbus::stateful::nimbus_client"
Line by line:
adb logcat -ddumps the current log buffer and exits, instead of following it live.grep -isearches the text, ignoring case.- The quoted pattern contains two alternatives separated by
\|, which means "either this or that".
Why this step: if you did not keep a monitor running, you can still look back at what was logged.
On Windows after clicking:
adb logcat -d | findstr /i "bb-security-downgrade nimbus_client"
Line by line:
adb logcat -ddumps the log.findstr /isearches it, ignoring case.- The quoted string lists two words to look for;
findstrtreats a space as a separator between search terms.
The expected logcat marker after the web click is:
Slug | Features | Branch
bb-security-downgrade | third-party-cookie-blocking, pki, lna-blocking, fingerprinting-protection, baseline-fpp, networkingBannedPorts, safe-browsing-v5, fission, pqcrypto, doh, safe-browsing-real-time | treatment
Line by line:
- The first line is a header row naming three columns:
Slug,FeaturesandBranch. Slugis the short name of the experiment. Here it isbb-security-downgrade.Featureslists the feature IDs the experiment touches.Branchsays which side of the experiment the user is on.treatmentmeans the group that gets the experimental change, as opposed to the control group that does not.
The feature order in logcat can vary. The important evidence is that bb-security-downgrade is enrolled and the listed security-sensitive feature IDs are active in the treatment branch. "Enrolled" means Firefox has accepted the experiment and put the user into it.
Step 4: confirm the web deeplink path
The web flow produced this evidence:
ActivityTaskManager: START ... dat=fenix://enable_private_browsing?... slug":"bb-security-downgrade" ... from uid 10212
nimbus::stateful::nimbus_client: bb-security-downgrade | pqcrypto, safe-browsing-real-time, safe-browsing-v5, third-party-cookie-blocking, pki, doh, fingerprinting-protection, lna-blocking, baseline-fpp, fission, networkingBannedPorts | treatment
Line by line:
ActivityTaskManager: STARTis Android's activity manager reporting that it is starting an activity.dat=fenix://enable_private_browsing?...shows the data URI that was passed in, the craftedfenix://link.slug":"bb-security-downgradeis part of the recipe inside that link, showing which experiment is being injected.from uid 10212says which Android user ID started the activity.- The second line is the Nimbus client logging that it enrolled
bb-security-downgradewith the listed features in thetreatmentbranch.
The first line shows Android's activity manager starting the Firefox activity with the crafted fenix:// data URI. The second shows the Nimbus client enrolling the bb-security-downgrade slug with the listed features in the treatment branch. Logcat was used only as an observation channel to confirm that Firefox applied the externally supplied recipe; the downgrade itself was triggered entirely from the web PoC.
What the deeplink achieves
The reachable behaviour is:
- An external caller supplies
--nimbus-cli=true. - An external caller supplies an attacker-controlled
--experiments=<json>payload. - Firefox applies the local recipe.
- Firefox persists the experiment state.
- Firefox disables normal Nimbus fetching through the same tooling path.
Why the last point matters: normally, if Mozilla changes an experiment on its servers, Firefox would fetch the new version and replace whatever it had. If fetching is switched off, the injected recipe stays in place. The attacker's change is not corrected later.
The downgrade PoC enrolled bb-security-downgrade and logcat showed these security-sensitive Nimbus features active in the treatment branch:
fissionsafe-browsing-v5safe-browsing-real-timepkipqcryptolna-blockingfingerprinting-protectionbaseline-fppthird-party-cookie-blockingnetworkingBannedPortsdoh
Each of these is explained in the impact section below.
Root cause
Release builds process Nimbus CLI/tooling arguments arriving through the exported, browsable HomeActivity. The tooling path is normally meant for developers and QA, yet in this release build an external deeplink reaches it. As a result, an untrusted deeplink can reach the same operations the tooling uses: setExperimentsLocally(payload), applyPendingExperiments() and setFetchEnabled(false). These are internal function names: the first stores a recipe locally, the second applies recipes that are waiting, and the third turns fetching on or off. The last of these disables normal Nimbus fetching through the same path.
What is established is the observable behaviour: the parameters are accepted from an external caller in a release build, the recipe is applied and persisted, and fetching is disabled.
Impact
Nimbus-backed values in this build feed into Firefox/Gecko security behaviour. The features listed in the log are:
- Fission, which is Firefox's site isolation: it keeps pages from different websites in separate processes so one site cannot read another's data.
- Web content isolation strategy, the broader set of rules for keeping web content apart.
- Safe Browsing V5 and realtime/global-cache behaviour. Safe Browsing is the feature that warns you before you visit a known malicious site.
- Certificate Transparency and CRLite. These are checks on the certificates that prove a website is genuine, and on lists of revoked certificates.
- Post-quantum TLS key exchange, the newer cryptography used when setting up encrypted connections.
- Fingerprinting protection and baseline FPP. Fingerprinting is when a site collects details about your browser to recognise you later; these features make that harder.
- Third-party cookie protections. Cookies are small pieces of data a site stores in your browser; third-party cookies are ones set by a site other than the one you are visiting, often used to track you across sites.
- DoH autoselect behaviour. DoH, DNS over HTTPS, encrypts the lookups that turn a website name into a network address.
- Local Network Access blocking controls, which govern whether web pages may reach devices on your local network.
- Banned-port configuration, the list of network ports Firefox refuses to use.
An attacker who can get a user to open a crafted page and accept the Android app-open prompt can persistently change these settings. The port-block demonstration shows browsing disruption without relying on logcat. The downgrade recipe enrolls security-sensitive features such as Safe Browsing, TLS/PKI, fingerprinting protection, third-party cookie controls, DoH and LNA controls in the treatment branch. and that the attacker keeps control of the configuration because normal Nimbus fetch recovery is disabled.
The researcher's suggested CVSS is:
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:L = 8.8 High
CVSS is a standard scoring system for security bugs. The string is a set of measurements, and the number at the end is the resulting score. Line by line, the measurements mean:
AV:N: attack vector is network. A webpage can invoke the browsablefenix://deeplink.AC:L: attack complexity is low. Exploitation requires only a crafted URL with URL-encoded JSON.PR:N: privileges required is none. No Firefox account, Android permission, or local privilege is required.UI:R: user interaction is required. The user clicks the link or button and accepts the Android app-open prompt.S:U: scope is unchanged. The impact is within Firefox's security boundary and configuration.C:H: confidentiality impact is high. The attacker can downgrade confidentiality-related protections such as Safe Browsing, TLS/PKI, fingerprinting protection, third-party cookie controls, DoH, and LNA controls.I:H: integrity impact is high. The attacker persistently controls Firefox security and privacy configuration and disables normal Nimbus fetch recovery.A:L: availability impact is low. Browser security behaviour can be degraded, and the port-block PoC shows externally triggered browsing disruption.
The impact depends on the user accepting the Android app-open prompt for the fenix:// link.
Fix
The expected behaviour is that Firefox release builds should not accept Nimbus CLI/tooling commands from untrusted external activities, apps or browsable deeplinks. Specifically:
HomeActivityshould reject--nimbus-cli=truefrom external callers.- Release builds should not process local Nimbus experiment injection through exported or browsable activity paths.
- Untrusted deeplinks should not be able to call
setExperimentsLocally(payload). - Untrusted deeplinks should not be able to call
applyPendingExperiments(). - Untrusted deeplinks should not be able to call
setFetchEnabled(false). - A webpage should not be able to persistently modify Gecko banned-port configuration.
- A webpage or third-party app should not be able to persistently enroll security-sensitive Firefox Nimbus features.
The suggested remediation is:
- Disable Nimbus CLI/tooling argument processing in release builds.
- Require a debug-only build flag or signature-level permission for
nimbus-cli. A signature-level permission is one that Android only grants to apps signed with the same developer key, so ordinary apps cannot obtain it. - Reject Nimbus tooling parameters from exported activities and browsable deeplinks.
- If release support is required for internal testing, restrict it to trusted callers.
- Remove or protect
setFetchEnabled(false)from externally reachable paths. - Consider rejecting or clearing locally injected recipes when they originate from untrusted external intents.
After testing, clear the injected state:
adb shell pm clear org.mozilla.firefox
Line by line: the same command as in the setup. It wipes Firefox's stored data, which removes the injected recipe and restores the default configuration.
Variants to test
The report lists further things worth checking, each with the result that would count as a finding:
- Other exported activities that parse intent data or extras. An intent is the message Android uses to ask an app to do something, and extras are the data fields attached to it. A positive result is an external
adbor browser intent that changes persisted configuration without a signature-level permission. - Other
fenix://hosts and paths that forward query parameters to internal tooling. A positive result is a tooling flag such as--nimbus-clibeing honoured from a browsable URI. - Other debug or QA flags accepted in release builds, for example logging or state-dump switches. A positive result is a release build acting on a flag that should only exist in debug builds.
- The
--experimentspayload with other feature IDs that affect networking or isolation. A positive result is a persisted change visible after a force-stop and restart, with the recipe still enrolled. - The fetch-disable path on its own. A positive result is that a later server-side recipe change does not replace the injected local state.
- The same deeplink delivered from a third-party app rather than a browser. A positive result is the same enrolment without any web page involved.
Glossary
- Activity: one screen or entry point of an Android app, which Android can start on request.
- adb (Android Debug Bridge): a tool that lets a computer send commands to an Android device.
- Android package name: the unique identifier of an app on a phone, such as
org.mozilla.firefox. - Banned-port list: the set of network ports Firefox refuses to connect to.
- Browsable: an activity that Android offers as a handler for links of a given scheme.
- Certificate Transparency / CRLite: checks that a website's certificate is genuine and not revoked.
- CLI (command line interface): options typed after a program's name in a terminal.
- Cookie: a small piece of data a website stores in your browser; a third-party cookie is set by a site other than the one you are visiting.
- CVSS: a standard scoring system for the severity of security bugs.
- Deeplink: a link that opens a specific app or a specific place inside it, often using a custom scheme.
- DoH (DNS over HTTPS): encrypted lookups that turn a website name into a network address.
- Enrolled: accepted into an experiment, so the experiment's settings apply.
- Exported: an app component that other apps are allowed to start.
- Extras: the data fields attached to an Android intent.
- Fenix: the code name for Firefox for Android.
- Fingerprinting: collecting details about a browser to recognise it later.
- Fission: Firefox's site isolation, keeping pages from different sites in separate processes.
- Gecko: the engine inside Firefox that loads pages and handles networking.
- HTTPS: the encrypted version of the web, normally on port
443. - Intent: the message Android uses to ask an app to perform an action.
- JSON: a structured text format for data, built from named values.
- Local Network Access (LNA): controls over whether web pages may reach devices on your local network.
- Logcat: Android's system log, a stream of diagnostic messages.
- Nimbus: Mozilla's experimentation system for trying changes on a subset of users.
- PKI / TLS: the system of certificates and encryption that secures connections to websites.
- Port: a numbered channel on a computer;
443is the standard HTTPS port. - Post-quantum key exchange: newer cryptography used when setting up encrypted connections.
- Privilege escalation: when someone with fewer rights gains the ability to do something that should require more.
- Recipe: a small piece of configuration describing an experiment: which feature to change and to what value.
- Release build: the normal version of an app that people install, as opposed to a debug build for developers.
- Safe Browsing: the feature that warns you before visiting a known malicious site.
- Signature-level permission: an Android permission granted only to apps signed with the same developer key.
- Slug: the short name of an experiment.
- Treatment branch: the group in an experiment that receives the experimental change.
- URL encoding: replacing special characters with percent codes so a value can travel safely inside a URL.
- Web PoC (proof of concept): a minimal demonstration that a vulnerability is real.