Skip to content

chore(deps): update dependency vite to v6.2.6 [security] #2166

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Apr 17, 2025

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
vite (source) 6.1.3 -> 6.2.6 age adoption passing confidence

GitHub Vulnerability Alerts

CVE-2025-31486

Summary

The contents of arbitrary files can be returned to the browser.

Impact

Only apps explicitly exposing the Vite dev server to the network (using --host or server.host config option) are affected..

Details

.svg

Requests ending with .svg are loaded at this line.
https://github.com/vitejs/vite/blob/037f801075ec35bb6e52145d659f71a23813c48f/packages/vite/src/node/plugins/asset.ts#L285-L290
By adding ?.svg with ?.wasm?init or with sec-fetch-dest: script header, the restriction was able to bypass.

This bypass is only possible if the file is smaller than build.assetsInlineLimit (default: 4kB) and when using Vite 6.0+.

relative paths

The check was applied before the id normalization. This allowed requests to bypass with relative paths (e.g. ../../).

PoC

npm create vite@latest
cd vite-project/
npm install
npm run dev

send request to read etc/passwd

curl 'http://127.0.0.1:5173/etc/passwd?.svg?.wasm?init'
curl 'http://127.0.0.1:5173/@​fs/x/x/x/vite-project/?/../../../../../etc/passwd?import&?raw'

CVE-2025-32395

Summary

The contents of arbitrary files can be returned to the browser if the dev server is running on Node or Bun.

Impact

Only apps with the following conditions are affected.

  • explicitly exposing the Vite dev server to the network (using --host or server.host config option)
  • running the Vite dev server on runtimes that are not Deno (e.g. Node, Bun)

Details

HTTP 1.1 spec (RFC 9112) does not allow # in request-target. Although an attacker can send such a request. For those requests with an invalid request-line (it includes request-target), the spec recommends to reject them with 400 or 301. The same can be said for HTTP 2 (ref1, ref2, ref3).

On Node and Bun, those requests are not rejected internally and is passed to the user land. For those requests, the value of http.IncomingMessage.url contains #. Vite assumed req.url won't contain # when checking server.fs.deny, allowing those kinds of requests to bypass the check.

On Deno, those requests are not rejected internally and is passed to the user land as well. But for those requests, the value of http.IncomingMessage.url did not contain #.

PoC

npm create vite@latest
cd vite-project/
npm install
npm run dev

send request to read /etc/passwd

curl --request-target /@​fs/Users/doggy/Desktop/vite-project/#/../../../../../etc/passwd http://127.0.0.1:5173

Release Notes

vitejs/vite (vite)

v6.2.6

Compare Source

Please refer to CHANGELOG.md for details.

v6.2.5

Compare Source

Please refer to CHANGELOG.md for details.

v6.2.4

Compare Source

Please refer to CHANGELOG.md for details.

v6.2.3

Compare Source

Please refer to CHANGELOG.md for details.

v6.2.2

Compare Source

v6.2.1

Compare Source

v6.2.0

Compare Source

v6.1.5

Compare Source

Please refer to CHANGELOG.md for details.

v6.1.4

Compare Source

Please refer to CHANGELOG.md for details.


Configuration

📅 Schedule: Branch creation - "" (UTC), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled because a matching PR was automerged previously.

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.

Copy link

cloudflare-workers-and-pages bot commented Apr 17, 2025

Deploying vue-i18n-next with  Cloudflare Pages  Cloudflare Pages

Latest commit: 1270bef
Status: ✅  Deploy successful!
Preview URL: https://03195ba5.vue-i18n-next.pages.dev
Branch Preview URL: https://renovate-npm-vite-vulnerabil.vue-i18n-next.pages.dev

View logs

@renovate renovate bot added the Type: Dependency Dependencies fixes label Apr 17, 2025
Copy link

github-actions bot commented Apr 17, 2025

Size Report

Bundles

File Size Gzip Brotli
core.esm-browser.prod.js 38.05 kB 11.62 kB 10.39 kB
core.global.prod.js 31.11 kB 10.78 kB 9.67 kB
core.runtime.esm-browser.prod.js 23.77 kB 7.71 kB 6.90 kB
core.runtime.global.prod.js 18.08 kB 7.04 kB 6.32 kB
message-compiler.esm-browser.prod.js 19.29 kB 5.76 kB 5.14 kB
message-compiler.global.prod.js 17.32 kB 5.55 kB 4.98 kB
petite-vue-i18n-core.esm-browser.prod.js 20.67 kB 6.96 kB 6.26 kB
petite-vue-i18n-core.global.prod.js 15.63 kB 6.06 kB 5.51 kB
petite-vue-i18n.esm-browser.prod.js 36.98 kB 11.34 kB 10.17 kB
petite-vue-i18n.global.prod.js 29.84 kB 10.19 kB 9.20 kB
petite-vue-i18n.runtime.esm-browser.prod.js 22.55 kB 7.33 kB 6.63 kB
petite-vue-i18n.runtime.global.prod.js 16.83 kB 6.40 kB 5.80 kB
vue-i18n.esm-browser.prod.js 50.66 kB 15.15 kB 13.54 kB
vue-i18n.global.prod.js 40.53 kB 13.60 kB 12.25 kB
vue-i18n.runtime.esm-browser.prod.js 36.23 kB 11.15 kB 10.02 kB
vue-i18n.runtime.global.prod.js 27.52 kB 9.85 kB 8.89 kB

Usages

Name Size Gzip Brotli
packages/size-check-core (@intlify/core) 9.22 kB 3.82 kB 3.46 kB
packages/size-check-petite-vue-i18n (petite-vue-i18n) 77.63 kB 30.24 kB 27.28 kB
packages/size-check-vue-i18n (vue-i18n) 82.83 kB 31.74 kB 28.51 kB

Copy link

pkg-pr-new bot commented Apr 17, 2025

Open in StackBlitz

@intlify/core

npm i https://pkg.pr.new/@intlify/core@2166

@intlify/core-base

npm i https://pkg.pr.new/@intlify/core-base@2166

@intlify/devtools-types

npm i https://pkg.pr.new/@intlify/devtools-types@2166

@intlify/message-compiler

npm i https://pkg.pr.new/@intlify/message-compiler@2166

petite-vue-i18n

npm i https://pkg.pr.new/petite-vue-i18n@2166

@intlify/shared

npm i https://pkg.pr.new/@intlify/shared@2166

vue-i18n

npm i https://pkg.pr.new/vue-i18n@2166

@intlify/vue-i18n-core

npm i https://pkg.pr.new/@intlify/vue-i18n-core@2166

commit: 1270bef

@renovate renovate bot force-pushed the renovate/npm-vite-vulnerability branch from f1914cf to 1270bef Compare April 23, 2025 06:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Dependency Dependencies fixes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants