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

- Severity: High 7.8 (CVSS:3.1, scored by NVD) `CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 1.24%, higher than 70% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2021-11-04T20:20:59.000Z
- Modified: 2026-06-17T04:09:14.307Z
- Also known as: GHSA-xfg5-vrmc-24wc
- Weaknesses: CWE-94
- Assigned by: mitre

## 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.

(As written by CVE List.)

## Affected

- Unspecified product: n/a
- obsidian-dataview (npm): before 0.4.13
- obsidian obsidian_dataview: up to 0.4.11; 0.4.12

## Every score

- GitHub: CVSS:3.1 7.8 High `CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H`
- NVD: CVSS:3.1 7.8 High `CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H`
- NVD: CVSS:2.0 9.3 High `AV:N/AC:M/Au:N/C:C/I:C/A:C`

## References

- <https://github.com/blacksmithgu/obsidian-dataview/issues/615> (exploit, issue-tracking, third-party-advisory, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2021-42057> (advisory)
- <https://github.com/blacksmithgu/obsidian-dataview> (package)

## Sources

- CVE List: [CVE-2021-42057](https://www.cve.org/CVERecord?id=CVE-2021-42057), CVE Terms of Use, modified 2024-08-04
- GitHub Advisory Database: [GHSA-xfg5-vrmc-24wc](https://github.com/advisories/GHSA-xfg5-vrmc-24wc), CC-BY-4.0, modified 2023-11-08
- NVD: [CVE-2021-42057](https://nvd.nist.gov/vuln/detail/CVE-2021-42057), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2021-42057 · Whole record: https://cve.day/CVE-2021-42057.json · Rebuilt by cve.day 2026-11-25T22:58:05.359Z
