VYPR
High severityNVD Advisory· Published Nov 14, 2024· Updated Nov 14, 2024

Remote Code Execution on click of <a> Link in markdown preview

CVE-2024-49362

Description

Joplin is a free, open source note taking and to-do application. Joplin-desktop has a vulnerability that leads to remote code execution (RCE) when a user clicks on an link within untrusted notes. The issue arises due to insufficient sanitization of tag attributes introduced by the Mermaid. This vulnerability allows the execution of untrusted HTML content within the Electron window, which has full access to Node.js APIs, enabling arbitrary shell command execution.

AI Insight

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

Joplin-desktop RCE via XSS in Mermaid-generated tags due to insufficient sanitization and insecure Electron settings.

Vulnerability

Overview

CVE-2024-49362 is a remote code execution (RCE) vulnerability in Joplin-desktop, a free, open-source note-taking application. The flaw arises from insufficient sanitization of ` tag attributes in HTML rendered by Mermaid diagrams within untrusted notes. When a user clicks a crafted ` link, the application opens it in the same Electron window without proper isolation, leading to arbitrary shell command execution [1][3].

Exploitation

Mechanism

The markdown preview uses an iframe that shares the same origin as the parent and has nodeIntegration enabled while contextIsolation is disabled. Joplin only opens ` links containing a data-from-md attribute internally. An attacker can embed a Mermaid diagram (e.g., a flowchart) containing an tag with this attribute. Because Mermaid-generated HTML is not sanitized for the data-from-md attribute, the link is opened within the Electron window with full Node.js API access. Moreover, the iframe lacks a sandbox attribute, allowing scripts to call window.parent` and use Node.js APIs [2][3].

Impact

Successful exploitation enables an attacker to execute arbitrary commands on the host system. Since Joplin uses Electron with elevated privileges, any script running in the affected context can invoke Node.js modules such as child_process to run shell commands, potentially leading to full system compromise [1][2].

Mitigation

The vulnerability was reported via Joplin's security advisory and the Joplin project maintainers should issue a patched version that properly sanitizes Mermaid-generated HTML or restricts the opening of internal links to trusted origins. Users are advised to update Joplin-desktop once a fix is released and to exercise caution when importing notes from untrusted sources [3].

AI Insight generated on May 20, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.

Affected packages

Versions sourced from the GitHub Security Advisory.

PackageAffected versionsPatched versions
joplinnpm
>= 3.0.0, < 3.1.03.1.0

Affected products

2
  • ghsa-coords
    Range: >= 3.0.0, < 3.1.0
  • laurent22/joplinv5
    Range: < 3.1

Patches

0

No patches discovered yet.

Vulnerability mechanics

AI mechanics synthesis has not run for this CVE yet.

References

3

News mentions

0

No linked articles in our index yet.