-
Notifications
You must be signed in to change notification settings - Fork 3.4k
chore(deps): update dependency vite-5 to v7 [security] #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
Draft
renovate
wants to merge
1
commit into
develop
Choose a base branch
from
renovate/npm-vite-5-vulnerability
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+11
−8
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
993b945
to
409ee2f
Compare
409ee2f
to
7affeba
Compare
7affeba
to
b825df9
Compare
b825df9
to
1549003
Compare
1549003
to
af54d8f
Compare
af54d8f
to
5591d78
Compare
5591d78
to
31d43e6
Compare
31d43e6
to
adbd83e
Compare
adbd83e
to
b1c8866
Compare
b1c8866
to
9d32c57
Compare
9d32c57
to
9d79b45
Compare
9d79b45
to
1b18855
Compare
1b18855
to
1778fc0
Compare
1778fc0
to
06b5037
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.
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:
^5.4.20
->^7.1.5
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:
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.fs
settings.Impact
Only apps that match the following conditions are affected:
server.host
config 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)
v7.1.5
Compare Source
Bug Fixes
fs.strict
check to HTML files (#20736) (14015d7)v7.1.4
Compare Source
Bug Fixes
Miscellaneous Chores
Code Refactoring
minify
parameter fromfinalizeCss
(#20701) (8099582)v7.1.3
Compare Source
Features
generateCodeFrame
(#20640) (1559577)Bug Fixes
Performance Improvements
resolveConfig
(#20646) (f691f57)Miscellaneous Chores
Code Refactoring
import
in worker threads (#20641) (530687a)Tests
checkNodeVersion
test (#20647) (731d3e6)v7.1.2
Compare Source
Bug Fixes
[vite]
prefixes to debug logs (#20595) (7cdef61)npm:
prefix as a built-in module (#20558) (ab33803)Miscellaneous Chores
@jridgewell/remapping
from@ampproject/remapping
(#20577) (0a6048a)v7.1.1
Compare Source
Bug Fixes
launch-editor-middleware
(#20569) (826b394)Miscellaneous Chores
v7.1.0
Compare Source
Features
generateCodeFrame
(#20508) (e7d0b2a)Bug Fixes
image-set
containing__VITE_ASSET__
(#20520) (f1a2635)entryCssAssetFileNames
as an empty Set (#20542) (6a46cda)Tests
process.features
(#20544) (856d3f0)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
Accept: text/html
(#20376) (c9614b9)new URL(, import.meta.url)
(#20382) (6bc8bf6)Miscellaneous Chores
Code Refactoring
foo.endsWith("bar")
instead of/bar$/.test(foo)
(#20413) (862e192)v7.0.4
Compare Source
Bug Fixes
Build System
@oxc-project/runtime
devDep (#20389) (5e29602)v7.0.3
Compare Source
Bug Fixes
Miscellaneous Chores
n/prefer-node-protocol
rule (#20368) (38bb268)Code Refactoring
v7.0.2
Compare Source
Bug Fixes
v7.0.1
Compare Source
Bug Fixes
Miscellaneous Chores
v7.0.0
Compare Source
import.meta.url
in bundled Vite (#20235) (3bf3a8a), closes #20235ssrExportNameKey
(#20266) (ac302a7), closes #20266normalizeModuleId
(#20277) (9b98dcb), closes #20277numberToPos
(#20244) (3f46901), closes #20244v6.3.6
Compare Source
Please refer to CHANGELOG.md for details.
v6.3.5
Compare Source
v6.3.4
Compare Source
Bug Fixes
require
to import externals in optimized dependencies (#19940) (efc5eab)Code Refactoring
v6.3.3
Compare Source
ssrTransform
re-export deps and test stacktrace with first line (#19629) (9399cda), closes #19629v6.3.2
Compare Source
Features
Bug Fixes
css.lightningcss
option in css minification process (#19879) (b5055e0)v6.3.1
Compare Source
Bug Fixes
Promise.allSettled
in preload function (#19805) (35c7f35)transform
calls (#19878) (a152b7c)v6.3.0
Compare Source
hot.invalidate
in circular deps (#19870) (d4ee5e8), closes #19870v6.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
base
(#19616) (2476391), closes #19616v6.2.1
Compare Source
Features
*?url&no-inline
type and warning for.json?inline
/.json?no-inline
(#19566) (c0d3667)Bug Fixes
Performance Improvements
Miscellaneous Chores
Code Refactoring
isBuild
check from preAliasPlugin (#19587) (c9e086d)applyToEnvironment
in internal plugins (#19588) (f678442)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
.[cm]?[tj]sx?
static assets are JS mime (#19453) (e7ba55e)*.ipv4
address in cert (#19416) (973283b)Miscellaneous Chores
Code Refactoring
v6.1.0
Compare Source
Features
Bug Fixes
.[cm]?[tj]sx?
static assets are JS mime (#19453) (e7ba55e)*.ipv4
address in cert (#19416) (973283b)Miscellaneous Chores
Code Refactoring
v6.0.15
Compare Source
Please refer to CHANGELOG.md for details.
v6.0.14
Compare Source
Please refer to CHANGELOG.md for details.
v6.0.13
Compare Source
Please refer to CHANGELOG.md for details.
v6.0.12
Compare Source
Please refer to CHANGELOG.md for details.
v6.0.11
Compare Source
Features
port
in the logged error message after failed WS connection withEADDRINUSE
(#19212) (14027b0).jxl
(#18855) (57b397c)builtins
environmentresolve
(#18584) (2c2d521)Configuration
📅 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.