CVE-2021-42057 — obsidian-dataview
HIGHCVE-2021-42057 is a high-severity (CVSS 7.8) Code Injection vulnerability in obsidian-dataview. 1 public exploit or proof-of-concept reference is indexed, so weaponization risk is real. A fix is available for obsidian-dataview — see the affected versions and patch details below.
Obsidian Dataview vulnerable to code injection due to unsafe eval
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
Where this sits among everything scored
Real-World Exposure
How broadly this vulnerability is actually deployed: weekly install volume shows current usage, and reverse-dependency count shows how many other packages break if it stays unpatched.
obsidian-dataviewnpmDescription
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.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 📦npm | obsidian-dataview | all versions | 0.4.13npm install obsidian-dataview@0.4.13 |
Affected Products
obsidian dataviewobsidianResearch use only. For defensive security, authorized penetration testing, and academic research only. Never execute exploit code against systems without explicit written authorization.
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for obsidian-dataview, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update obsidian-dataview to 0.4.13 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2021-42057 is resolved across your whole dependency graph.
Workarounds
Stop passing untrusted input into the interpreter or shell: call the affected binary with an argument array rather than a composed command string, reject anything outside a strict allowlist of expected values, and run the component under an account that cannot reach beyond the work it legitimately does.
Frequently Asked Questions
Is CVE-2021-42057 in your dependencies?
Find it across npm, including transitive dependencies.