`settingcontent-ms` files lacks "mark of the web" => execute code by dbl click in Downloads toolbar
Brave browser did not add the 'mark of the web' to downloaded settingcontent-ms files, so a user double-clicking such a file in the Downloads toolbar could execute arbitrary code with user-level privileges.
- Disclosed after 3 months
Summary:
settingcontent-ms files allow launching any binary with any params.
Brave doesn't mark settingcontent-ms files with "mark of the web", so the file could be executed by double click in "Downloads" toolbar. Launched settingcontent-ms file could lead to code execution with user-level privileges.
Products affected:
Brave: 0.23.19 Muon: 7.1.3 OS: 10.0.17134 (the image was downloaded today from the MS virtualbox images page) Chromium: 67.0.3396
Steps To Reproduce:
- Download
twitter.settingcontent-msfrom attachments. - Dbl click on the item in "Downloads" toolbar.
- Calculator opens (but as I said, it's possible to launch anything).
PoC/Screencast additionally leverages #375259.
Supporting Material/References:
- FF patched this somewhere between 60-62 version
- This bug still works in Edge. As far as I know, that's 1-day.
- Chrome downloads
settingcontent-msfiles only after a confirmation from the user. - This problem is already popular, so you could easily find more info.
PoC + screencast attached. Live PoC: (not sure that it works, it'd be better to test it locally)
Impact
Launched settingcontent-ms could lead to code execution with user-level privileges.
Marked as "high", because it's a native OS feature, all Win users are affected.
Attachments
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 browser failed to apply the mark-of-the-web attribute to downloaded settingcontent-ms files, allowing them to be executed without the usual security prompt.
Impact
A downloaded settingcontent-ms file could lead to code execution with user-level privileges, and the issue is marked high because it affects all Windows users.
What the attacker needed
Windows OS; victim downloads a malicious file; victim double-clicks the file
How it was found
- Download a settingcontent-ms file from the provided attachment.
- Double-click the downloaded file in the Downloads toolbar.
- The calculator opens, demonstrating code execution.
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.
When you download a file, Windows can tag it with a 'mark of the web' to show it came from the internet. Some file types, like settingcontent-ms, can run programs when opened. Because Brave did not add that tag, a downloaded file could run code without the usual warning.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.