CVE-2024-49362
JavaScript vulnerability analysis and mitigation

Overview

Joplin, a free and open-source note-taking application, was found to contain a vulnerability (CVE-2024-49362) that enables remote code execution (RCE) when a user clicks on a link within untrusted notes. The vulnerability was disclosed on November 14, 2024, affecting Joplin-desktop version 3.0. The issue stems from insufficient sanitization of tag attributes introduced by the Mermaid feature (GitHub Advisory).

Technical details

The vulnerability occurs in the markdown preview iframe where Joplin only opens links internally within the same Electron window if they contain the data-from-md attribute. While Joplin sanitizes this attribute in user-embedded links from .md files, it fails to sanitize the data-from-md attributes of tags introduced by Mermaid. The application opens windows with nodeIntegration set to true and contextIsolation set to false, allowing scripts to have full access to Node.js APIs. The markdown preview iframe shares the same origin as its parent and lacks sandbox attributes, enabling scripts to call Node.js APIs through window.parent (GitHub Advisory).

Impact

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. When users open and interact with untrusted notes while malicious HTML files are available locally, attackers can achieve Remote Code Execution (GitHub Advisory).

Mitigation and workarounds

The vulnerability has been patched in Joplin version 3.1. Users are advised to upgrade to this version or later to protect against this security issue (GitHub Advisory).

Additional resources


SourceThis report was generated using AI

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

“Best User Experience I have ever seen, provides full visibility to cloud workloads.”
David EstlickCISO
“Wiz provides a single pane of glass to see what is going on in our cloud environments.”
Adam FletcherChief Security Officer
“We know that if Wiz identifies something as critical, it actually is.”
Greg PoniatowskiHead of Threat and Vulnerability Management