Skip to content

chore(deps): update devdependency vitest to v3 [security]#49

Open
renovate[bot] wants to merge 1 commit into
mainfrom
renovate/npm-vitest-vulnerability
Open

chore(deps): update devdependency vitest to v3 [security]#49
renovate[bot] wants to merge 1 commit into
mainfrom
renovate/npm-vitest-vulnerability

Conversation

@renovate

@renovate renovate Bot commented Jun 1, 2026

Copy link
Copy Markdown
Contributor

ℹ️ Note

This PR body was truncated due to platform limits.

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
vitest (source) ^0.23.2^3.0.0 age adoption passing confidence

When 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:

  • explicitly exposes the Vitest UI server to the network (using --api.host or api.host config option)
  • running the Vitest UI or Browser Mode on Windows
Details

The API handler for /__vitest_attachment__ uses the deprecated isFileServingAllowed incorrectly.
https://github.com/vitest-dev/vitest/blob/eb1abf08573032a532015b999ad3501c5e89e3bb/packages/ui/node/index.ts#L77
The function expects the passed value to use cleanUrl after 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 isFileServingAllowed check 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 using saveTestFile and running it using rerun. 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
  1. Run Vitest UI
  2. Get the API token by curl http://localhost:51204/__vitest__/
  3. Run curl "http://localhost:51204/__vitest_attachment__?path=C:\\path\\to\\project\\?\\..\\..\\secret.txt&contentType=text/plain&token=$TOKEN" (TOKEN is the API token)
  4. curl shows the content of secret.txt that is outside the project directory
Mitigations

Vitest now ships two configuration flags, allowWrite and allowExec, that gate the privileged operations exploited by this vulnerability. Both are disabled by default whenever the API server is bound to a non-localhost host, 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 allowWrite and/or allowExec to true.

Severity

  • CVSS Score: 9.8 / 10 (Critical)
  • Vector String: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

References

This data is provided by the GitHub Advisory Database (CC-BY 4.0).


Release Notes

vitest-dev/vitest (vitest)

v3.2.6

Compare Source

v3.2.5

Compare Source

v3.2.4

Compare Source

   🐞 Bug Fixes
    View changes on GitHub

v3.2.3

Compare Source

   🚀 Features
   🐞 Bug Fixes
    View changes on GitHub

v3.2.2

Compare Source

   🚀 Features
   🐞 Bug Fixes
    View changes on GitHub

v3.2.1

Compare Source

   🐞 Bug Fixes
    View changes on GitHub

v3.2.0

Compare Source

   🚀 Features
   🐞 Bug Fixes
    View changes on GitHub

v3.1.4

Compare Source

   🐞 Bug Fixes
    View changes on GitHub

v3.1.3

Compare Source

   🐞 Bug Fixes
    View changes on GitHub

v3.1.2

Compare Source

   🐞 Bug Fixes
   🏎 Performance
    View changes on GitHub

v3.1.1

Compare Source

   🐞 Bug Fixes
    View changes on GitHub

v3.1.0

Compare Source

🚀 Features
🐞 Bug Fixes
🏎 Performance
View changes on GitHub

v3.0.9

Compare Source

   🐞 Bug Fixes
    View changes on GitHub

v3.0.8

Compare Source

   🐞 Bug Fixes
    [View changes on GitHub](http

Note

PR body was truncated to here.


Configuration

📅 Schedule: (UTC)

  • Branch creation
    • At any time (no schedule defined)
  • 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.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate

renovate Bot commented Jun 1, 2026

Copy link
Copy Markdown
Contributor Author

⚠️ Artifact update problem

Renovate failed to update an artifact related to this branch. You probably do not want to merge this PR as-is.

♻ Renovate will retry this branch, including artifacts, only when one of the following happens:

  • any of the package files in this branch needs updating, or
  • the branch becomes conflicted, or
  • you click the rebase/retry checkbox if found above, or
  • you rename this PR's title to start with "rebase!" to trigger it manually

The artifact failure details are included below:

File name: pnpm-lock.yaml
Progress: resolved 1, reused 0, downloaded 0, added 0
Progress: resolved 13, reused 0, downloaded 10, added 0
Progress: resolved 17, reused 0, downloaded 17, added 0
Progress: resolved 18, reused 0, downloaded 17, added 0
Progress: resolved 43, reused 0, downloaded 27, added 0
Progress: resolved 71, reused 0, downloaded 52, added 0
Progress: resolved 88, reused 0, downloaded 65, added 0
Progress: resolved 111, reused 0, downloaded 91, added 0
Progress: resolved 139, reused 0, downloaded 112, added 0
Progress: resolved 160, reused 0, downloaded 137, added 0
Progress: resolved 179, reused 0, downloaded 164, added 0
Progress: resolved 195, reused 0, downloaded 181, added 0
Progress: resolved 220, reused 0, downloaded 205, added 0
Progress: resolved 260, reused 0, downloaded 239, added 0
Progress: resolved 295, reused 0, downloaded 284, added 0
Progress: resolved 333, reused 0, downloaded 297, added 0
 WARN  deprecated uuid@3.4.0: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
Progress: resolved 388, reused 0, downloaded 348, added 0
Progress: resolved 430, reused 0, downloaded 389, added 0
Progress: resolved 463, reused 0, downloaded 426, added 0
Progress: resolved 523, reused 0, downloaded 481, added 0
Progress: resolved 545, reused 0, downloaded 501, added 0
Progress: resolved 581, reused 0, downloaded 550, added 0
 WARN  deprecated loupe@2.3.4: Please upgrade to 2.3.7 which fixes GHSA-4q6p-r6v2-jvc5
Progress: resolved 646, reused 0, downloaded 555, added 0
Progress: resolved 717, reused 0, downloaded 603, added 0
Progress: resolved 751, reused 0, downloaded 642, added 0
Progress: resolved 795, reused 0, downloaded 650, added 0
Progress: resolved 815, reused 0, downloaded 669, added 0
Progress: resolved 846, reused 0, downloaded 703, added 0
Progress: resolved 888, reused 0, downloaded 748, added 0
Progress: resolved 920, reused 0, downloaded 780, added 0
Progress: resolved 956, reused 0, downloaded 815, added 0
Progress: resolved 1011, reused 0, downloaded 869, added 0
Progress: resolved 1049, reused 0, downloaded 910, added 0
Progress: resolved 1101, reused 0, downloaded 959, added 0
Progress: resolved 1104, reused 0, downloaded 978, added 0
Progress: resolved 1127, reused 0, downloaded 1002, added 0

 ERR_PNPM_PEER_DEP_ISSUES  Unmet peer dependencies

.
├─┬ @ow3/stacks 0.30.4
│ ├─┬ @intlify/vite-plugin-vue-i18n 6.0.1
│ │ └─┬ @intlify/bundle-utils 12.0.0-alpha.3
│ │   └─┬ oxc-transform 0.96.0
│ │     └─┬ @oxc-transform/binding-wasm32-wasi 0.96.0
│ │       └─┬ @napi-rs/wasm-runtime 1.1.4
│ │         ├── ✕ missing peer @emnapi/core@^1.7.1
│ │         └── ✕ missing peer @emnapi/runtime@^1.7.1
│ ├─┬ vitepress 1.0.0-alpha.13
│ │ └─┬ @docsearch/js 3.2.1
│ │   └─┬ @docsearch/react 3.2.1
│ │     └─┬ @algolia/autocomplete-preset-algolia 1.7.1
│ │       └── ✕ missing peer @algolia/client-search@^4.9.1
│ └─┬ commitizen 4.2.5
│   └─┬ cz-conventional-changelog 3.3.0
│     └─┬ @commitlint/load 18.6.1
│       └─┬ cosmiconfig 8.3.6
│         └── ✕ unmet peer typescript@>=4.9.5: found 4.8.3
└─┬ vitest 3.2.6
  └─┬ vite 7.3.5
    └── ✕ unmet peer @types/node@"^20.19.0 || >=22.12.0": found 18.7.17
Peer dependencies that should be installed:
  @algolia/client-search@^4.9.1
  @emnapi/core@^1.7.1
  @emnapi/runtime@^1.7.1

hint: If you want peer dependencies to be automatically installed, add "auto-install-peers=true" to an .npmrc file at the root of your project.
hint: If you don't want pnpm to fail on peer dependency issues, add "strict-peer-dependencies=false" to an .npmrc file at the root of your project.


@renovate renovate Bot changed the title chore(deps): update devdependency vitest to v4 [security] chore(deps): update devdependency vitest to v4 [security] - autoclosed Jun 8, 2026
@renovate renovate Bot closed this Jun 8, 2026
@renovate renovate Bot deleted the renovate/npm-vitest-vulnerability branch June 8, 2026 19:14
@renovate renovate Bot changed the title chore(deps): update devdependency vitest to v4 [security] - autoclosed chore(deps): update devdependency vitest to v3 [security] Jun 8, 2026
@renovate renovate Bot reopened this Jun 8, 2026
@renovate renovate Bot force-pushed the renovate/npm-vitest-vulnerability branch from c868e6e to 28b3ca1 Compare June 8, 2026 23:52
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.

0 participants