CVE-2021-42057 Obsidian Dataview vulnerable to code injection due to unsafe eval

High 7.8 Published Updated

Attackers can execute arbitrary code by crafting malicious Markdown files processed by the Dataview plugin in Obsidian.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Local or same network only
Victim action needed
A user has to click or open something
Fix
Available

What is CVE-2021-42057?

CVE-2021-42057 is a high-severity code injection vulnerability in n/a, published on 4 Nov 2021. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.

Official description

Obsidian Dataview through 0.4.12-hotfix1 allows eval injection. The evalInContext function in executes user input, which allows an attacker to craft malicious Markdown files that will execute arbitrary code once opened. NOTE: 0.4.13 provides a mitigation for some use cases.

Weakness: CWE-94

Which versions are affected by CVE-2021-42057?

2 open source packages ship an affected version, including obsidian-dataview. It affects 1 product.

PackageAffectedFixed in
obsidian-dataview npmAll versions0.4.13
obsidian-dataview npmAll versions0.4.13

Products include Obsidian Obsidian Dataview.

How do I fix CVE-2021-42057?

Upgrade obsidian-dataview to 0.4.13 or later.

Upgrade, and never evaluate templates, expressions or code built from user input. More about Code injection.

Is CVE-2021-42057 being exploited?

There is no known exploitation of CVE-2021-42057 in the wild and no public exploit code.

Sources

Also known as GHSA-xfg5-vrmc-24wc.

Is CVE-2021-42057 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free