- 
  Notifications
 
You must be signed in to change notification settings  - Fork 1
 
chore(deps): update devdependency vitest to v2.1.9 [security] #277
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
 
  Merged
 
 
 Conversation
 
 
 This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
 Learn more about bidirectional Unicode characters
 
 
 
 
  @rainx
 rainx
 force-pushed
 the
 
 
 renovate/npm-vitest-vulnerability
 
 branch
 from
 February 4, 2025 17:41  
 
a38a9a0 to
 8bcc423  
 Compare
 
  @renovate
 renovate
bot
 force-pushed
 the
 
 
 renovate/npm-vitest-vulnerability
 
 branch
 from
 February 11, 2025 13:58  
 
8bcc423 to
 50e8751  
 Compare
 
  @rainx
 rainx
 force-pushed
 the
 
 
 renovate/npm-vitest-vulnerability
 
 branch
 from
 February 11, 2025 13:58  
 
50e8751 to
 f69b20b  
 Compare
 
 
 
 Sign up for free
 to join this conversation on GitHub.
 Already have an account?
 Sign in to comment
 
 
 Add this suggestion to a batch that can be applied as a single commit.
 This suggestion is invalid because no changes were made to the code.
 Suggestions cannot be applied while the pull request is closed.
 Suggestions cannot be applied while viewing a subset of changes.
 Only one suggestion per line can be applied in a batch.
 Add this suggestion to a batch that can be applied as a single commit.
 Applying suggestions on deleted lines is not supported.
 You must change the existing code in this line in order to create a valid suggestion.
 Outdated suggestions cannot be applied.
 This suggestion has been applied or marked resolved.
 Suggestions cannot be applied from pending reviews.
 Suggestions cannot be applied on multi-line comments.
 Suggestions cannot be applied while the pull request is queued to merge.
 Suggestion cannot be applied right now. Please check back later.
 
 
 
 
This PR contains the following updates:
2.1.8->2.1.9GitHub Vulnerability Alerts
CVE-2025-24964
Summary
Arbitrary remote Code Execution when accessing a malicious website while Vitest API server is listening by Cross-site WebSocket hijacking (CSWSH) attacks.
Details
When
apioption is enabled (Vitest UI enables it), Vitest starts a WebSocket server. This WebSocket server did not check Origin header and did not have any authorization mechanism and was vulnerable to CSWSH attacks.https://github.com/vitest-dev/vitest/blob/9a581e1c43e5c02b11e2a8026a55ce6a8cb35114/packages/vitest/src/api/setup.ts#L32-L46
This WebSocket server has
saveTestFileAPI that can edit a test file andrerunAPI that can rerun the tests. An attacker can execute arbitrary code by injecting a code in a test file by thesaveTestFileAPI and then running that file by calling thererunAPI.https://github.com/vitest-dev/vitest/blob/9a581e1c43e5c02b11e2a8026a55ce6a8cb35114/packages/vitest/src/api/setup.ts#L66-L76
PoC
calcexecutable inPATHenv var (you'll likely have it if you are running on Windows), that application will be executed.Impact
This vulnerability can result in remote code execution for users that are using Vitest serve API.
Release Notes
vitest-dev/vitest (vitest)
v2.1.9Compare Source
🚨 Breaking Changes
coverage.ignoreEmptyLinesby default - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/5543 (31994)poolto'forks'- by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/5047 (7f8f9)--merge-reportsto support coverage - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/5736 (b7438)🚀 Features
--output-json- by @Joristdh in https://github.com/vitest-dev/vitest/issues/5745 (0766b)parseAst,parseAstAsyncfrom vite - by @sheremet-va (f645e)clickevent - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5777 (839c3)page.screenshotmethod - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5853 (81c42)userEventmethods, addfillanddragAndDropevents - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5882 (4dbea)expect.dommethod and bundlejest-dommatchers with@vitest/browser- by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5910 (3a96a)tripleClickto interactive api - by @userquin in https://github.com/vitest-dev/vitest/issues/5987 (200a4)userEvent.uploadin playwright provider - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/6442 (cf148)--inspect- by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/6433 (0499a)--inspect-brk- by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/6434 (7ab0f)transformIndexHtml- by @sheremet-va in https://github.com/vitest-dev/vitest/issues/6725 (16902)thresholds.<glob>.100option - by @thor-juhasz and @AriPerkkio in https://github.com/vitest-dev/vitest/issues/6174 (f6845)--exclude-after-remap- by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/6309 (5932a){ spy: true }instead of a factory - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/6289 (95f02)test.for- by @hi-ogawa and @sheremet-va in https://github.com/vitest-dev/vitest/issues/5861 (c2380)vi.advanceTimersToNextFrame- by @bnjm and @sheremet-va in https://github.com/vitest-dev/vitest/issues/6347 (8ff63)🐞 Bug Fixes
--excludeoption - by @fregante in https://github.com/vitest-dev/vitest/issues/5782 (d6700)--inspect-brkstop on Windows - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/6110 (f8519)require- by @sheremet-va in https://github.com/vitest-dev/vitest/issues/6159 (807a2)testNamePatternadds leading space - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/6186 (073a5)indexfile - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/6266 (081cf)expect.getState().testPathalways returns correct path - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/6472 (ac698)Vitest.setServerto postconfigureServerhook to enable import analysis for workspace config loading - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/6584 (e7f35)toBeNaN, toBeUndefined, toBeNull, toBeTruthy, toBeFalsy- by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/6697 (e0027)dangerouslyIgnoreUnhandledErrorswithout base reporter - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/6808 (0bf0a)unhandledRejectioneven when base reporter is not used - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/6812 (8878b)sequence.concurrentfrom theRuntimeConfigtype - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/6880 (6af73).poll,.element,.rejects/.resolves, andlocator.*weren't awaited - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/6877 (93b67)project.providetype - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5959 (0eda9)BenchmarkResult.samplesarray to reduce memory usage - by @hi-ogawa and @AriPerkkio in https://github.com/vitest-dev/vitest/issues/6541 (a6407)previewprovider when running in StackBlitz - by @userquin in https://github.com/vitest-dev/vitest/issues/5836 (76e13)coverage.reporterfrom string values - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/5920 (f33da)crypto.randomUUIDfrom the client - by @userquin in https://github.com/vitest-dev/vitest/issues/6079 (04c83)afterEachcleanup hooks in node entrypoint - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/6192 (e6fbc)processglobal - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/6213 (1affb)processglobal " - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/6213 (9069b)Configuration
📅 Schedule: Branch creation - "" (UTC), Automerge - At any time (no schedule defined).
🚦 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.