Skip to content
Path traversal Disclosed report Intermediate

CRASH intent in Fenix allows other apps to delete arbitrary private files

Fenix handles any intent with the key 'mozilla.components.lib.crash.CRASH' as a crash report, and the minidumpPath or extrasPath values are sent to the crash-stats server and then deleted. An attacker app can send a crafted intent with a path to a private file, causing Fenix to delete that file.

Muneaki Nishimura Follow

Originally disclosed on Mozilla

  • Fixed in 51 days
  • Paid in 56 days
  • Disclosed after 51 days
Text
Created attachment 9169545
delete_private_files.gif

Any intent that has key `mozilla.components.lib.crash.CRASH` is handled as `CrashReporter` intent and Fenix shows `CrashReporterFragment` on the screen (below).
https://github.com/mozilla-mobile/fenix/blob/master/app/src/main/java/org/mozilla/fenix/home/intent/CrashReporterIntentProcessor.kt#L20

The CRASH intent can contain a local file path in `minidumpPath` or `extrasPath` key and the specified file pathes are finally sent to the crash-stats server and deleted (below).
https://github.com/mozilla-mobile/android-components/blob/master/components/lib/crash/src/main/java/mozilla/components/lib/crash/service/MozillaSocorroService.kt#L245

This means that other application can delete arbitrary Fenix's private files in the device (e.g., `profiles.ini`) by sending a crafted CRASH intent.

The following Kotlin code is the demonstration. Also see the attahed animation gif.

'''
var intent = Intent("android.intent.action.VIEW", Uri.parse("https://example.com/"))
intent.putExtra("mozilla.components.lib.crash.CRASH", Bundle().apply {
    putString("uuid", "DUMMY")
    putString("minidumpPath", "/data/data/org.mozilla.fenix.debug/files/mozilla/profiles.ini")
    putBoolean("minidumpSuccess", true)
    putBoolean("fatal", false)
})
startActivity(intent)
'''

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

Likely the crash reporter intent processor does not validate that the file paths in the intent belong to actual crash dump files before passing them to the crash service, which deletes them after upload.

Impact

An attacker could delete arbitrary private files of Fenix, such as profiles.ini, which may lead to data loss or denial of service.

What the attacker needed

Attacker app installed on the same device; victim has Fenix installed

How it was found

  1. Create an intent with action VIEW and a data URI.
  2. Add an extra with key 'mozilla.components.lib.crash.CRASH' containing a bundle with a uuid, a minidumpPath pointing to a private file, and boolean flags.
  3. Start the activity with that intent.

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.

Android apps can send messages called intents to each other. Fenix treats a special intent as a crash report and deletes the files listed in it after uploading them. A malicious app can abuse this to make Fenix delete its own private files, like its settings.

What is Path traversal?

Input that builds a file path escapes the intended folder, reading or writing files the application should never touch.

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.

Path traversal and file inclusion

The lesson behind this report.

Input that builds a file path escapes the intended folder, reading or writing files the application should never touch.