CVE-2011-3230 - Launch any file path from web page (Safari/OS X)
Safari on OS X allowed a web page to navigate to a file: URL, which was passed to LaunchServices and could launch local applications or open files. An attacker could run binaries or open content in the default application, though the quarantine bit prevented directly launching a downloaded binary.
vttynotes.blogspot.com
Published on vttynotes.blogspot.com
There's not a ton to say about this bug aside from "Yikes"! I think the PoC speaks for itself.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely Safari did not block navigation to file: URLs from web content, allowing them to reach LaunchServices.
Impact
An attacker could run binaries or launch applications accessible to the user, but could not directly launch a downloaded binary because LaunchServices checks the quarantine bit.
What the attacker needed
Victim uses Safari on OS X; victim visits a malicious web page
The fix
Apple fixed this in a security update, as referenced in their advisory.
How it was found
- Create an HTML page with a base href set to file:// and a script that sets document.location to a chosen file path.
- Provide a list of file paths such as /usr/sbin/netstat or /etc/passwd and a button to trigger the navigation.
- Open the page in Safari on OS X and click the button to launch the selected file or application.
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 write-up has not been written yet. The Original tab links to the source.
A web page could tell the browser to open a local file or program on the computer, like opening a document or starting an app. Normally a website should not be able to do that because it could run harmful programs. The bug was that Safari passed these local file addresses to the system component that opens files, without enough checks.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.