Vitest-dev vitest
Browser mode serves arbitrary files in vitest
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.
Affected versions and mitigation
From the CVE record and the vendor's references.Affected
- >= 2.0.4, < 2.1.9
- >= 3.0.0, < 3.0.4
Fixed in 2.1.9, 3.0.4
Mitigation
Upgrade vitest to 2.1.9 or 3.0.4 or later.
References
Timeline
Days relative to CVE publicationFirst public PoC 18 h after publication; not in CISA KEV. First PoC: nuclei template: Vitest Browser Mode - Local File Read (nuclei template, 5 Feb 2025).
PoC repositories
Found on GitHub.1 PoCs · 1 pending
PoCs 1
| Repository | Created | Stars | Assessment |
|---|---|---|---|
| hiteshpatra/CVE-2025-24963 | 23 Apr 2025 +78 d | 0 | PoC |
Pending 1
| Repository | Created | Stars | Assessment |
|---|---|---|---|
| 0xdeviner/CVE-2025-24963 | 23 Apr 2025 +78 d | 0 | Pending · listed by PoC Index; via PoC Index |
Only PoCs count toward the first-PoC date and the characteristics below. Do not run PoC code from unknown sources.
Other public exploits
Exploit-DB, Metasploit and nuclei count as public PoCs. Exploit-tagged references from the CVE record and NVD are links only. None of these are analysed by us.| Source | Title | Published | Found by us |
|---|---|---|---|
| nuclei template | nuclei template: Vitest Browser Mode - Local File Read | 5 Feb 2025 | 16 Nov 2026 |
PoC characteristics
What to hunt for in your logs · from 2 PoC reposGET /__screenshot-error
- Query
file=../../../../../../etc/passwd- Ports
- 63315
- Seen in
- 1 repo: hiteshpatra/CVE-2025-24963
- Evidence
- hiteshpatra/CVE-2025-24963/README.md:31
Regex
Generated from PoC characteristics; not yet reviewed. Matches the request path and query.
(?i)^/__screenshot-error\?(?:.*&)?file=\.\./\.\./\.\./\.\./\.\./\.\./etc/passwd
Suricata
Template generated from PoC characteristics. Review before deploying.
alert http any any -> $HOME_NET [63315] (msg:"GG PoC-Monitor CVE-2025-24963 vitest-dev vitest exploit attempt"; flow:established,to_server; http.method; content:"GET"; http.uri; content:"/__screenshot-error"; http.uri; content:"file=../../../../../../etc/passwd"; reference:url,poc.griffinguard.io/cve/CVE-2025-24963; classtype:web-application-attack; sid:9521854; rev:1;)
Sigma
Template generated from PoC characteristics. Review before deploying.
title: vitest-dev vitest exploit attempt (CVE-2025-24963)
id: gg-pocmon-cve-2025-24963-9521854
status: experimental
description: Request pattern taken from public PoCs for CVE-2025-24963. Generated, not reviewed.
references:
- https://poc.griffinguard.io/cve/CVE-2025-24963
logsource:
category: webserver
detection:
selection:
cs-method: GET
cs-uri-stem|contains|all:
- '/__screenshot-error'
cs-uri-query|contains|all:
- 'file=../../../../../../etc/passwd'
condition: selection
falsepositives:
- Authorized vulnerability scanning
level: high
tags:
- attack.initial_access
- attack.t1190
- cve.2025.24963