Skip to content

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Sep 27, 2025

Coming soon: The Renovate bot (GitHub App) will be renamed to Mend. PRs from Renovate will soon appear from 'Mend'. Learn more here.

This PR contains the following updates:

Package Change Age Confidence
vite (source) ^4.5.14 -> ^7.1.7 age confidence

Warning

Some dependencies could not be looked up. Check the Dependency Dashboard for more information.

GitHub Vulnerability Alerts

CVE-2025-58752

Summary

Any HTML files on the machine were served regardless of the server.fs settings.

Impact

Only apps that match the following conditions are affected:

  • explicitly exposes the Vite dev server to the network (using --host or server.host config option)
  • appType: 'spa' (default) or appType: 'mpa' is used

This vulnerability also affects the preview server. The preview server allowed HTML files not under the output directory to be served.

Details

The serveStaticMiddleware function is in charge of serving static files from the server. It returns the viteServeStaticMiddleware function which runs the needed tests and serves the page. The viteServeStaticMiddleware function checks if the extension of the requested file is ".html". If so, it doesn't serve the page. Instead, the server will go on to the next middlewares, in this case htmlFallbackMiddleware, and then to indexHtmlMiddleware. These middlewares don't perform any test against allow or deny rules, and they don't make sure that the accessed file is in the root directory of the server. They just find the file and send back its contents to the client.

PoC

Execute the following shell commands:

npm  create  vite@latest
cd vite-project/
echo  "secret" > /tmp/secret.html
npm install
npm run dev

Then, in a different shell, run the following command:

curl -v --path-as-is 'http://localhost:5173/../../../../../../../../../../../tmp/secret.html'

The contents of /tmp/secret.html will be returned.

This will also work for HTML files that are in the root directory of the project, but are in the deny list (or not in the allow list). Test that by stopping the running server (CTRL+C), and running the following commands in the server's shell:

echo  'import path from "node:path"; import { defineConfig } from "vite"; export default defineConfig({server: {fs: {deny: [path.resolve(__dirname, "secret_files/*")]}}})'  >  [vite.config.js](http://vite.config.js)
mkdir secret_files
echo "secret txt" > secret_files/secret.txt
echo "secret html" > secret_files/secret.html
npm run dev

Then, in a different shell, run the following command:

curl -v --path-as-is 'http://localhost:5173/secret_files/secret.txt'

You will receive a 403 HTTP Response,  because everything in the secret_files directory is denied.

Now in the same shell run the following command:

curl -v --path-as-is 'http://localhost:5173/secret_files/secret.html'

You will receive the contents of secret_files/secret.html.

CVE-2025-58751

Summary

Files starting with the same name with the public directory were served bypassing the server.fs settings.

Impact

Only apps that match the following conditions are affected:

Details

The servePublicMiddleware function is in charge of serving public files from the server. It returns the viteServePublicMiddleware function which runs the needed tests and serves the page. The viteServePublicMiddleware function checks if the publicFiles variable is defined, and then uses it to determine if the requested page is public. In the case that the publicFiles is undefined, the code will treat the requested page as a public page, and go on with the serving function. publicFiles may be undefined if there is a symbolic link anywhere inside the public directory. In that case, every requested page will be passed to the public serving function. The serving function is based on the sirv library. Vite patches the library to add the possibility to test loading access to pages, but when the public page middleware disables this functionality since public pages are meant to be available always, regardless of whether they are in the allow or deny list.

In the case of public pages, the serving function is provided with the path to the public directory as a root directory. The code of the sirv library uses the join function to get the full path to the requested file. For example, if the public directory is "/www/public", and the requested file is "myfile", the code will join them to the string "/www/public/myfile". The code will then pass this string to the normalize function. Afterwards, the code will use the string's startsWith function to determine whether the created path is within the given directory or not. Only if it is, it will be served.

Since sirv trims the trailing slash of the public directory, the string's startsWith function may return true even if the created path is not within the public directory. For example, if the server's root is at "/www", and the public directory is at "/www/p", if the created path will be "/www/private.txt", the startsWith function will still return true, because the string "/www/private.txt" starts with  "/www/p". To achieve this, the attacker will use ".." to ask for the file "../private.txt". The code will then join it to the "/www/p" string, and will receive "/www/p/../private.txt". Then, the normalize function will return "/www/private.txt", which will then be passed to the startsWith function, which will return true, and the processing of the page will continue without checking the deny list (since this is the public directory middleware which doesn't check that).

PoC

Execute the following shell commands:

npm  create  vite@latest
cd vite-project/
mkdir p
cd p
ln -s a b
cd ..
echo  'import path from "node:path"; import { defineConfig } from "vite"; export default defineConfig({publicDir: path.resolve(__dirname, "p/"), server: {fs: {deny: [path.resolve(__dirname, "private.txt")]}}})' > vite.config.js
echo  "secret" > private.txt
npm install
npm run dev

Then, in a different shell, run the following command:

curl -v --path-as-is 'http://localhost:5173/private.txt'

You will receive a 403 HTTP Response,  because private.txt is denied.

Now in the same shell run the following command:

curl -v --path-as-is 'http://localhost:5173/../private.txt'

You will receive the contents of private.txt.

Related links


Release Notes

vitejs/vite (vite)

v7.1.7

Compare Source

Bug Fixes
  • build: fix ssr environment emitAssets: true when sharedConfigBuild: true (#​20787) (4c4583c)
  • client: use CSP nonce when rendering error overlay (#​20791) (9bc9d12)
  • deps: update all non-major dependencies (#​20811) (9f2247c)
  • glob: handle glob imports from folders starting with dot (#​20800) (105abe8)
  • hmr: trigger prune event when import is removed from non hmr module (#​20768) (9f32b1d)
  • hmr: wait for import.meta.hot.prune callbacks to complete before running other HMRs (#​20698) (98a3484)

v7.1.6

Compare Source

Bug Fixes
  • deps: update all non-major dependencies (#​20773) (88af2ae)
  • esbuild: inject esbuild helper functions with minified $ variables correctly (#​20761) (7e8e004)
  • fallback terser to main thread when nameCache is provided (#​20750) (a679a64)
  • types: strict env typings fail when skipLibCheck is false (#​20755) (cc54e29)
Miscellaneous Chores

v7.1.5

Compare Source

Bug Fixes

v7.1.4

Compare Source

Bug Fixes
Miscellaneous Chores
Code Refactoring

v7.1.3

Compare Source

Features
Bug Fixes
Performance Improvements
Miscellaneous Chores
Code Refactoring
Tests

v7.1.2

Compare Source

Bug Fixes
Miscellaneous Chores

v7.1.1

Compare Source

Bug Fixes
Miscellaneous Chores

v7.1.0

Compare Source

Features
  • support files with more than 1000 lines by generateCodeFrame (#​20508) (e7d0b2a)
Bug Fixes
Tests

v7.0.7

Compare Source

Please refer to CHANGELOG.md for details.

v7.0.6

Compare Source

Bug Fixes
Miscellaneous Chores
Code Refactoring

v7.0.5

Compare Source

Bug Fixes
Miscellaneous Chores
Code Refactoring

v7.0.4

Compare Source

Bug Fixes
  • allow resolving bare specifiers to relative paths for entries (#​20379) (324669c)
Build System

v7.0.3

Compare Source

Bug Fixes
Miscellaneous Chores
Code Refactoring
  • minor changes to reduce diff between normal Vite and rolldown-vite (#​20354) (2e8050e)

v7.0.2

Compare Source

Bug Fixes

v7.0.1

Compare Source

Bug Fixes
Miscellaneous Chores

v7.0.0

Compare Source

v6.3.6

Compare Source

Please refer to CHANGELOG.md for details.

v6.3.5

Compare Source

v6.3.4

Compare Source

Bug Fixes
  • check static serve file inside sirv (#​19965) (c22c43d)
  • optimizer: return plain object when using require to import externals in optimized dependencies (#​19940) (efc5eab)
Code Refactoring

v6.3.3

Compare Source

v6.3.2

Compare Source

Features
Bug Fixes

v6.3.1

Compare Source

Bug Fixes

v6.3.0

Compare Source

v6.2.7

Compare Source

Please refer to CHANGELOG.md for details.

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

Features
  • add *?url&no-inline type and warning for .json?inline / .json?no-inline (#​19566) (c0d3667)
Bug Fixes
  • css: stabilize css module hashes with lightningcss in dev mode (#​19481) (92125b4)
  • deps: update all non-major dependencies (#​19555) (f612e0f)
  • reporter: fix incorrect bundle size calculation with non-ASCII characters (#​19561) (437c0ed)
  • sourcemap: combine sourcemaps with multiple sources without matched source (#​18971) (e3f6ae1)
  • ssr: named export should overwrite export all (#​19534) (2fd2fc1)
Performance Improvements
Miscellaneous Chores
Code Refactoring
Tests

v6.2.0

Compare Source

Bug Fixes
Miscellaneous Chores

v6.1.6

Compare Source

Please refer to CHANGELOG.md for details.

v6.1.5

Compare Source

Please refer to CHANGELOG.md for details.

v6.1.4

Compare Source

Please refer to CHANGELOG.md for details.

v6.1.3

Compare Source

Please refer to CHANGELOG.md for details.

v6.1.2

Compare Source

Please refer to CHANGELOG.md for details.

v6.1.1

Compare Source

Features
Bug Fixes
Miscellaneous Chores
Code Refactoring

v6.1.0

Compare Source

Features
Bug Fixes
Miscellaneous Chores
  • update 6.1.0 changelog (#​19363) ([fa7c211](https

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.


  • 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 added the dependencies Pull requests that update a dependency file label Sep 27, 2025
Copy link

changeset-bot bot commented Sep 27, 2025

⚠️ No Changeset found

Latest commit: ad77339

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link
Contributor

coderabbitai bot commented Sep 27, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

Update devDependency vite from ^4.5.14 to ^5.4.20 in two Vue example projects (examples/vue/2.6-basic and examples/vue/2.7-basic). No other code, control flow, or exported/public API changes.

Changes

Cohort / File(s) Summary
Vue examples: Vite bump
examples/vue/2.6-basic/package.json, examples/vue/2.7-basic/package.json
Bump devDependency vite from ^4.5.14 to ^5.4.20

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Possibly related PRs

Poem

i'm a rabbit in the repo, quick and bright,
i nudged a version in the night 🥕
two demos sip a newer brew,
tiny hop — the change is through,
then i wiggle off, polite and light

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Description Check ⚠️ Warning The PR description does not follow the repository’s required template because it lacks the “## 🎯 Changes” section summarizing the change and its motivation, omits the “## ✅ Checklist” and “## 🚀 Release Impact” sections, and instead includes extensive CVE details and release notes without the structured headings outlined in the template. Please restructure the description to include the “## 🎯 Changes” section with a concise summary of the dependency update and its motivation, add the required checklist under “## ✅ Checklist”, and fill in the “## 🚀 Release Impact” section according to the template.
✅ Passed checks (2 passed)
Check name Status Explanation
Title Check ✅ Passed The title “chore(deps): update dependency vite to v7 [security]” clearly and concisely highlights the main change of bumping the Vite dependency to version 7 and notes the security context without adding superfluous details.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between eac2f7d and ad77339.

📒 Files selected for processing (2)
  • examples/vue/2.6-basic/package.json (1 hunks)
  • examples/vue/2.7-basic/package.json (1 hunks)

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

nx-cloud bot commented Sep 27, 2025

View your CI Pipeline Execution ↗ for commit ad77339

Command Status Duration Result
nx affected --targets=test:sherif,test:knip,tes... ✅ Succeeded 43s View ↗
nx run-many --target=build --exclude=examples/*... ✅ Succeeded 1s View ↗

☁️ Nx Cloud last updated this comment at 2025-09-27 23:14:58 UTC

Copy link

pkg-pr-new bot commented Sep 27, 2025

More templates

@tanstack/angular-query-experimental

npm i https://pkg.pr.new/@tanstack/angular-query-experimental@9698

@tanstack/eslint-plugin-query

npm i https://pkg.pr.new/@tanstack/eslint-plugin-query@9698

@tanstack/query-async-storage-persister

npm i https://pkg.pr.new/@tanstack/query-async-storage-persister@9698

@tanstack/query-broadcast-client-experimental

npm i https://pkg.pr.new/@tanstack/query-broadcast-client-experimental@9698

@tanstack/query-core

npm i https://pkg.pr.new/@tanstack/query-core@9698

@tanstack/query-devtools

npm i https://pkg.pr.new/@tanstack/query-devtools@9698

@tanstack/query-persist-client-core

npm i https://pkg.pr.new/@tanstack/query-persist-client-core@9698

@tanstack/query-sync-storage-persister

npm i https://pkg.pr.new/@tanstack/query-sync-storage-persister@9698

@tanstack/react-query

npm i https://pkg.pr.new/@tanstack/react-query@9698

@tanstack/react-query-devtools

npm i https://pkg.pr.new/@tanstack/react-query-devtools@9698

@tanstack/react-query-next-experimental

npm i https://pkg.pr.new/@tanstack/react-query-next-experimental@9698

@tanstack/react-query-persist-client

npm i https://pkg.pr.new/@tanstack/react-query-persist-client@9698

@tanstack/solid-query

npm i https://pkg.pr.new/@tanstack/solid-query@9698

@tanstack/solid-query-devtools

npm i https://pkg.pr.new/@tanstack/solid-query-devtools@9698

@tanstack/solid-query-persist-client

npm i https://pkg.pr.new/@tanstack/solid-query-persist-client@9698

@tanstack/svelte-query

npm i https://pkg.pr.new/@tanstack/svelte-query@9698

@tanstack/svelte-query-devtools

npm i https://pkg.pr.new/@tanstack/svelte-query-devtools@9698

@tanstack/svelte-query-persist-client

npm i https://pkg.pr.new/@tanstack/svelte-query-persist-client@9698

@tanstack/vue-query

npm i https://pkg.pr.new/@tanstack/vue-query@9698

@tanstack/vue-query-devtools

npm i https://pkg.pr.new/@tanstack/vue-query-devtools@9698

commit: eac2f7d

Copy link
Contributor

github-actions bot commented Sep 27, 2025

Sizes for commit ad77339:

Branch Bundle Size
Main
This PR

@renovate renovate bot force-pushed the renovate/npm-vite-vulnerability branch from ef17368 to 3f12ac8 Compare September 27, 2025 03:05
@renovate renovate bot changed the title chore(deps): update dependency vite to v7 [security] chore(deps): update dependency vite to v5 [security] Sep 27, 2025
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b01be85 and 3f12ac8.

📒 Files selected for processing (2)
  • examples/vue/2.6-basic/package.json (1 hunks)
  • examples/vue/2.7-basic/package.json (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: Test
  • GitHub Check: Preview

@renovate renovate bot force-pushed the renovate/npm-vite-vulnerability branch from 3f12ac8 to f173b06 Compare September 27, 2025 08:27
@renovate renovate bot changed the title chore(deps): update dependency vite to v5 [security] chore(deps): update dependency vite to v7 [security] Sep 27, 2025
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 3f12ac8 and f173b06.

📒 Files selected for processing (2)
  • examples/vue/2.6-basic/package.json (1 hunks)
  • examples/vue/2.7-basic/package.json (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • examples/vue/2.7-basic/package.json
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: Preview
  • GitHub Check: Test

@renovate renovate bot force-pushed the renovate/npm-vite-vulnerability branch from f173b06 to 653cb82 Compare September 27, 2025 12:25
@renovate renovate bot changed the title chore(deps): update dependency vite to v7 [security] chore(deps): update dependency vite to v5 [security] Sep 27, 2025
@renovate renovate bot force-pushed the renovate/npm-vite-vulnerability branch from 653cb82 to a5dc46f Compare September 27, 2025 13:55
@renovate renovate bot changed the title chore(deps): update dependency vite to v5 [security] chore(deps): update dependency vite to v7 [security] Sep 27, 2025
@renovate renovate bot force-pushed the renovate/npm-vite-vulnerability branch from a5dc46f to 173bddc Compare September 27, 2025 14:21
@renovate renovate bot changed the title chore(deps): update dependency vite to v7 [security] chore(deps): update dependency vite to v5 [security] Sep 27, 2025
@renovate renovate bot force-pushed the renovate/npm-vite-vulnerability branch from 173bddc to fd59984 Compare September 27, 2025 22:29
@renovate renovate bot changed the title chore(deps): update dependency vite to v5 [security] chore(deps): update dependency vite to v7 [security] Sep 27, 2025
@renovate renovate bot force-pushed the renovate/npm-vite-vulnerability branch from fd59984 to 3438743 Compare September 27, 2025 22:40
@renovate renovate bot changed the title chore(deps): update dependency vite to v7 [security] chore(deps): update dependency vite to v5 [security] Sep 27, 2025
@renovate renovate bot force-pushed the renovate/npm-vite-vulnerability branch from 3438743 to eac2f7d Compare September 27, 2025 22:57
@renovate renovate bot changed the title chore(deps): update dependency vite to v5 [security] chore(deps): update dependency vite to v7 [security] Sep 27, 2025
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 3438743 and eac2f7d.

📒 Files selected for processing (2)
  • examples/vue/2.6-basic/package.json (1 hunks)
  • examples/vue/2.7-basic/package.json (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: Test
  • GitHub Check: Preview
🔇 Additional comments (1)
examples/vue/2.6-basic/package.json (1)

18-19: Same issue: Vite 7 breaks alongside vite-plugin-vue2@2.0.3.

vite-plugin-vue2 only declares compatibility up through Vite 3, so bumping this example to Vite 7 will leave contributors with broken installs and tooling. Please stick with the 5.4.x security line (5.4.20 fixes the CVEs) unless you simultaneously replace the Vue‑2 plugin with something that officially supports Vite 7.

-    "vite": "^7.1.7",
+    "vite": "^5.4.20",

@renovate renovate bot force-pushed the renovate/npm-vite-vulnerability branch from eac2f7d to ad77339 Compare September 27, 2025 23:13
@renovate renovate bot changed the title chore(deps): update dependency vite to v7 [security] chore(deps): update dependency vite to v5 [security] Sep 27, 2025
@lachlancollins lachlancollins deleted the renovate/npm-vite-vulnerability branch September 27, 2025 23:13
@renovate renovate bot changed the title chore(deps): update dependency vite to v5 [security] chore(deps): update dependency vite to v7 [security] Sep 27, 2025
Copy link
Contributor Author

renovate bot commented Sep 27, 2025

Renovate Ignore Notification

Because you closed this PR without merging, Renovate will ignore this update. You will not get PRs for any future 7.x releases. But if you manually upgrade to 7.x then Renovate will re-enable minor and patch updates automatically.

If you accidentally closed this PR, or if you changed your mind: rename this PR to get a fresh replacement PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant