{"answers":{"affected":"8 open source packages ship an affected version, including @vitest/mocker and vitest.","exploited":"There is no known exploitation of CVE-2026-84373 in the wild and no public exploit code.","fix":"Upgrade @vitest/mocker to a fixed version for your release line: 4.1.11 or 5.0.0-rc.2.","what":"CVE-2026-84373 is a medium-severity path traversal vulnerability in @vitest mocker, published on 1 Sep 2026. An attacker can exploit it over the internet without logging in, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2026-84373 and fix it if it is affected.\n\nWhat it is: CVE-2026-84373 is a medium-severity path traversal vulnerability in @vitest mocker, published on 1 Sep 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.\nExploitation: There is no known exploitation of CVE-2026-84373 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- @vitest/mocker (npm): affected from 2.1.0; fixed in 4.1.11\n- @vitest/mocker (npm): affected from 2.1.0; fixed in 4.1.11\n- @vitest/mocker (npm): affected from 5.0.0-beta.1; fixed in 5.0.0-rc.2\n- @vitest/mocker (npm): affected from 5.0.0-beta.1; fixed in 5.0.0-rc.2\n- vitest (npm): affected from 2.1.0; fixed in 4.1.11\n- vitest (npm): affected from 2.1.0; fixed in 4.1.11\n- vitest (npm): affected from 5.0.0-beta.1; fixed in 5.0.0-rc.2\n- vitest (npm): affected from 5.0.0-beta.1; fixed in 5.0.0-rc.2\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-2026-84373/ (Markdown: https://insights.sbomify.com/CVE-2026-84373/index.md)","id":"CVE-2026-84373","markdown":"https://insights.sbomify.com/CVE-2026-84373/index.md","name":"CVE-2026-84373","record":{"aliases":["CLEANSTART-2026-BX79488","CLEANSTART-2026-MR36651","CLEANSTART-2026-RG48611","CLSA-2026-1789478968","CLSA-2026-1792160943","CLSA-2026-1792160957","CLSA-2026-1792161472","CLSA-2026-1792161573","CLSA-2026-1792161646","CLSA-2026-1792161718","CLSA-2026-1792161765","CLSA-2026-1792161829","CLSA-2026-1792161973","CLSA-2026-1792162033","ECHO-2b2f-5ba5-bff1","GHSA-82fw-gwwq-j7x9","MINI-5pch-36c6-cvh7","MINI-8rxg-g84w-c65f","MINI-c3hj-pmj9-x7x9","MINI-hvp3-872p-jpcc","MINI-mj86-vxfj-vm9m","MINI-phjm-6r4j-r7v3","MINI-xrfm-58hw-j5xm"],"analysis":{"component_type":"developer_tool","fix_type":"upgrade","impacts":["data_read"],"network_reachable":"yes","non_default_config":true,"product_category":"Vitest testing framework","requires_auth":"none","summary":"Remote attackers can read arbitrary local files via path traversal in Vitest's mocker plugin when the development server is exposed.","user_interaction":"not_required","vuln_class":"path_traversal"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[],"cvss":{"score":5.9,"severity":"medium","source":"cna","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N","version":"3.1"},"cwes":[{"id":"CWE-22","name":"Improper Limitation of a Pathname to a Restricted Directory"}],"description":"Vitest is a testing framework powered by Vite. From 2.1.0 until 4.1.11 and 5.0.0-rc.2, the public mockerPlugin and standalone interceptorPlugin exports in packages/mocker/src/node/interceptorPlugin.ts register the vitest:interceptor:register handler on Vite's unauthenticated HMR WebSocket without validating redirect targets against the file-serving allowlist. The implementation processes event.redirect without enforcing server.fs.allow and server.fs.deny through isFileLoadingAllowed. A remote client that can reach an exposed development server can submit an opaque URL scheme preserving .. segments, causing join(server.config.root, redirectUrl.pathname) to resolve outside the project root. The plugin's load hook then returns readFile(mock.redirect, 'utf-8') as module source, disclosing local files readable by the dev-server process. Vitest browser mode uses a token-authenticated RPC and is not remotely unauthenticated by default, although the same boundary check was missing on that path. This issue is fixed in versions 4.1.11 and 5.0.0-rc.2.","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":"Vitest: Path Traversal / Arbitrary File Read via @vitest/mocker Redirect Mock","id":"CVE-2026-84373","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"npm","product":null,"products":[],"type":"path_traversal","year":"2026"},"n_packages":8,"n_references":8,"next":{"headline":"Laravel Excel writes exports outside the configured filesystem disk when given a caller-controlled path","id":"CVE-2026-84374"},"packages":[{"ecosystem":"npm","fixed":["4.1.11"],"introduced":["2.1.0"],"last_affected":[],"package":"@vitest/mocker","purl":null,"source":"GHSA-82fw-gwwq-j7x9"},{"ecosystem":"npm","fixed":["4.1.11"],"introduced":["2.1.0"],"last_affected":[],"package":"@vitest/mocker","purl":"pkg:npm/%40vitest/mocker","source":"GHSA-82fw-gwwq-j7x9"},{"ecosystem":"npm","fixed":["5.0.0-rc.2"],"introduced":["5.0.0-beta.1"],"last_affected":[],"package":"@vitest/mocker","purl":null,"source":"GHSA-82fw-gwwq-j7x9"},{"ecosystem":"npm","fixed":["5.0.0-rc.2"],"introduced":["5.0.0-beta.1"],"last_affected":[],"package":"@vitest/mocker","purl":"pkg:npm/%40vitest/mocker","source":"GHSA-82fw-gwwq-j7x9"},{"ecosystem":"npm","fixed":["4.1.11"],"introduced":["2.1.0"],"last_affected":[],"package":"vitest","purl":null,"source":"GHSA-82fw-gwwq-j7x9"},{"ecosystem":"npm","fixed":["4.1.11"],"introduced":["2.1.0"],"last_affected":[],"package":"vitest","purl":"pkg:npm/vitest","source":"GHSA-82fw-gwwq-j7x9"},{"ecosystem":"npm","fixed":["5.0.0-rc.2"],"introduced":["5.0.0-beta.1"],"last_affected":[],"package":"vitest","purl":null,"source":"GHSA-82fw-gwwq-j7x9"},{"ecosystem":"npm","fixed":["5.0.0-rc.2"],"introduced":["5.0.0-beta.1"],"last_affected":[],"package":"vitest","purl":"pkg:npm/vitest","source":"GHSA-82fw-gwwq-j7x9"}],"prev":{"headline":"Predis: Redis command injection and denial of service via CRLF smuggling in pipelined commands on aggregate connections","id":"CVE-2026-84372"},"products":["mocker","vitest"],"published":"2026-09-01","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":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"no","exploitation":"none","technical_impact":"partial"},"state":"PUBLISHED","updated":"2026-09-02","vendors":["@vitest","vitest-dev"]},"summary":"Remote attackers can read arbitrary local files via path traversal in Vitest's mocker plugin when the development server is exposed.","url":"https://insights.sbomify.com/CVE-2026-84373/"}