Update dependency vitest to v3.2.6 [SECURITY]#779
Conversation
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a208dcc451
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| "size-limit": "^11.2.0", | ||
| "viem": "^2.33.2", | ||
| "vitest": "^3.1.3" | ||
| "vitest": "^4.0.0" |
There was a problem hiding this comment.
Update Vitest coverage provider with Vitest
In the vitest workspaces, CI runs run test --coverage in .github/workflows/ci.yml lines 236-241, so this bump also needs the V8 coverage provider to be on Vitest 4. Yarn already reports the new vitest@4.1.8 peer request as unmet because these packages still install @vitest/coverage-v8@3.1.3 from yarn.lock; when the coverage job appends --coverage, Vitest loads that incompatible 3.x provider. Please bump @vitest/coverage-v8 to the matching 4.x range in core/actions/viem-account-ledger along with this Vitest major upgrade.
Useful? React with 👍 / 👎.
size-limit report 📦
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #779 +/- ##
=======================================
Coverage 69.61% 69.61%
=======================================
Files 150 150
Lines 7075 7075
Branches 1163 1153 -10
=======================================
Hits 4925 4925
+ Misses 2080 2066 -14
- Partials 70 84 +14
🚀 New features to boost your workflow:
|
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
a208dcc to
b507fbd
Compare
This PR contains the following updates:
3.1.3→3.2.6When Vitest UI server is listening, arbitrary file can be read and executed
CVE-2026-47429 / GHSA-5xrq-8626-4rwp
More information
Details
Summary
Arbitrary file can be read on Windows when Vitest UI server is listening, especially when exposed to the network.
Impact
Only users that match either of the following conditions are affected:
--api.hostorapi.hostconfig option)Details
The API handler for
/__vitest_attachment__uses the deprecatedisFileServingAllowedincorrectly.https://github.com/vitest-dev/vitest/blob/eb1abf08573032a532015b999ad3501c5e89e3bb/packages/ui/node/index.ts#L77
The function expects the passed value to use
cleanUrlafter the check before file system related operation.Because of this, it is possible to bypass the check by
\\?\\..\\. This is not possible on Linux as Linux errors if a directory named?does not exist.A similar problem exists in other places as well.
That said, this
isFileServingAllowedcheck does not actually prevent the API to be abused. Since the API has rerun feature and file write feature, it's possible to run arbitrary script by writing a script as a test file usingsaveTestFileand running it usingrerun. This means exposing the API / Vitest UI is equivalent to giving script execution access.On the browser mode side, there're
readFile/writeFile/saveSnapshotFile. So exposing the browser mode is equivalent to giving file read / write access.PoC
curl http://localhost:51204/__vitest__/curl "http://localhost:51204/__vitest_attachment__?path=C:\\path\\to\\project\\?\\..\\..\\secret.txt&contentType=text/plain&token=$TOKEN"(TOKEN is the API token)secret.txtthat is outside the project directoryMitigations
Vitest now ships two configuration flags,
allowWriteandallowExec, that gate the privileged operations exploited by this vulnerability. Both are disabled by default whenever the API server is bound to a non-localhosthost, ensuring that exposing the server to the network no longer implicitly grants write or execute capabilities to remote clients.When these flags are disabled, the UI also enters a read-only mode: in-browser code editing and test file execution are turned off, removing the attack surface that allowed remote code execution. Many Browser Mode features are also disabled, like attachments, artifacts or snapshots. See
browser.api.Users who require the full interactive UI on a networked host must explicitly opt in by setting
allowWriteand/orallowExectotrue.Severity
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:HReferences
This data is provided by OSV and the GitHub Advisory Database (CC-BY 4.0).
Release Notes
vitest-dev/vitest (vitest)
v3.2.6Compare Source
v3.2.5Compare Source
v3.2.4Compare Source
🐞 Bug Fixes
vitest run --watchshould be watch-mode - by @AriPerkkio in #8128 (657e8)--shard x/<count>exceeds count of test files - by @AriPerkkio in #8112 (8a18c)minWorkerswhen onlymaxWorkersspecified - by @AriPerkkio in #8110 (14dc0)task.metashould be available in custom reporter's errors - by @AriPerkkio in #8115 (27df6)View changes on GitHub
v3.2.3Compare Source
🚀 Features
🐞 Bug Fixes
expect.anyreturn type - by @sheremet-va in #8129 (47514)process.send()- by @AriPerkkio in #8125 (dfe81)View changes on GitHub
v3.2.2Compare Source
🚀 Features
🐞 Bug Fixes
createTesterscall on the main thread - by @sheremet-va in #8101 (142c7)vitest-browser-*packages - by @sheremet-va in #8103 (247ef)toEqual- by @dubzzz in #8094 (02ec8)dotreporter to work in non interactive terminals - by @bstephen1 and @AriPerkkio in #7994 (6db9f)View changes on GitHub
v3.2.1Compare Source
🐞 Bug Fixes
DeeplyAllowMatchers- by @sheremet-va in #8078 (30ab4)View changes on GitHub
v3.2.0Compare Source
🚀 Features
ctx.signal- by @sheremet-va in #7878 (e761f)test.name- by @AriPerkkio in #7809 (4af5d)vi.mockObjectto automock any object - by @hi-ogawa and @sheremet-va in #7761 (465bd)watchTriggerPatternsoption - by @sheremet-va in #7778 (a0675)workspacein favor ofprojects- by @sheremet-va and @AriPerkkio in #7923 (41beb)sequence.groupOrderoption - by @sheremet-va in #7852 (d1a1d)connectoption forplaywrightbrowser provider - by @egfx-notifications and @sheremet-va in #7915 (029c0)screenshot.saveoption - by @sheremet-va in #7777 (d9f51)onWritePathoption togithub-actions- by @nwalters512 and @AriPerkkio in #8015 (abd3b)🐞 Bug Fixes
micromatchwithpicomatch- by @sapphi-red in #7951 (df076)anytypes toAsymmetricMatcher<unknown>, withDeeplyAllowMatchers<T>- by @JoshuaKGoldberg in #7016 (8ec44)stackproperties - by @sheremet-va in #7995 (330f9)toJSONserialisation - by @sheremet-va in #8053 (3bdf0)uploadfiles relative to the project root - by @sheremet-va in #8042 (b9a31)thistype tolocators.extend- by @sheremet-va in #8069 (70fb0)--silentvalues properly - by @AriPerkkio in #8055 (8fad7)@types/chai- by @hi-ogawa in #7937 (525f5)vitest listcommand - by @sheremet-va in #7933 (ba6da)__vite_ssr_exportName__- by @hi-ogawa in #7925 (76091)getWorkerMemoryLimitpriority for vmForks - by @pengooseDev in #7960 (5a91e)View changes on GitHub
v3.1.4Compare Source
🐞 Bug Fixes
View changes on GitHub
Configuration
📅 Schedule: (UTC)
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about these updates again.
This PR was generated by Mend Renovate. View the repository job log.