{"answers":{"affected":"2 open source packages ship an affected version, including obsidian-dataview. It affects 1 product.","exploited":"There is no known exploitation of CVE-2021-42057 in the wild and no public exploit code.","fix":"Upgrade obsidian-dataview to 0.4.13 or later.","what":"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."},"fix_prompt":"Check this codebase for CVE-2021-42057 and fix it if it is affected.\n\nWhat it is: 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.\nExploitation: There is no known exploitation of CVE-2021-42057 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- obsidian-dataview (npm): affected all versions; fixed in 0.4.13\n- obsidian-dataview (npm): affected all versions; fixed in 0.4.13\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2021-42057/ (Markdown: https://insights.sbomify.com/CVE-2021-42057/index.md)","id":"CVE-2021-42057","markdown":"https://insights.sbomify.com/CVE-2021-42057/index.md","name":"CVE-2021-42057","record":{"aliases":["GHSA-xfg5-vrmc-24wc"],"analysis":{"component_type":"desktop_application","fix_type":"upgrade","impacts":["code_execution"],"network_reachable":"adjacent_or_local","non_default_config":false,"product_category":"Obsidian Dataview plugin","requires_auth":"none","summary":"Attackers can execute arbitrary code by crafting malicious Markdown files processed by the Dataview plugin in Obsidian.","user_interaction":"required","vuln_class":"code_injection"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"mitre","cpe":[{"product":"obsidian_dataview","vendor":"obsidian"}],"cvss":{"score":7.8,"severity":"high","source":"nvd","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","version":"3.1"},"cwes":[{"id":"CWE-94","name":"Improper Control of Generation of Code"}],"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.","ecosystems":["npm"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"none_known"},"has_fix":true,"headline":"Obsidian Dataview vulnerable to code injection due to unsafe eval","id":"CVE-2021-42057","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"npm","product":null,"products":[],"type":"code_injection","year":"2021"},"n_packages":2,"n_references":1,"next":{"headline":"Memory corruption in n/a","id":"CVE-2021-42059"},"packages":[{"ecosystem":"npm","fixed":["0.4.13"],"introduced":["0"],"last_affected":[],"package":"obsidian-dataview","purl":null,"source":"GHSA-xfg5-vrmc-24wc"},{"ecosystem":"npm","fixed":["0.4.13"],"introduced":["0"],"last_affected":[],"package":"obsidian-dataview","purl":"pkg:npm/obsidian-dataview","source":"GHSA-xfg5-vrmc-24wc"}],"prev":{"headline":"Path traversal in n/a","id":"CVE-2021-42056"},"products":["n/a"],"published":"2021-11-04","related":[],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":null,"exploitation":null,"technical_impact":null},"state":"PUBLISHED","updated":"2024-08-04","vendors":["n/a"]},"summary":"Attackers can execute arbitrary code by crafting malicious Markdown files processed by the Dataview plugin in Obsidian.","url":"https://insights.sbomify.com/CVE-2021-42057/"}