{"answers":{"affected":"4 open source packages ship an affected version, including @vitest/browser.","exploited":"It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-47428 exists.","fix":"Upgrade @vitest/browser to a fixed version for your release line: 4.1.6 or 5.0.0-beta.3.","what":"CVE-2026-47428 is a critical cross-site scripting vulnerability in vitest-dev vitest, published on 14 Jul 2026. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link."},"fix_prompt":"Check this codebase for CVE-2026-47428 and fix it if it is affected.\n\nWhat it is: CVE-2026-47428 is a critical cross-site scripting vulnerability in vitest-dev vitest, published on 14 Jul 2026. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.\nExploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-47428 exists.\n\nAffected packages and fixed versions:\n- @vitest/browser (npm): affected from 4.0.17; fixed in 4.1.6\n- @vitest/browser (npm): affected from 4.0.17; fixed in 4.1.6\n- @vitest/browser (npm): affected from 5.0.0-beta.0; fixed in 5.0.0-beta.3\n- @vitest/browser (npm): affected from 5.0.0-beta.0; fixed in 5.0.0-beta.3\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-47428/ (Markdown: https://insights.sbomify.com/CVE-2026-47428/index.md)","id":"CVE-2026-47428","markdown":"https://insights.sbomify.com/CVE-2026-47428/index.md","name":"CVE-2026-47428","record":{"aliases":["GHSA-2h32-95rg-cppp","MINI-2jrf-q37h-x2x3","MINI-4rr3-8c8r-v8h2"],"analysis":{"component_type":"developer_tool","fix_type":"upgrade","impacts":["code_execution","data_read"],"network_reachable":"yes","non_default_config":false,"product_category":"Vitest testing framework","requires_auth":"none","summary":"Attackers can execute arbitrary JavaScript in Vitest Browser Mode via unsanitized query parameters, potentially stealing API tokens.","user_interaction":"required","vuln_class":"xss"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[],"cvss":{"score":9.6,"severity":"critical","source":"cna","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H","version":"3.1"},"cwes":[{"id":"CWE-79","name":"Improper Neutralization of Input During Web Page Generation"}],"description":"Vitest is a testing framework powered by Vite. From 4.0.17 until 4.1.6 and 5.0.0-beta.3, Vitest Browser Mode served /__vitest_test__/ with the otelCarrier query parameter inserted directly into an inline module script, allowing a crafted browser-runner URL to execute arbitrary JavaScript in the Vitest server origin and recover VITEST_API_TOKEN for authenticated API calls. This issue is fixed in versions 4.1.6 and 5.0.0-beta.3.","ecosystems":["npm"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"weaponised"},"has_fix":true,"headline":"Vitest browser mode serves unsanitized otelCarrier query parameter as inline script","id":"CVE-2026-47428","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"npm","product":null,"products":[],"type":"xss","year":"2026"},"n_packages":4,"n_references":7,"next":{"headline":"Vitest: Arbitrary file can be read and executed when Vitest UI server is listening","id":"CVE-2026-47429"},"packages":[{"ecosystem":"npm","fixed":["4.1.6"],"introduced":["4.0.17"],"last_affected":[],"package":"@vitest/browser","purl":null,"source":"GHSA-2h32-95rg-cppp"},{"ecosystem":"npm","fixed":["4.1.6"],"introduced":["4.0.17"],"last_affected":[],"package":"@vitest/browser","purl":"pkg:npm/%40vitest/browser","source":"GHSA-2h32-95rg-cppp"},{"ecosystem":"npm","fixed":["5.0.0-beta.3"],"introduced":["5.0.0-beta.0"],"last_affected":[],"package":"@vitest/browser","purl":null,"source":"GHSA-2h32-95rg-cppp"},{"ecosystem":"npm","fixed":["5.0.0-beta.3"],"introduced":["5.0.0-beta.0"],"last_affected":[],"package":"@vitest/browser","purl":"pkg:npm/%40vitest/browser","source":"GHSA-2h32-95rg-cppp"}],"prev":{"headline":"GitHub MCP Server: Nil Pointer Dereference DoS in completion/complete Handler","id":"CVE-2026-47427"},"products":["vitest"],"published":"2026-07-14","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":"poc","technical_impact":"total"},"state":"PUBLISHED","updated":"2026-07-15","vendors":["vitest-dev"]},"summary":"Attackers can execute arbitrary JavaScript in Vitest Browser Mode via unsanitized query parameters, potentially stealing API tokens.","url":"https://insights.sbomify.com/CVE-2026-47428/"}