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

CVE-2026-47901: Logseq Sandbox Escape XSS Vulnerability

CVE-2026-47901 is a sandbox escape XSS flaw in Logseq that allows malicious plugins to execute arbitrary JavaScript in the host context, potentially accessing filesystem APIs. This article covers technical details, affected versions, impact, and mitigation strategies.

Published:

CVE-2026-47901 Overview

CVE-2026-47901 is a sandbox escape vulnerability in Logseq, an open-source knowledge management and note-taking application. Plugins running inside sandboxed iframes can inject arbitrary HTML attributes, including event handlers, into their container element in the host Document Object Model (DOM). Because the Content Security Policy (CSP) is disabled in the host context, a malicious plugin can execute arbitrary JavaScript with the privileges of the host application. This pathway can lead to unauthorized access to filesystem APIs exposed to the privileged renderer. The flaw is classified under [CWE-79] (Improper Neutralization of Input During Web Page Generation).

Critical Impact

A malicious Logseq plugin can break out of its iframe sandbox and execute arbitrary JavaScript in the privileged host context, gaining access to filesystem APIs.

Affected Products

  • Logseq v0.10.15 (confirmed vulnerable)
  • Status of other Logseq versions is unknown, as no patch was issued
  • Logseq deployments that load third-party plugins

Discovery Timeline

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

Technical Details for CVE-2026-47901

Vulnerability Analysis

Logseq loads third-party plugins inside sandboxed iframes, which are intended to isolate untrusted plugin code from the privileged host renderer. The isolation boundary fails because plugins can write arbitrary HTML attributes onto their own container element, which resides in the host DOM rather than inside the iframe. Attributes such as onclick, onmouseover, or onerror are interpreted by the host context and execute JavaScript with host privileges when triggered. The privileged renderer in Logseq exposes filesystem APIs typical of Electron-based desktop applications, so successful escape grants the plugin read and write access to user files. A properly configured Content Security Policy would block inline event handlers, but CSP is disabled in the host context.

Root Cause

The root cause is twofold. First, the plugin API permits a sandboxed plugin to mutate attributes on its container element, which lives outside the iframe and is parsed by the trusted host. Second, CSP is not enforced in the host context, so injected inline event handlers execute without restriction. Neither boundary alone would be sufficient, but the combination produces a complete sandbox escape.

Attack Vector

Exploitation requires a user to install or load a malicious plugin, then interact with a page element controlled by that plugin. The plugin sets an attribute such as onmouseover="<payload>" on its host-side container. When the user moves the cursor over the element, the host context evaluates the handler and runs attacker-supplied JavaScript with access to Logseq's privileged APIs. From this position, the attacker can enumerate the filesystem, exfiltrate notes, or write malicious files. No verified public proof-of-concept code is referenced in the advisory; readers should consult the CERT PL Advisory for technical details.

Detection Methods for CVE-2026-47901

Indicators of Compromise

  • Logseq plugins from untrusted sources or sideloaded outside the official marketplace.
  • Unexpected child processes spawned by the Logseq renderer process.
  • Unexpected file reads or writes by Logseq outside the configured graph directory.
  • Outbound network connections from Logseq to domains not associated with sync or plugin update services.

Detection Strategies

  • Inventory installed Logseq plugins on managed endpoints and compare against an approved allowlist.
  • Inspect plugin source for DOM attribute writes targeting container elements, particularly inline event handler attributes (on*).
  • Monitor Logseq process telemetry for filesystem access patterns inconsistent with normal note-taking activity.
  • Review browser developer tools or Electron logs for injected inline event handlers in the host DOM during plugin testing.

Monitoring Recommendations

  • Alert on Logseq processes accessing sensitive directories such as SSH keys, browser profile data, or credential stores.
  • Log plugin installation events and flag installations from non-marketplace sources.
  • Track outbound connections from the Logseq process and baseline expected destinations.

How to Mitigate CVE-2026-47901

Immediate Actions Required

  • Remove untrusted or unverified plugins from Logseq installations until a patched version is confirmed available.
  • Restrict Logseq plugin installation to a vetted internal allowlist managed by IT.
  • Treat any installed plugin as capable of arbitrary code execution within the user's account context.
  • Isolate Logseq usage to workstations that do not store high-value credentials or secrets.

Patch Information

The advisory states the issue was not addressed by a patch at the time of publication. Only Logseq v0.10.15 was tested and confirmed vulnerable, and the status of other versions is unknown. Monitor the Logseq Official Website and the CERT PL Advisory for updates on a fixed release.

Workarounds

  • Disable the Logseq plugin system entirely if plugins are not required for business workflows.
  • Run Logseq under a low-privilege user account with filesystem access limited to the graph directory.
  • Use application allowlisting to prevent installation of unauthorized Logseq builds or plugin packages.
  • Educate users not to install Logseq plugins from untrusted GitHub repositories or third-party sources.

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.