One Click Code Execution via File
The Evernote Mac desktop app did not add the com.apple.quarantine attribute to downloaded files, so a file opened with Terminal could execute code without the usual macOS warning. An attacker could achieve one-click code execution by getting a victim to open a malicious file.
Originally disclosed on HackerOne
- Triaged in 7 hours
- Fixed in 41 hours
- Disclosed after 7 days
Summary by the program
This issue was reported to Evernote by @ajdumanhug and fixed in November 2019. This disclosure is a copy of the original, and is for historical purposes only.
Overview
The Open with Terminal functional is vulnerable to One Click Code Execution. Tested the vulnerability using the Mac Desktop App version Mac 7.13 and below.
It happens because they don't add com.apple.quarantine meta-attribute for downloaded files to avoid the execution of terminal files.
I already reported this to Evernote, and I just wanted to report it here to ask for disclosure.
Proof of Concept
https://www.youtube.com/watch?v=OG2tKlZX5bg&feature=youtu.be
Supporting Material/References:
https://discussion.evernote.com/topic/121459-evernote-for-mac-713/ https://evernote.com/security/updates#MACOSNOTE-28956 https://www.cvedetails.com/cve/CVE-2019-17051/
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 app failed to apply the macOS quarantine attribute to files it downloaded, removing the operating system's built-in warning before execution.
Impact
An attacker could achieve one-click code execution on the victim's Mac, though the report only tested Mac Desktop App version 7.13 and below.
What the attacker needed
Evernote for Mac 7.13 or below; victim opens a crafted file
The fix
The issue was fixed in November 2019 according to the report.
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 on a Mac, the system normally marks it as coming from the internet so it can warn you before running it. Evernote skipped that marking for files it downloaded, so opening such a file in Terminal ran it straight away without a warning. An attacker who can get you to open a crafted file could therefore run their own commands on your computer.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.