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

CVE-2026-47900: Logseq Stored XSS Vulnerability

CVE-2026-47900 is a stored XSS vulnerability in Logseq that allows malicious plugins to execute arbitrary JavaScript in the privileged host context. This article covers the technical details, affected versions, and mitigation.

Published:

CVE-2026-47900 Overview

CVE-2026-47900 is a stored cross-site scripting (XSS) vulnerability in Logseq, a knowledge management and note-taking application. A malicious plugin can embed a JavaScript payload in the name field of its package.json file. Logseq renders this field through innerHTML without sanitization, executing attacker-supplied code in the privileged host context.

Researchers confirmed the issue in Logseq v0.10.15. The status of other versions is unknown because no patch has been released. The flaw is classified under CWE-79: Improper Neutralization of Input During Web Page Generation.

Critical Impact

Arbitrary JavaScript execution in the Logseq host context can lead to data theft, file system access, and full compromise of the user's knowledge graph.

Affected Products

  • Logseq v0.10.15 (confirmed vulnerable)
  • Logseq versions prior to v0.10.15 (status unknown, no patch issued)
  • Logseq plugin runtime that renders package.json metadata

Discovery Timeline

  • 2026-06-09 - CVE-2026-47900 published to NVD
  • 2026-06-09 - Last updated in NVD database

Technical Details for CVE-2026-47900

Vulnerability Analysis

The vulnerability resides in how Logseq processes plugin metadata at load time. When a plugin is installed, Logseq reads the package.json manifest and renders certain fields, including the name field, into the application user interface. The rendering path uses the DOM innerHTML property to insert the string directly into the page.

Because Logseq does not escape or sanitize the value before assignment, any HTML or script content in the name field is parsed and executed by the browser engine that hosts the Logseq application. Logseq plugins execute in a privileged context with access to host APIs, file system bridges, and the user's notes.

Exploitation requires a user to install a malicious plugin. Once installed, the payload runs automatically whenever the plugin metadata is rendered. The CVSS 4.0 vector indicates a local attack vector with low confidentiality and integrity impact, reflecting that user interaction is needed to install the plugin.

Root Cause

The root cause is unsafe DOM manipulation. Logseq treats plugin manifest values as trusted strings and assigns them to innerHTML rather than using safe alternatives such as textContent or properly escaped templating. The plugin trust boundary is not enforced for metadata rendering.

Attack Vector

An attacker publishes or distributes a Logseq plugin whose package.jsonname field contains an HTML payload such as an <img> tag with an onerror handler invoking arbitrary JavaScript. When the victim installs the plugin, Logseq renders the malicious name into its plugin management UI. The injected script then executes with the same privileges as Logseq itself, enabling exfiltration of notes, manipulation of the graph, or invocation of Electron host APIs.

No verified exploit code is published. See the CERT Polska advisory for technical details.

Detection Methods for CVE-2026-47900

Indicators of Compromise

  • Plugin package.json files containing HTML tags or JavaScript syntax in the name field, such as <img>, <script>, or onerror= patterns
  • Unexpected outbound network connections originating from the Logseq process after a plugin installation
  • Modifications to the Logseq configuration directory or graph files immediately following plugin install

Detection Strategies

  • Scan installed plugin directories for package.json files and flag any name value containing angle brackets, quotes, or JavaScript event handler keywords
  • Monitor Logseq process behavior for child process creation or file access outside the user's graph directory
  • Inspect plugin sources for typosquatting or unsigned authorship before approving installation in managed environments

Monitoring Recommendations

  • Log all Logseq plugin install events on endpoints where the application is permitted
  • Alert on Logseq processes spawning shells, downloading content, or writing to sensitive paths
  • Maintain an allowlist of approved Logseq plugins in enterprise deployments

How to Mitigate CVE-2026-47900

Immediate Actions Required

  • Install Logseq plugins only from trusted, verified publishers and audit each plugin's package.json before installation
  • Remove any unrecognized or recently installed plugins from existing Logseq instances
  • Restrict Logseq usage in sensitive environments until a vendor patch is available

Patch Information

No official patch has been released at the time of publication. The advisory states that only v0.10.15 was tested and confirmed vulnerable, and the issue was not addressed by an update. Monitor the Logseq official site and the CERT Polska advisory for patch announcements.

Workarounds

  • Disable plugin support entirely in Logseq configuration where business workflows allow
  • Manually inspect every plugin package.json and reject any name field containing HTML or scripting syntax
  • Run Logseq in a least-privilege user account or sandboxed environment to limit impact of code execution
bash
# Configuration example: audit installed Logseq plugin manifests for suspicious name fields
find ~/.logseq/plugins -name package.json -exec \
  grep -lE '"name"[[:space:]]*:[[:space:]]*".*[<>].*"' {} \;

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

Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

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.