Skip to main content
Vulnerability Database/CVE-2026-86016

CVE-2026-86016: VNote XSS Vulnerability

CVE-2026-86016 is a stored cross-site scripting flaw in VNote that allows attackers to execute JavaScript and exfiltrate local files. This post explains its technical details, affected versions, and mitigation steps.

Published:

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

CVE-2026-86016 Overview

CVE-2026-86016 is a stored cross-site scripting (XSS) vulnerability in VNote, an open-source Markdown note-taking platform. Versions prior to 4.3.0 insert YAML frontmatter metadata into the DOM using preNode.innerHTML = p_metaData in src/data/extra/web/js/markdownit.js before the protectFromXss sanitization path executes. Opening an attacker-supplied Markdown note executes attacker-controlled JavaScript inside the file:// viewer context. Because QWebEngineSettings::LocalContentCanAccessRemoteUrls is enabled, the injected script can read reachable local note files and exfiltrate their contents to a remote server. The issue is fixed in VNote 4.3.0 [CWE-79].

Critical Impact

An attacker who delivers a crafted Markdown note can execute JavaScript in the local file viewer context, read local files, and exfiltrate note contents to a remote server after a single user interaction.

Affected Products

  • VNote versions prior to 4.3.0
  • VNote desktop clients embedding QtWebEngine with LocalContentCanAccessRemoteUrls enabled
  • Markdown notes containing YAML frontmatter processed by markdownit.js

Discovery Timeline

  • 2026-10-13 - CVE-2026-86016 published to NVD
  • 2026-10-13 - Last updated in NVD database

Technical Details for CVE-2026-86016

Vulnerability Analysis

VNote renders Markdown notes inside a QtWebEngine viewer running under the file:// origin. When a note includes YAML frontmatter, the renderer builds a <details> block to display the metadata. The frontmatter string is assigned to preNode.innerHTML instead of preNode.textContent, so any HTML within the frontmatter is parsed as live markup.

The assignment occurs before the protectFromXss sanitization routine runs, which means the sanitizer never inspects the injected nodes. An attacker who authors a Markdown file with HTML or <script>-equivalent payloads in its frontmatter achieves JavaScript execution the moment the victim opens the file.

The impact is amplified by QWebEngineSettings::LocalContentCanAccessRemoteUrls, which VNote enables so local content can fetch remote resources. The payload can read reachable local note files through file:// URL fetches and transmit their contents to an attacker-controlled server using standard fetch or XMLHttpRequest calls.

Root Cause

The root cause is the unsafe use of the innerHTML sink to render untrusted frontmatter data. Combined with the ordering of DOM construction before sanitization, this creates a stored XSS primitive in rendered notes.

Attack Vector

An attacker distributes a Markdown note through email, chat, a shared repository, or a note-sync service. When the victim opens the note in VNote, the frontmatter payload executes in the viewer context and can access other local notes the user can read.

javascript
                 detailsNode.appendChild(summaryNode);
 
                 let preNode = document.createElement('pre');
-                preNode.innerHTML = p_metaData;
+                preNode.textContent = p_metaData;
                 detailsNode.appendChild(preNode);
 
                 this.frontMatterNode = detailsNode;

Source: GitHub Commit 7371efd. The patch replaces the innerHTML sink with textContent, which forces the browser to treat p_metaData as literal text and prevents HTML parsing.

Detection Methods for CVE-2026-86016

Indicators of Compromise

  • Markdown notes containing HTML tags, <script>-style constructs, or inline event handlers inside the YAML frontmatter block delimited by ---.
  • Outbound HTTP or HTTPS requests from the VNote process to unexpected hosts shortly after a note is opened.
  • Unexpected file:// reads of unrelated note directories initiated by the VNote renderer process.

Detection Strategies

  • Scan note repositories for frontmatter blocks that contain HTML elements, encoded script payloads, or suspicious attribute handlers such as onerror or onload.
  • Inspect process telemetry for VNote spawning or triggering network connections to domains outside the user's normal workflow.
  • Correlate file read events on .md files with subsequent egress traffic from the editor process.

Monitoring Recommendations

  • Monitor endpoint network telemetry for fetch or XMLHttpRequest traffic originating from QtWebEngine processes hosted by VNote.
  • Alert on VNote accessing note files outside the user's active vault directory.
  • Track installed VNote versions across the fleet and flag any instance below 4.3.0.

How to Mitigate CVE-2026-86016

Immediate Actions Required

  • Upgrade all VNote installations to version 4.3.0 or later, which replaces the vulnerable innerHTML assignment with textContent.
  • Audit shared note repositories for Markdown files with suspicious YAML frontmatter received from untrusted sources.
  • Avoid opening Markdown notes from unknown senders or unverified sync sources until the patch is applied.

Patch Information

The fix is included in VNote 4.3.0 and corresponds to commit 7371efd. Refer to the GitHub Security Advisory GHSA-vfhj-c636-h59x for the authoritative disclosure.

Workarounds

  • Strip or sanitize YAML frontmatter from third-party Markdown notes before opening them in a pre-4.3.0 client.
  • Isolate VNote on hosts without sensitive note vaults until the upgrade is complete.
  • Where feasible, block outbound network access from the VNote process using host-based firewall rules to prevent exfiltration if a payload executes.
bash
# Verify the installed VNote version and upgrade if below 4.3.0
vnote --version

# Example: search a note vault for frontmatter containing HTML or script-like payloads
grep -RInE -A 20 '^---$' /path/to/notes \
  | grep -Ei '<script|onerror=|onload=|javascript:'

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.