Skip to content

chore(deps): bump vitest to 4.1.11 to fix GHSA-82fw-gwwq-j7x9 - #33

Merged
NewscatcherAPI merged 1 commit into
mainfrom
fix-dependabot-2026-09-10
Sep 10, 2026
Merged

NewscatcherAPI merged 1 commit into
mainfrom
fix-dependabot-2026-09-10

Conversation

@Kizy625

@Kizy625 Kizy625 commented Sep 10, 2026

Copy link
Copy Markdown
Collaborator

Dependabot alert #30: @vitest/mocker >= 2.1.0, < 4.1.11 registers a redirect mock's target path without validating it against the dev server's file-serving allowlist. A client reaching Vite's unauthenticated HMR WebSocket can register a redirect with an opaque-scheme path (e.g. poc:../SECRET.txt, whose .. survives URL normalization) so the load hook's readFile() discloses files outside the project root.

vitest is a direct devDependency and @vitest/mocker is version-locked to it, so this is a plain bump (4.1.8 -> 4.1.11), not a pnpm.overrides pin.

Verified with a PoC driving the exact interceptorPlugin register/load handlers with authentic Vite-default config (fs.strict, allow=[root]): 4.1.8 returns the out-of-root secret as module source; 4.1.11's new isFileLoadingAllowed guard refuses to register the traversal and load returns undefined. All 479 tests pass; both cjs/esm builds succeed; biome baseline unchanged (269 errors/73 warnings, all pre-existing).

Dependabot alert #30: @vitest/mocker >= 2.1.0, < 4.1.11 registers a
redirect mock's target path without validating it against the dev
server's file-serving allowlist. A client reaching Vite's unauthenticated
HMR WebSocket can register a redirect with an opaque-scheme path (e.g.
`poc:../SECRET.txt`, whose `..` survives URL normalization) so the load
hook's readFile() discloses files outside the project root.

vitest is a direct devDependency and @vitest/mocker is version-locked to
it, so this is a plain bump (4.1.8 -> 4.1.11), not a pnpm.overrides pin.

Verified with a PoC driving the exact interceptorPlugin register/load
handlers with authentic Vite-default config (fs.strict, allow=[root]):
4.1.8 returns the out-of-root secret as module source; 4.1.11's new
isFileLoadingAllowed guard refuses to register the traversal and load
returns undefined. All 479 tests pass; both cjs/esm builds succeed;
biome baseline unchanged (269 errors/73 warnings, all pre-existing).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@NewscatcherAPI
NewscatcherAPI merged commit fdfec31 into main Sep 10, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants