-
Notifications
You must be signed in to change notification settings - Fork 3.4k
chore(deps): update dependency vite-5 to v6 [security] - autoclosed #32512
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
Closed
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
|
See the guidelines for reviewing dependency updates for info on how to review dependency update PRs. |
5e0f8ca to
4cb83c2
Compare
npm/vite-dev-server/package.json
Outdated
| @@ -22,7 +22,7 @@ | |||
| "devDependencies": { | |||
| "cross-env": "7.0.3", | |||
| "dedent": "^0.7.0", | |||
| "vite-5": "npm:vite@^5.4.20", | |||
| "vite-5": "npm:vite@^7.1.5", | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
4cb83c2 to
52e06c7
Compare
52e06c7 to
97432ba
Compare
97432ba to
1abcf01
Compare
1abcf01 to
70a4322
Compare
70a4322 to
fe4c40a
Compare
fe4c40a to
4fdc32d
Compare
4fdc32d to
dc837c7
Compare
dc837c7 to
9d06487
Compare
9d06487 to
ec4765a
Compare
ec4765a to
0f634a6
Compare
0f634a6 to
e531465
Compare
8815342 to
c7f8db9
Compare
7bc996c to
7b6e6b8
Compare
7b6e6b8 to
e225089
Compare
e225089 to
895d8ed
Compare
895d8ed to
439fda9
Compare
439fda9 to
5333698
Compare
5333698 to
ef683d6
Compare
ef683d6 to
2401569
Compare
2401569 to
acb3b95
Compare
acb3b95 to
fb2dc7c
Compare
fb2dc7c to
89dfbc5
Compare
89dfbc5 to
7749698
Compare
7749698 to
fb634a2
Compare
fb634a2 to
c6f875f
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:
^5.4.20->^6.4.0GitHub Vulnerability Alerts
CVE-2025-58752
Summary
Any HTML files on the machine were served regardless of the
server.fssettings.Impact
Only apps that match the following conditions are affected:
appType: 'spa'(default) orappType: 'mpa'is usedThis 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:
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:
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.fssettings.Impact
Only apps that match the following conditions are affected:
server.hostconfig option)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:
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-5)
v6.4.0Compare Source
Please refer to CHANGELOG.md for details.
v6.3.7Compare Source
Please refer to CHANGELOG.md for details.
v6.3.6Compare Source
Please refer to CHANGELOG.md for details.
v6.3.5Compare Source
v6.3.4Compare Source
Bug Fixes
requireto import externals in optimized dependencies (#19940) (efc5eab)Code Refactoring
v6.3.3Compare Source
Bug Fixes
Performance Improvements
Tests
ssrTransformre-export deps and test stacktrace with first line (#19629) (9399cda)v6.3.2Compare Source
Features
Bug Fixes
css.lightningcssoption in css minification process (#19879) (b5055e0)v6.3.1Compare Source
Bug Fixes
Promise.allSettledin preload function (#19805) (35c7f35)transformcalls (#19878) (a152b7c)v6.3.0Compare Source
Bug Fixes
hot.invalidatein circular deps (#19870) (d4ee5e8)v6.2.7Compare Source
Please refer to CHANGELOG.md for details.
v6.2.6Compare Source
Please refer to CHANGELOG.md for details.
v6.2.5Compare Source
Please refer to CHANGELOG.md for details.
v6.2.4Compare Source
Please refer to CHANGELOG.md for details.
v6.2.3Compare Source
Please refer to CHANGELOG.md for details.
v6.2.2Compare Source
Features
base(#19616) (2476391)Bug Fixes
ssrRewriteStacktrace(#19612) (4309755)Miscellaneous Chores
v6.2.1Compare Source
Features
*?url&no-inlinetype and warning for.json?inline/.json?no-inline(#19566) (c0d3667)Bug Fixes
Performance Improvements
Miscellaneous Chores
Code Refactoring
isBuildcheck from preAliasPlugin (#19587) (c9e086d)applyToEnvironmentin internal plugins (#19588) (f678442)Tests
v6.2.0Compare Source
Bug Fixes
Miscellaneous Chores
v6.1.6Compare Source
Please refer to CHANGELOG.md for details.
v6.1.5Compare Source
Please refer to CHANGELOG.md for details.
v6.1.4Compare Source
Please refer to CHANGELOG.md for details.
v6.1.3Compare Source
Please refer to CHANGELOG.md for details.
v6.1.2Compare Source
Please refer to CHANGELOG.md for details.
v6.1.1Compare Source
Features
Bug Fixes
.[cm]?[tj]sx?static assets are JS mime (#19453) (e7ba55e)*.ipv4address in cert (#19416) (973283b)Miscellaneous Chores
Code Refactoring
v6.1.0Compare Source
Features
Bug Fixes
.[cm]?[tj]sx?static assets are JS mime (#19453) (e7ba55e)*.ipv4address in cert (#19416) (973283b)Miscellaneous Chores
Code Refactoring
v6.0.15Compare Source
Please refer to CHANGELOG.md for details.
v6.0.14Compare Source
Please refer to CHANGELOG.md for details.
v6.0.13Compare Source
Please refer to CHANGELOG.md for details.
v6.0.12Compare Source
Please refer to CHANGELOG.md for details.
v6.0.11Compare Source
Features
portin the logged error message after failed WS connection withEADDRINUSE(#19212) (14027b0).jxl(#18855) (57b397c)builtinsenvironmentresolve(#18584) (2c2d521)defaultAllowedOriginsfor user-land config and 3rd party plugins (#19259) (dc8946b)wasmto the compressible assets regex (#19085) (ce84142)Bug Fixes
resolveLibCssFilename(#19324) (f183bdf)[@plugin](https://redirect.github.com/plugin)imports of JS files treated as CSS and rebased (fix #19268) (#19269) (602b373)vite optimize(#19347) (19ffad0)resolve.builtinis empty (#19312) (b7aba0b)server.preTransformRequests(#19272) (12aaa58)ssrLoadModule(#19290) (353c467)nodeLikeBuiltinsforssr.target: 'webworker'withoutnoExternal: true(#19313) (9fc31b6)--forcework for all environments (#18901) (51a42c6)RegExpvalues withnew RegExpinstead ofstructuredClone(fix #19245, fix #18875) (#19247) (56ad2be)Performance Improvements
Documentation
build.manifestjsdocs (#19332) (4583781)Code Refactoring
vite optimizecommand (#19348) (6e0e3c0)Miscellaneous Chores
scanImportsnot being used in ssr (#19285) (fbbc6da)Beta Changelogs
6.1.0-beta.2 (2025-02-04)
See 6.1.0-beta.2 changelog
6.1.0-beta.1 (2025-02-04)
See 6.1.0-beta.1 changelog
6.1.0-beta.0 (2025-01-24)
See 6.1.0-beta.0 changelog
v6.0.10Compare Source
Bug Fixes
server.originURL (#19241) (2495022)v6.0.9Compare Source
⚠ BREAKING CHANGES
server.allowedHostsserver.cors: falseto disallow fetching from untrusted originsBug Fixes
server.allowedHosts(bd896fb)server.cors: falseto disallow fetching from untrusted origins (b09572a)v6.0.8Compare Source
Bug Fixes
server.close()only called once (#19204) (db81c2d)defaultServerConditions(#19174) (ad75c56)ESBuildOptions.include / excludetype to allowreadonly (string | RegExp)[](#19146) (ea53e70)Miscellaneous Chores
v6.0.7Compare Source
Features
Bug Fixes
minifywhenbuilder.sharedPlugins: true(#19025) (f7b1964)vite-ignoreattribute for inline script (#19062) (a492253)Performance Improvements
v6.0.6Compare Source
Bug Fixes
fetchModule-side resolve (#18361) (9f10261)Reverts
Miscellaneous Chores
build.target(#19047) (0e9e81f)Tests
v6.0.5Compare Source
Bug Fixes
v6.0.4Compare Source
Bug Fixes
this.resolveskipSelf should not skip for differentidorimport(#18903) (4727320)url()when lightningcss is used (#18997) (3734f80)pluginContainer.getModuleInfo(#18895) (258cdd6)true(#18899) (8a6bb4e)Miscellaneous Chores
Code Refactoring
handleInvoke([#18902](https://redirect.github.com/vitejs/vite/issues/18902Configuration
📅 Schedule: Branch creation - "" in timezone America/New_York, 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.