{"answers":{"affected":"6 open source packages ship an affected version, including @vitest/browser, @vitest/ui and vite-plus.","exploited":"There is no known exploitation of CVE-2026-112948 in the wild and no public exploit code.","fix":"Upgrade @vitest/browser to 5.0.5 or later.","what":"CVE-2026-112948 is a medium-severity vulnerability in @vitest browser, published on 20 Oct 2026."},"fix_prompt":"Check this codebase for CVE-2026-112948 and fix it if it is affected.\n\nWhat it is: CVE-2026-112948 is a medium-severity vulnerability in @vitest browser, published on 20 Oct 2026. \nExploitation: There is no known exploitation of CVE-2026-112948 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- @vitest/browser (npm): affected from 5.0.0-beta.6; fixed in 5.0.5\n- @vitest/browser (npm): affected from 5.0.0-beta.6; fixed in 5.0.5\n- @vitest/ui (npm): affected from 5.0.0-beta.6; fixed in 5.0.5\n- @vitest/ui (npm): affected from 5.0.0-beta.6; fixed in 5.0.5\n- vite-plus (npm): affected from 1.0.0-rc.0; fixed in 1.3.0\n- vite-plus (npm): affected from 1.0.0-rc.0; fixed in 1.3.0\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-112948/ (Markdown: https://insights.sbomify.com/CVE-2026-112948/index.md)","id":"CVE-2026-112948","markdown":"https://insights.sbomify.com/CVE-2026-112948/index.md","name":"CVE-2026-112948","record":{"aliases":["GHSA-p458-7748-mcp3"],"analysis":null,"analysis_generated_by":null,"assigner":"GitHub_M","cpe":[],"cvss":{"score":6.5,"severity":"medium","source":"cna","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N","version":"3.1"},"cwes":[{"id":"CWE-552","name":"Files or Directories Accessible to External Parties"},{"id":"CWE-200","name":"Exposure of Sensitive Information to an Unauthorized Actor"}],"description":"Vitest is a testing framework powered by Vite. From 5.0.0-beta.6 until 5.0.5, Vitest dev servers can misapply server.fs.deny because project servers replace Vite's defaults and the root server adds .vitest-secret-token after Vite compiles its matcher. An attacker who can reach an affected UI, Browser Mode, or API server can read denied project files or the fallback API token at node_modules/.vitest/.vitest-secret-token, and Browser Mode with test.projects can expose JavaScript-compatible .env values through a malicious website. This issue is fixed in version 5.0.5.","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: Servers misapply `server.fs.deny`, serving `.env`, private keys, `.git`, and the API token file","id":"CVE-2026-112948","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"npm","product":null,"products":[],"type":null,"year":"2026"},"n_packages":6,"n_references":4,"next":{"headline":"Vitest: Code injection via unauthenticated manual mock registration","id":"CVE-2026-112949"},"packages":[{"ecosystem":"npm","fixed":["5.0.5"],"introduced":["5.0.0-beta.6"],"last_affected":[],"package":"@vitest/browser","purl":null,"source":"GHSA-p458-7748-mcp3"},{"ecosystem":"npm","fixed":["5.0.5"],"introduced":["5.0.0-beta.6"],"last_affected":[],"package":"@vitest/browser","purl":"pkg:npm/%40vitest/browser","source":"GHSA-p458-7748-mcp3"},{"ecosystem":"npm","fixed":["5.0.5"],"introduced":["5.0.0-beta.6"],"last_affected":[],"package":"@vitest/ui","purl":null,"source":"GHSA-p458-7748-mcp3"},{"ecosystem":"npm","fixed":["5.0.5"],"introduced":["5.0.0-beta.6"],"last_affected":[],"package":"@vitest/ui","purl":"pkg:npm/%40vitest/ui","source":"GHSA-p458-7748-mcp3"},{"ecosystem":"npm","fixed":["1.3.0"],"introduced":["1.0.0-rc.0"],"last_affected":[],"package":"vite-plus","purl":null,"source":"GHSA-p458-7748-mcp3"},{"ecosystem":"npm","fixed":["1.3.0"],"introduced":["1.0.0-rc.0"],"last_affected":[],"package":"vite-plus","purl":"pkg:npm/vite-plus","source":"GHSA-p458-7748-mcp3"}],"prev":{"headline":"Vite: First 4 bytes of files outside of `server.fs` setting is exposed by `?vite-wasm-instance`","id":"CVE-2026-112947"},"products":["browser","ui","vite-plus","vitest"],"published":"2026-10-20","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-10-20","vendors":["@vitest","vitejs","vitest-dev"]},"summary":null,"url":"https://insights.sbomify.com/CVE-2026-112948/"}