[Security] Bump vite from 6.0.7 to 6.0.11
Bumps vite from 6.0.7 to 6.0.11. This update includes a security fix.
Vulnerabilities fixed
Websites were able to send any requests to the development server and read the response in vite
Summary
Vite allowed any websites to send any requests to the development server and read the response due to default CORS settings and lack of validation on the Origin header for WebSocket connections.
Upgrade Path
Users that does not match either of the following conditions should be able to upgrade to a newer version of Vite that fixes the vulnerability without any additional configuration.
- Using the backend integration feature
- Using a reverse proxy in front of Vite
- Accessing the development server via a domain other than
localhost
or*.localhost
- Using a plugin / framework that connects to the WebSocket server on their own from the browser
Using the backend integration feature
If you are using the backend integration feature and not setting
server.origin
, you need to add the origin of the backend server to theserver.cors.origin
option. Make sure to set a specific origin rather than*
, otherwise any origin can access your development server.Using a reverse proxy in front of Vite
If you are using a reverse proxy in front of Vite and sending requests to Vite with a hostname other than
localhost
or*.localhost
, you need to add the hostname to the newserver.allowedHosts
option. For example, if the reverse proxy is sending requests tohttp://vite:5173
, you need to addvite
to theserver.allowedHosts
option.Accessing the development server via a domain other than
localhost
or*.localhost
You need to add the hostname to the new
server.allowedHosts
option. For example, if you are accessing the development server viahttp://foo.example.com:8080
, you need to addfoo.example.com
to theserver.allowedHosts
option.
... (truncated)
Patched versions: 4.5.6; 5.4.12; 6.0.9 Affected versions: = 6.0.0, <= 6.0.8
Release notes
Sourced from vite's releases.
v6.0.11
Please refer to CHANGELOG.md for details.
v6.0.10
Please refer to CHANGELOG.md for details.
v6.0.9
This version contains a breaking change due to security fixes. See https://github.com/vitejs/vite/security/advisories/GHSA-vg6x-rcgg-rjx6 for more details.
Please refer to CHANGELOG.md for details.
v6.0.8
Please refer to CHANGELOG.md for details.
Changelog
Sourced from vite's changelog.
6.0.11 (2025-01-21)
- fix:
preview.allowedHosts
with specific values was not respected (#19246) (aeb3ec8), closes #19246- fix: allow CORS from loopback addresses by default (#19249) (3d03899), closes #19249
6.0.10 (2025-01-20)
6.0.9 (2025-01-20)
- fix!: check host header to prevent DNS rebinding attacks and introduce
server.allowedHosts
(bd896fb)- fix!: default
server.cors: false
to disallow fetching from untrusted origins (b09572a)- fix: verify token for HMR WebSocket connection (029dcd6)
6.0.8 (2025-01-20)
- fix: avoid SSR HMR for HTML files (#19193) (3bd55bc), closes #19193
- fix: build time display 7m 60s (#19108) (cf0d2c8), closes #19108
- fix: don't resolve URL starting with double slash (#19059) (35942cd), closes #19059
- fix: ensure
server.close()
only called once (#19204) (db81c2d), closes #19204- fix: resolve.conditions in ResolvedConfig was
defaultServerConditions
(#19174) (ad75c56), closes #19174- fix: tree shake stringified JSON imports (#19189) (f2aed62), closes #19189
- fix: use shared sigterm callback (#19203) (47039f4), closes #19203
- fix(deps): update all non-major dependencies (#19098) (8639538), closes #19098
- fix(optimizer): use correct default install state path for yarn PnP (#19119) (e690d8b), closes #19119
- fix(types): improve
ESBuildOptions.include / exclude
type to allowreadonly (string | RegExp)[]
(ea53e70), closes #19146- chore(deps): update dependency pathe to v2 (#19139) (71506f0), closes #19139
Commits
-
a0ed405
release: v6.0.11 -
3d03899
fix: allow CORS from loopback addresses by default (#19249) -
aeb3ec8
fix:preview.allowedHosts
with specific values was not respected (#19246) -
9654348
release: v6.0.10 -
2495022
fix: try parseserver.origin
URL (#19241) -
a55f8ba
release: v6.0.9 -
bd896fb
fix!: check host header to prevent DNS rebinding attacks and introduce `serve... -
029dcd6
fix: verify token for HMR WebSocket connection -
b09572a
fix!: defaultserver.cors: false
to disallow fetching from untrusted origins -
c0f72a6
release: v6.0.8 - Additional commits viewable in compare view
Dependabot commands
You can trigger Dependabot actions by commenting on this MR
-
$dependabot recreate
will recreate this MR rewriting all the manual changes and resolving conflicts