{"id":"CVE-2025-24963","published":"2025-02-04T19:36:52Z","modified":"2025-02-12T20:51:28Z","title":"Browser mode serves arbitrary files in vitest","vendor":"vitest-dev","product":"vitest","tier":"core","eol":null,"affectedVersions":[{"vendor":"vitest-dev","product":"vitest","versions":[">= 2.0.4, < 2.1.9",">= 3.0.0, < 3.0.4"]}],"ssvc":{"exploitation":"poc","automatable":"no","technicalImpact":"total","timestamp":"2025-02-04T19:44:40.367761Z","from":"CISA ADP","provenance":"source"},"description":{"text":"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.","provenance":"source","from":"CVE.org"},"summary":{"text":"The flaw is a path traversal issue in the __screenshot-error handler of the browser mode HTTP server in Vitest, the Vite-based testing framework from vitest-dev. The handler responds with the contents of any file on the file system, and the exposure is greatest when the server is made reachable over the network via browser.api.host: true, where an attacker with network access and no authentication or user interaction can request arbitrary files and read their contents, with high confidentiality impact and no integrity or availability impact.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T07:14:15Z"},"cvss":{"score":5.9,"severity":"MEDIUM","version":"3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.02569,"percentile":0.85869,"date":"2026-11-25","provenance":"source"},"kev":null,"vulncheckKev":{"dateAdded":"2026-04-30","exploitedFirstSeen":null,"ransomware":false,"evidence":[],"evidenceTotal":0,"provenance":"source"},"exploited":true,"otx":{"pulseCount":0,"pulses":[],"provenance":"machine"},"cwes":[{"id":"CWE-22","name":"Improper Limitation of a Pathname to a Restricted Directory"}],"references":[{"url":"https://github.com/vitest-dev/vitest/security/advisories/GHSA-8gvc-j273-4wm5","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/vitest-dev/vitest/commit/2d62051f13b4b0939b2f7e94e88006d830dc4d1f","tags":["x_refsource_MISC"]},{"url":"https://github.com/vitest-dev/vitest/blob/f17918a79969d27a415f70431e08a9445b051e45/packages/browser/src/node/plugin.ts#L88-L130","tags":["x_refsource_MISC"]},{"url":"https://vitest.dev/guide/browser/config.html#browser-api","tags":["x_refsource_MISC"]}],"techniques":[],"reports":[],"affected":[{"ecosystem":"npm","package":"@vitest/browser","vulnerableRanges":[">=2.0.4, <2.1.9",">=3.0.0, <3.0.4"],"patched":["2.1.9","3.0.4"],"from":["GHSA-8gvc-j273-4wm5"],"provenance":"source"}],"advisories":[{"id":"GHSA-8gvc-j273-4wm5","url":"https://github.com/advisories/GHSA-8gvc-j273-4wm5","severity":"MODERATE","ecosystem":"npm","package":"@vitest/browser","vulnerableRanges":[">=2.0.4, <2.1.9"],"patched":["2.1.9"],"provenance":"source","from":"GHSA"},{"id":"GHSA-8gvc-j273-4wm5","url":"https://github.com/advisories/GHSA-8gvc-j273-4wm5","severity":"MODERATE","ecosystem":"npm","package":"@vitest/browser","vulnerableRanges":[">=3.0.0, <3.0.4"],"patched":["3.0.4"],"provenance":"source","from":"GHSA"}],"euvd":{"id":"EUVD-2025-0224","url":"https://euvd.enisa.europa.eu/vulnerability/EUVD-2025-0224","exploited":false,"exploitedSince":null,"provenance":"source"},"exploits":[],"exploitSources":{"nuclei":[{"id":"CVE-2025-24963","name":"Vitest Browser Mode - Local File Read","severity":"medium","path":"http/cves/2025/CVE-2025-24963.yaml","url":"https://github.com/projectdiscovery/nuclei-templates/blob/main/http/cves/2025/CVE-2025-24963.yaml"}],"provenance":"source"},"exploitRefs":[],"flow":[],"timeline":[{"date":"2025-02-04","kind":"published","label":"Published (CVE.org)","url":"https://www.cve.org/CVERecord?id=CVE-2025-24963","provenance":"source"}],"speed":{"daysToPublicExploit":null,"firstExploitFrom":null,"daysToKev":null},"priority":{"score":66.3,"factors":[{"name":"In a KEV catalog","points":35.0,"detail":"listed in VulnCheck KEV"},{"name":"Recent KEV listing","points":5.0,"detail":"added 209 days ago"},{"name":"Known ransomware use","points":0.0,"detail":"not known"},{"name":"EPSS percentile","points":17.17,"detail":"percentile 0.8587"},{"name":"Named in threat reports","points":0.0,"detail":"0 reports"},{"name":"Public exploit code","points":5.0,"detail":"1 nuclei template"},{"name":"Mentioned in OTX pulses","points":0.0,"detail":"0 pulses"},{"name":"CVSS severity","points":4.13,"detail":"base score 5.9"},{"name":"End-of-life product","points":0.0,"detail":"supported or unknown"}]},"lineage":{"familyId":"fam-vitest-dev-vitest-cve-2025-24963","children":[{"from":"CVE-2025-24963","to":"CVE-2026-47429","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["packages/browser/src/node/plugin.ts","packages/ui/client/components/views/ViewReport.vue"],"commits":["https://github.com/vitest-dev/vitest/commit/2d62051f13b4b0939b2f7e94e88006d830dc4d1f","https://github.com/vitest-dev/vitest/commit/ed9aeba212df04b83ed01810780663ff2cdd0adf","https://github.com/vitest-dev/vitest/commit/20e00ef7808de6d330c5e2fda530f686e08f1c8d","https://github.com/vitest-dev/vitest/commit/af88b1f5d82844a4761ea9a977156c98e2b14ca8"],"basis":"shared function","functions":["default"]}]}],"packageHistory":[{"cve":"CVE-2025-24963","published":"2025-02-04","fixed":"3.0.4","kev":false},{"cve":"CVE-2026-47428","published":"2026-07-14","fixed":"5.0.0-beta.3","kev":false},{"cve":"CVE-2026-53633","published":"2026-07-14","fixed":"5.0.0-beta.4","kev":false,"link":{"from":"CVE-2025-24963","to":"CVE-2026-53633","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"npm:@vitest/browser","fromFixed":"3.0.4","toFixed":"3.2.5","daysApart":525}]}},{"cve":"CVE-2026-73653","published":"2026-08-13","fixed":"5.0.0-beta.6","kev":false}],"package":"npm:@vitest/browser"}}