chore(deps): update dependency vitest to v1.6.1 [security]#6
chore(deps): update dependency vitest to v1.6.1 [security]#6renovate[bot] wants to merge 1 commit into
Conversation
Reviewer's Guide by SourceryThis PR updates the vitest dependency from version 1.6.0 to 1.6.1 to address a security vulnerability (CVE-2025-24964) that allows for arbitrary remote code execution. The vulnerability is due to a lack of origin checking and authorization on the Vitest API WebSocket server when the Sequence diagram showing the security vulnerability in Vitest API WebSocketsequenceDiagram
participant A as Attacker
participant W as Malicious Website
participant V as Vitest API WebSocket Server
participant T as Test Files
Note over V: No Origin Check
Note over V: No Authorization
A->>W: Access malicious website
W->>V: Connect to WebSocket
W->>V: Request test files list
V-->>W: Return test files
W->>V: saveTestFile API (inject malicious code)
V->>T: Write malicious code
W->>V: rerun API (execute tests)
V->>T: Execute modified test
Note over T: Arbitrary code execution
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
c8deab5 to
f952fae
Compare
|
f952fae to
49bf471
Compare
16b76e6 to
5369c90
Compare
5369c90 to
5d9bb02
Compare
5d9bb02 to
2a275eb
Compare
2a275eb to
bb9c5d4
Compare
9f34d27 to
179b0e2
Compare
179b0e2 to
f39417a
Compare
f39417a to
222f4a3
Compare
222f4a3 to
a87fec8
Compare
e7ee670 to
84c634d
Compare
84c634d to
3ece2bc
Compare
3ece2bc to
9c39332
Compare
9c39332 to
28ac731
Compare
28ac731 to
334aa83
Compare
7f705b1 to
622d786
Compare
622d786 to
3e5f5ba
Compare
3e5f5ba to
6da4d89
Compare
f00ef6b to
d27d76e
Compare
d27d76e to
b85b0f1
Compare
b85b0f1 to
583d9ff
Compare
583d9ff to
0d9284c
Compare
0d9284c to
968d781
Compare
968d781 to
20522ba
Compare
20522ba to
f5faa2f
Compare
This PR contains the following updates:
1.6.0→1.6.1Vitest allows Remote Code Execution when accessing a malicious website while Vitest API server is listening
CVE-2025-24964 / GHSA-9crc-q9x8-hgqq
More information
Details
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.
Severity
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:HReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
Release Notes
vitest-dev/vitest (vitest)
v1.6.1Compare Source
This release includes security patches for:
🐞 Bug Fixes
View changes on GitHub
Configuration
📅 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.