Bug 2527102 (CVE-2026-84373)

Summary: CVE-2026-84373 vitest: Vitest: Arbitrary File Read via Path Traversal in HMR WebSocket
Product: [Other] Security Response Reporter: OSIDB Bzimport <bzimport>
Component: vulnerabilityAssignee: Product Security DevOps Team <prodsec-dev>
Status: NEW --- QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: anujha, aruklets, aschwart, asoldano, aszczucz, ataylor, bbaranow, bmaxwell, boliveir, bstansbe, cdrage, dbruscin, dlofthou, doconnor, drichtar, dschmidt, eborisov, ehugonne, istudens, ivassile, iweiss, jlanda, kshier, kvanderr, lball, mosmerov, mposolda, msvehla, ngough, nwallace, pberan, pesilva, pjindal, pmackay, rhel-process-autobot, rmartinc, rstancel, rushinde, simaishi, ssilvert, stcannon, sthorger, teagle, thjenkin, vdosoudi, veshanka, vmuzikar, watson-tool-maintainers, yguenane
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: ---
Doc Text:
A flaw was found in Vitest, a testing framework. A remote attacker, able to reach an exposed development server, could exploit an issue in the mockerPlugin and interceptorPlugin exports. These plugins register a handler on Vite's unauthenticated HMR WebSocket without properly validating redirect targets. By submitting a specially crafted URL with path traversal segments, an attacker could read arbitrary local files accessible by the development server process, leading to information disclosure.
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 2528152, 2528153    
Bug Blocks:    

Description OSIDB Bzimport 2026-09-01 21:32:02 UTC
Vitest is a testing framework powered by Vite. From 2.1.0 until 4.1.11 and 5.0.0-rc.2, the public mockerPlugin and standalone interceptorPlugin exports in packages/mocker/src/node/interceptorPlugin.ts register the vitest:interceptor:register handler on Vite's unauthenticated HMR WebSocket without validating redirect targets against the file-serving allowlist. The implementation processes event.redirect without enforcing server.fs.allow and server.fs.deny through isFileLoadingAllowed. A remote client that can reach an exposed development server can submit an opaque URL scheme preserving .. segments, causing join(server.config.root, redirectUrl.pathname) to resolve outside the project root. The plugin's load hook then returns readFile(mock.redirect, 'utf-8') as module source, disclosing local files readable by the dev-server process. Vitest browser mode uses a token-authenticated RPC and is not remotely unauthenticated by default, although the same boundary check was missing on that path. This issue is fixed in versions 4.1.11 and 5.0.0-rc.2.