VYPR
Unrated severityOSV Advisory· Published Jan 3, 2018· Updated Sep 16, 2024

CVE-2017-1000492

CVE-2017-1000492

Description

Leanote-desktop version v2.5 is vulnerable to a XSS which leads to code execution due to enabled node integration

AI Insight

LLM-synthesized narrative grounded in this CVE's description and references.

Affected products

2
  • Leanote/Desktop AppOSV2 versions
    V2.1, V2.2.1, V2.3, …+ 1 more
    • (no CPE)range: V2.1, V2.2.1, V2.3, …
    • (no CPE)range: = v2.5

Patches

Vulnerability mechanics

Root cause

"Missing output sanitization of note titles in starred-notes rendering allows stored XSS, which is escalated to remote code execution by enabled Node.js integration in the Electron shell."

Attack vector

An attacker can create or modify a note with a crafted title containing JavaScript code. When the victim views their starred notes list, the unsanitized title is rendered into the DOM via `Note.renderStars` [patch_id=6628355]. Because the Leanote desktop application has Node.js integration enabled, the injected script can escape the Electron renderer and execute arbitrary system commands, achieving full code execution. The attack requires the victim to have the malicious note appear in their starred notes view.

Affected code

The vulnerability is in `public/js/app/note.js` in the `Note.renderNote` and `Note.renderStars` functions. The `Note.renderStars` function directly interpolates `note.Title` into a template string without sanitization, and `Note.renderNote` sets the note title into the DOM via `$("#noteTitle").val(title)` after only trivial HTML-entity replacement that does not prevent script injection.

What the fix does

The patch [patch_id=6628355] adds two changes. First, in `Note.renderNote`, the title is passed through a `replace(/&lt;/g, '<').replace(/&gt;/g, '>')` call before being set into the input field. Second, in `Note.renderStars`, the title is wrapped with a `trimTitle()` call before being interpolated into the template. These changes prevent raw HTML/JavaScript from being injected into the DOM, closing the XSS vector that could be escalated to code execution via Node integration.

Preconditions

  • inputThe attacker must be able to create or modify a note whose title contains a malicious XSS payload.
  • configThe victim must have the malicious note appear in their starred notes view.
  • configThe Leanote desktop application must have Node integration enabled (default in Electron at the time).

Generated on Jun 20, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.

References

2

News mentions

0

No linked articles in our index yet.