GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||
GeezerVison is showing github.com — Update dependency vitest to v5 [SECURITY] by renovate[bot] · Pull Request #140 · developing-today/code Conversation
|
| Package | Change | Age | Confidence |
|---|---|---|---|
| vitest (source) | ^3.2.7 → ^5.0.0 |
CVE-2026-84373 / GHSA-82fw-gwwq-j7x9
@vitest/mocker registers a redirect mock's target path without validating it
against the dev server's file-serving allowlist. An attacker who can reach the
dev server's WebSocket can register a redirect mock pointing outside the project
root; when the mocked module is requested, the plugin's load hook returns
readFile(<attacker path>) as the module source, disclosing local files.
This is exploitable without authentication only through the public
mockerPlugin / standalone interceptorPlugin exports (used by third-party dev
servers), which register the handler on Vite's unauthenticated HMR socket.
Vitest's own browser mode registers mocks over a token-authenticated RPC and
is not remotely reachable by default (see Scope).
packages/mocker/src/node/interceptorPlugin.ts.
The load hook is the file-read sink:
if (mock.type === 'redirect') { return readFile(mock.redirect, 'utf-8') }
mock.redirect is derived from client input at registration time with no
boundary check:
if (event.type === 'redirect') { const redirectUrl = new URL(event.redirect) event.redirect = join(server.config.root, redirectUrl.pathname) } registry.register(event)
There is no server.fs.allow / server.fs.deny check and no assertion that the
resolved path stays within the project root.
mockerPlugin / interceptorPlugin (unauthenticated). InconfigureServer, the plugin registers server.ws.on('vitest:interceptor:register', …)registerMock), which sits behind a per-run token (isValidApiRequest, aapi.token). The interceptor's configureServer socket is not used fornew URL(redirect).pathname combined with join(root, pathname) does not
confine reads to the root:
file:, http:) are normalized by WHATWG URL,.. segments are collapsed and the result stays under the root. Payloads offile:///../../etc/passwd do not escape... in pathname, sojoin(root, "../../…/etc/passwd") resolves outside the root and reads anEven without escaping the root, the missing server.fs check allows reading any
in-root file the dev server would otherwise refuse to serve (for example an
in-root .env or source that is denied by server.fs.deny).
localhost byserver.host / 0.0.0.0, a LAN bind, or a proxy).localhostserver.allowedHosts blocks DNS-rebinding, so a cross-origin pageDisclosure of local files readable by the dev-server process (source, in-root
.env/secrets, and, via the opaque-scheme payload, files outside the project
root). No integrity or availability impact.
Present since @vitest/mocker was introduced.
@vitest/mocker >= 2.1.0 (shipped in vitest and@vitest/browser >= 2.1.0), through 4.1.x and the 5.0.0 pre-releases.Validate the resolved redirect target against Vite's file-serving allowlist
(isFileLoadingAllowed) before registering it, at every registration site, and
stop registering the interceptor WebSocket events in Vitest's browser mode
(mocks there flow through the authenticated RPC).
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:NThis data is provided by the GitHub Advisory Database (CC-BY 4.0).
v5.0.5fs.deny with api token file - by @hi-ogawa, Hiroshi Ogawa and Claude Opus 5.5 in #11578 (28dc1)--changed - by @sheremet-va in #11583 (14921)data to the import.meta.hot stub - by @sheremet-va in #11590 (3a828)skip in skipIf, ignore undefined options - by @sheremet-va in #11591 (d523a)&#​39;failed&#​39; on worker crash - by @AriPerkkio in #11568 (6ae8e)v5.0.4test.ui.theme option - by @sheremet-va in #11499 (1da66)--changed - by @sheremet-va in #11424 (a2336): in project and change the shape of results cache - by @sheremet-va in #11453 (9673c)$ string values when taskTitleValueFormatTruncate is 0 - by @hi-ogawa, Hiroshi Ogawa and Claude Opus 5.5 in #11485 (4f7e1)maxWorkers setting. Previously, it was applied incorrectly and could lead to Vitest using too many resources. For example, a lower number would still open too many browsers. Fixing it means Vitest opens less instances by default now.allowExternal fails to include uncovered files - by @AriPerkkio in #11513 (4ef00)Map and Set deep equality in some assertions - by @hi-ogawa, Hiroshi Ogawa and Claude Opus 5.5 in #11402 (b4e79)this to module.exports - by @sheremet-va in #11504 (b618a)v5.0.3result.status between repeats runs - by @hi-ogawa, Hiroshi Ogawa and Codex (GPT-6) in #11218 (5dbeb)test.fails expectedly failed - by @hi-ogawa, Hiroshi Ogawa and Codex (GPT-6) in #11219 (b2458)listen until tests start running - by @sheremet-va in #11366 (7d8ed)toMatchScreenshot uses wrong reference on retried tests - by @macarie in #11393 (c22ab)why-is-node-running to 3.2.1 to avoid users running into ERR_PNPM_TRUST_DOWNGRADE - by @AriPerkkio in #11403 (f6c9a)expect.extend asymmetric matchers - by @hi-ogawa, Hiroshi Ogawa and Claude in #11401 (3e794)v5.0.2process in case global is overwritten - by @AriPerkkio in #11343 (0b792)process.stdio handles - by @AriPerkkio in #11333 (0fd6b)toMatchObject with asymmetric matchers - by @ShreeBohara, Claude Opus 5, @hi-ogawa, Hiroshi Ogawa and Codex (GPT-5) in #11100 (42523)Request with Blob body on jsdom 28+ - by @harshit-d3v in #11295 (d1c3e)agent to respect --silent - by @Raj4478 and @AriPerkkio in #11271 (5b95e)v5.0.1extends - by @sheremet-va in #11034 (23dda)deps.optimizer.web is used - by @im10furry in #11214 (2ce29)config.define - by @sheremet-va in #11198 (972e2)toMatchAriaSnapshot - by @sheremet-va in #11208 (c119b)queueMicrotask and nextTick in toNotFake - by @kingmakeruix, kingmakeruix, Hiroshi Ogawa, Codex and @hi-ogawa in #11261 (a47d7)deepMerge to handle prototype - by @hi-ogawa, Hiroshi Ogawa and Codex in #11215 (4944c)v5.0.0Vitest 5 is officially out! This release focuses on performance and brings a lot of new features while fixing long-standing bugs. See our blog post for the official announcement.
loupe.inspect with pretty-format - by @hi-ogawa, Claude Opus 5 (1M context) and OpenAI Codex in #9609 (3f802)test.for/each title $ variable (take 2) - by @hi-ogawa in #10170 (04d37)attachmentsDir from .vitest-attachements/ to .vitest/attachments/ - by @MdSadiqMd in #10186 (1ba73)sequential test/suite options in favor of concurrent - by @hi-ogawa and OpenAI Codex in #10198 (9229f)expect package - by @sheremet-va in #10221 (ad162)expect.poll when function didn't resolve in time - by @hi-ogawa and OpenAI Codex in #10233 (4df04)toHaveTextContent is strict, add toMatchTextContent as alternative - by @sheremet-va in #10473 (18f30)@vitest/runner package, do not publish it anymore - by @sheremet-va in #10511 (6d6e4)concurrencyId/workerId on TestModule's diagnostics, make id 1-based - by @sheremet-va in #10516 (bdd98)screenshotDirectory config to browser.expect.toMatchScreenshot - by @macarie in #10592 (a60de)@sinonjs/fake-timers and support mocking Temporal - by @hi-ogawa, Hiroshi Ogawa and OpenCode (gpt-5.6-sol) in #10654 (f8b15)> as separator in -t, calculate only once - by @sheremet-va in #10686 (a0b20)locators.exact by default - by @sheremet-va in #10430 (e2032)sessionId for orchestrator html request - by @hi-ogawa, Hiroshi Ogawa and OpenAI Codex in #10522 (79b7d)attachmentsDir - by @macarie in #10917 (3b5bb)include/exclude globs too eager - by @AriPerkkio in #9818 (edacb)thresholds.perFile to accept an object - by @vladlenskiy and @AriPerkkio in #10190 (13b78)toThrow("") behavior by reverting #6710 - by @hi-ogawa in #9643 and #6710 (6c3e4)blob reporter and --merge-reports default to .vitest/blob/ - by @AriPerkkio in #10232 (d22b0).vitest by default - by @hi-ogawa, Hiroshi Ogawa, OpenCode (gpt-5.6-sol) and @AriPerkkio in #10621 (58577).vitest - by @hi-ogawa and Hiroshi Ogawa in #10620 (29c36)createReport and .vitest report directory convention - by @AriPerkkio in #9993 (72a6d)configDefaults.reporters - by @hi-ogawa and Claude Opus 5 (1M context) in #10219 [(083f6)](https://redirect.github.com/vitest-dev/vit[!IMPORTANT]
✂ PR body was truncated to here.
📅 Schedule: (UTC)
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
605b1ae to
b0f34a1
Compare
b0f34a1 to
3ffc5fe
Compare
3ffc5fe to
a9cca7e
Compare
a9cca7e to
3950899
Compare
3950899 to
6cd9f28
Compare
6cd9f28 to
a5e62b5
Compare
a5e62b5 to
bf751d2
Compare
bf751d2 to
026b055
Compare
026b055 to
947c552
Compare
947c552 to
622eae6
Compare
622eae6 to
4ece4f1
Compare
4ece4f1 to
3dae6e8
Compare
3dae6e8 to
a20373d
Compare
There was an error while loading. Please reload this page.
|
Important Review skippedBot user detected. To trigger a single review, invoke the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 Walkthrough
Merge Risk: 🔵 Low · up to
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
a20373d to
c1556ad
Compare
6127bcd to
5ffb141
Compare
5ffb141 to
0fc1acb
Compare
…lnerability' into tmp-136
happy-dom 21 defines OffscreenCanvas but getContext('2d') returns null, so the canvas-presence guard in wrap.test.ts now checks the context. The same 9 measureContent tests stay skipped under happy-dom and still run in real browsers.
Edited/Blocked NotificationRenovate will not automatically rebase this PR, because it does not recognize the last commit author and assumes somebody else may have edited the PR. You can manually request rebase by checking the rebase/retry box above. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.