Miggo Logo

CVE-2024-49362: Remote Code Execution on click of <a> Link in markdown preview

7.7

CVSS Score
3.1

Basic Information

EPSS Score
0.41704%
Published
11/14/2024
Updated
1/30/2025
KEV Status
No
Technology
TechnologyJavaScript

Technical Details

CVSS Vector
CVSS:3.1/AV:L/AC:L/PR:H/UI:R/S:C/C:H/I:H/A:L
Package NameEcosystemVulnerable VersionsFirst Patched Version
joplinnpm= 3.0.03.1.0

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability stems from two key issues:

  1. Insufficient sanitization in webviewLib.js: The click handler (lines 93-116) trusts data-from-md attributes from Mermaid-rendered links, allowing attackers to bypass external link protections.
  2. Insecure Electron configuration: The webPreferences in ElectronAppWrapper.ts (lines 141-155) disable critical security controls, enabling Node.js API access in untrusted contexts. Together, these allow malicious links to execute shell commands via window.parent.require in the same-origin Electron environment.

Vulnerable functions

Only Mi**o us*rs **n s** t*is s**tion

WAF Protection Rules

WAF Rule

### Summ*ry T**r* is * vuln*r**ility in `Joplin-**sktop` t**t l***s to r*mot* *o** *x**ution (R**) w**n * us*r *li*ks on *n `<*>` link wit*in untrust** not*s. T** issu* *ris*s *u* to insu**i*i*nt s*nitiz*tion o* `<*>` t** *ttri*ut*s intro*u*** *y t*

Reasoning

T** vuln*r**ility st*ms *rom two k*y issu*s: *. **Insu**i*i*nt s*nitiz*tion in w**vi*wLi*.js**: T** *li*k **n*l*r (lin*s **-***) trusts `**t*-*rom-m*` *ttri*ut*s *rom M*rm*i*-r*n**r** links, *llowin* *tt**k*rs to *yp*ss *xt*rn*l link prot**tions. *.