-
Notifications
You must be signed in to change notification settings - Fork 3.4k
chore(deps): update dependency vite-5 to v5.4.20 [security] #32458
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
Merged
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. |
c0bfe1c
to
2d90783
Compare
2d90783
to
25be1ec
Compare
25be1ec
to
b324abf
Compare
b324abf
to
c24f87b
Compare
c24f87b
to
8b2058b
Compare
0e66d70
to
57e98ab
Compare
57e98ab
to
8f8eae2
Compare
8f8eae2
to
21564df
Compare
21564df
to
27af983
Compare
27af983
to
042c180
Compare
042c180
to
28bdbd9
Compare
28bdbd9
to
b50a3a6
Compare
b50a3a6
to
df3f228
Compare
76ba573
to
437e088
Compare
437e088
to
e45b9db
Compare
e45b9db
to
ea58f8d
Compare
ea58f8d
to
599fe07
Compare
599fe07
to
d2617a3
Compare
d2617a3
to
29edf0b
Compare
29edf0b
to
505e8a6
Compare
505e8a6
to
0b3e4b1
Compare
0b3e4b1
to
f688a7f
Compare
…m/cypress-io/cypress into renovate/npm-vite-5-vulnerability
Edited/Blocked NotificationRenovate will not automatically rebase this PR, because it does not recognize the last commit author and assumes somebody else may have edited the PR. You can manually request rebase by checking the rebase/retry box above. |
jennifer-shehane
approved these changes
Sep 16, 2025
cypress
|
Project |
cypress
|
Branch Review |
renovate/npm-vite-5-vulnerability
|
Run status |
|
Run duration | 19m 12s |
Commit |
|
Committer | Jennifer Shehane |
View all properties for this run ↗︎ |
Test results | |
---|---|
|
0
|
|
10
|
|
1102
|
|
0
|
|
26662
|
View all changes introduced in this branch ↗︎ |
UI Coverage
45.11%
|
|
---|---|
|
186
|
|
157
|
Accessibility
97.71%
|
|
---|---|
|
4 critical
8 serious
2 moderate
2 minor
|
|
110
|
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.19
->^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.