Exploiting a Microsoft Edge Vulnerability to Steal Files
Microsoft Edge treated all file:// URLs as same-origin, so a malicious HTML file could read local files. An attacker could email such an HTML attachment, and when opened in the Mail and Calendar app, it would exfiltrate files to a remote server.
Published on netsparker.com
In 2015, Microsoft released the Edge browser. When it was first developed, it was named Project Spartan.Unlike Internet Explorer, Edge supports a wide range of modern security measures such as Content Security Policy (CSP), as well as modern JavaScript and CSS features.
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
Impact
An attacker could steal arbitrary local files from a victim's computer if the victim opens a malicious HTML attachment in the Mail and Calendar app; the attack is stealthy and can exfiltrate over HTTPS.
What the attacker needed
Victim uses vulnerable Edge or Mail app; victim opens malicious HTML attachment
The fix
The vulnerability was fixed by Microsoft in updates to Edge and the Mail and Calendar app.
How it was found
- Create an HTML file containing JavaScript that uses XMLHttpRequest to read a local file via a file:// URL.
- Send the HTML file as an email attachment to the victim.
- The victim opens the attachment in the Mail and Calendar app, which executes the HTML.
- The script reads the local file and sends its contents to the attacker's server.
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.
Browsers normally stop one website from reading data from another website or from your computer's files. This is called the Same Origin Policy. In this case, Edge made a mistake: it treated all local files as if they were the same website, so a malicious file could read other local files and send them to an attacker.
What is Info disclosure?
Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.