MacOS Download protection bypass With Terminal File
Categories
(Firefox :: File Handling, defect, P1)
Tracking
()
People
(Reporter: pwn2car, Assigned: Gijs)
Details
(Keywords: reporter-external, sec-moderate, Whiteboard: [adv-main140+][adv-esr128.12+])
Attachments
(5 files)
|
468 bytes,
application/octet-stream
|
Details | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
phab-bot
:
approval-mozilla-beta+
|
Details | Review |
|
48 bytes,
text/x-phabricator-request
|
phab-bot
:
approval-mozilla-esr128+
|
Details | Review |
|
269 bytes,
text/plain
|
Details |
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/135.0.0.0 Safari/537.36
Steps to reproduce:
The .terminal file extension is natively supported by Apple. When a .terminal file is opened, it launches the Terminal.app and executes the command specified within the file.
For example, consider the following test.terminal file:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"
"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CommandString</key>
<string>id</string>
<key>ProfileCurrentVersion</key>
<real>2.1</real>
<key>RunCommandAsShell</key>
<false/>
<key>name</key>
<string>exploit</string>
<key>type</key>
<string>Window Settings</string>
</dict>
</plist>
Previously reported cases like fileloc (Bug 1596668) and inetloc (Bug 1731779) could launch .app files but were limited in their ability to execute arbitrary commands.
In contrast, .terminal files can not only execute scripts but also allow passing arguments to them, potentially expanding the attack surface or automation capabilities.
| Assignee | ||
Updated•9 months ago
|
Updated•9 months ago
|
Comment 1•9 months ago
|
||
Comment 2•9 months ago
|
||
Does Mac's "Gatekeeper" not warn about downloaded .terminal files? Does it ignore them because they're "just" .bat-file like and not actual "applications"?
We should treat these as dangerous anyway, but seems like Apple has some responsibility too
| Assignee | ||
Comment 3•8 months ago
|
||
| Assignee | ||
Updated•8 months ago
|
| Assignee | ||
Comment 4•8 months ago
|
||
Original Revision: https://phabricator.services.mozilla.com/D250229
Updated•8 months ago
|
Comment 5•8 months ago
|
||
firefox-beta Uplift Approval Request
- User impact if declined: security impact
- Code covered by automated testing: yes
- Fix verified in Nightly: no
- Needs manual QE test: yes
- Steps to reproduce for manual QE testing: see comment 0. Expected result is that there's a warning before opening the file.
- Risk associated with taking this patch: Low
- Explanation of risk level: We have lists of problematic extensions and this is just a small addition to that list
- String changes made/needed: No
- Is Android affected?: no
Comment 7•8 months ago
|
||
Updated•8 months ago
|
Updated•8 months ago
|
Updated•8 months ago
|
Updated•8 months ago
|
Updated•8 months ago
|
Comment 9•8 months ago
|
||
Reproduced it on Firefox 140.0a1 (2025-05-05) on macOS 15.5 by following the infos provided in Comment 0.
The warning prompt is present on Firefox 140.0b4 (treeherder build) and Firefox 141.0a1 (2025-06-01) on the same system.
Comment 10•8 months ago
|
||
Please nominate this for ESR128 also. It grafts cleanly.
| Assignee | ||
Comment 11•8 months ago
|
||
Original Revision: https://phabricator.services.mozilla.com/D250229
Updated•8 months ago
|
Comment 12•8 months ago
|
||
firefox-esr128 Uplift Approval Request
- User impact if declined: dodgy terminal downloads
- Code covered by automated testing: no
- Fix verified in Nightly: yes
- Needs manual QE test: yes
- Steps to reproduce for manual QE testing: see comment 0. Expected result is that there's a warning before opening the file.
- Risk associated with taking this patch: Low
- Explanation of risk level: We have lists of problematic extensions and this is just a small addition to that list
- String changes made/needed: No
- Is Android affected?: no
| Assignee | ||
Updated•8 months ago
|
Updated•8 months ago
|
Updated•8 months ago
|
Comment 13•8 months ago
|
||
| uplift | ||
Comment 14•8 months ago
|
||
Verified that the prompt is shown on Firefox 128.12.0esr (treeherder build) on macOS 15.5.
Updated•8 months ago
|
Updated•7 months ago
|
Comment 15•7 months ago
|
||
Updated•7 months ago
|
Updated•7 months ago
|
| Reporter | ||
Comment 16•7 months ago
|
||
Is there a Bounty?
Updated•1 month ago
|
Description
•