{"answers":{"affected":"4 open source packages ship an affected version, including @vitest/browser. It affects 1 product.","exploited":"It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-24963 exists.","fix":"Upgrade @vitest/browser to a fixed version for your release line: 2.1.9 or 3.0.4.","what":"CVE-2025-24963 is a medium-severity path traversal vulnerability in vitest-dev vitest, published on 4 Feb 2025. An attacker can exploit it over the internet without logging in, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2025-24963 and fix it if it is affected.\n\nWhat it is: CVE-2025-24963 is a medium-severity path traversal vulnerability in vitest-dev vitest, published on 4 Feb 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.\nExploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-24963 exists.\n\nAffected packages and fixed versions:\n- @vitest/browser (npm): affected from 2.0.4; fixed in 2.1.9\n- @vitest/browser (npm): affected from 2.0.4; fixed in 2.1.9\n- @vitest/browser (npm): affected from 3.0.0; fixed in 3.0.4\n- @vitest/browser (npm): affected from 3.0.0; fixed in 3.0.4\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-2025-24963/ (Markdown: https://insights.sbomify.com/CVE-2025-24963/index.md)","id":"CVE-2025-24963","markdown":"https://insights.sbomify.com/CVE-2025-24963/index.md","name":"CVE-2025-24963","record":{"aliases":["GHSA-8gvc-j273-4wm5"],"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":"Attackers can read arbitrary files from the server if the Vitest browser mode is explicitly exposed to the network.","user_interaction":"not_required","vuln_class":"path_traversal"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"vitest","vendor":"vitest.dev"}],"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. The `__screenshot-error` handler on the browser mode HTTP server that responds any file on the file system. Especially if the server is exposed on the network by `browser.api.host: true`, an attacker can send a request to that handler from remote to get the content of arbitrary files.This `__screenshot-error` handler on the browser mode HTTP server responds any file on the file system. This code was added by commit `2d62051`. Users explicitly exposing the browser mode server to the network by `browser.api.host: true` may get any files exposed. This issue has been addressed in versions 2.1.9 and 3.0.4. Users are advised to upgrade. There are no known workarounds for this vulnerability.","ecosystems":["npm"],"exploits":{"exploitdb":0,"first_seen":"2025-04-23","github_poc":1,"max_poc_stars":0,"metasploit":0,"nuclei":1,"refs":[{"date":"2025-04-23T08:01:49Z","kind":"github_poc","ref":"https://github.com/hiteshpatra/CVE-2025-24963","stars":0,"title":null},{"date":null,"kind":"nuclei","ref":"http/cves/2025/CVE-2025-24963.yaml","stars":null,"title":"Vitest Browser Mode - Local File Read"}],"tier":"weaponised"},"has_fix":true,"headline":"Browser mode serves arbitrary files in vitest","id":"CVE-2025-24963","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"npm","product":null,"products":[],"type":"path_traversal","year":"2025"},"n_packages":4,"n_references":4,"next":{"headline":"Remote Code Execution when accessing a malicious website while Vitest API server is listening","id":"CVE-2025-24964"},"packages":[{"ecosystem":"npm","fixed":["2.1.9"],"introduced":["2.0.4"],"last_affected":[],"package":"@vitest/browser","purl":null,"source":"GHSA-8gvc-j273-4wm5"},{"ecosystem":"npm","fixed":["2.1.9"],"introduced":["2.0.4"],"last_affected":[],"package":"@vitest/browser","purl":"pkg:npm/%40vitest/browser","source":"GHSA-8gvc-j273-4wm5"},{"ecosystem":"npm","fixed":["3.0.4"],"introduced":["3.0.0"],"last_affected":[],"package":"@vitest/browser","purl":null,"source":"GHSA-8gvc-j273-4wm5"},{"ecosystem":"npm","fixed":["3.0.4"],"introduced":["3.0.0"],"last_affected":[],"package":"@vitest/browser","purl":"pkg:npm/%40vitest/browser","source":"GHSA-8gvc-j273-4wm5"}],"prev":{"headline":"Command Injection in reNgine","id":"CVE-2025-24962"},"products":["vitest"],"published":"2025-02-04","related":[{"cvss_score":9.8,"headline":"Vitest: Arbitrary file can be read and executed when Vitest UI server is listening","id":"CVE-2026-47429","kev_date_added":null,"published":"2026-07-14"},{"cvss_score":9.7,"headline":"Remote Code Execution when accessing a malicious website while Vitest API server is listening","id":"CVE-2025-24964","kev_date_added":null,"published":"2025-02-04"}],"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)"},{"class":"attribution","licence":"MIT","name":"Nuclei templates"},{"class":"open","licence":"CC0","name":"PoC-in-GitHub"}],"ssvc":{"automatable":"no","exploitation":"poc","technical_impact":"total"},"state":"PUBLISHED","updated":"2025-02-12","vendors":["vitest-dev"]},"summary":"Attackers can read arbitrary files from the server if the Vitest browser mode is explicitly exposed to the network.","url":"https://insights.sbomify.com/CVE-2025-24963/"}