-
Notifications
You must be signed in to change notification settings - Fork 670
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
chore(deps): update dependency vite to v5.2.14 [security] #1729
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
4b00f7f
to
eca0444
Compare
eca0444
to
dea248c
Compare
dea248c
to
da3d627
Compare
da3d627
to
62d70d5
Compare
62d70d5
to
3a23732
Compare
3a23732
to
ef513a5
Compare
ef513a5
to
1055382
Compare
1055382
to
6a41cee
Compare
60749bc
to
2ac5e09
Compare
2ac5e09
to
7875f4b
Compare
7875f4b
to
b424a58
Compare
b424a58
to
9d99b09
Compare
9d99b09
to
303331b
Compare
a5fdbe1
to
b4c7b18
Compare
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: gabriel miranda <gabrielmfern@outlook.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: gabriel miranda <gabrielmfern@outlook.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: gabriel miranda <gabrielmfern@outlook.com>
This PR contains the following updates:
5.1.8
->5.2.14
GitHub Vulnerability Alerts
CVE-2024-31207
Summary
Vite dev server option
server.fs.deny
did not deny requests for patterns with directories. An example of such a pattern is/foo/**/*
.Impact
Only apps setting a custom
server.fs.deny
that includes a pattern with directories, and explicitly exposing the Vite dev server to the network (using--host
orserver.host
config option) are affected.Patches
Fixed in vite@5.2.6, vite@5.1.7, vite@5.0.13, vite@4.5.3, vite@3.2.10, vite@2.9.18
Details
server.fs.deny
uses picomatch with the config of{ matchBase: true }
. matchBase only matches the basename of the file, not the path due to a bug (https://github.com/micromatch/picomatch/issues/89). The vite config docs read like you should be able to set fs.deny to glob with picomatch. Vite also does not set{ dot: true }
and that causes dotfiles not to be denied unless they are explicitly defined.Reproduction
Set fs.deny to
['**/.git/**']
and then curl for/.git/config
.matchBase: true
, you can get any file under.git/
(config, HEAD, etc).matchBase: false
, you cannot get any file under.git/
(config, HEAD, etc).CVE-2024-45812
Summary
We discovered a DOM Clobbering vulnerability in Vite when building scripts to
cjs
/iife
/umd
output format. The DOM Clobbering gadget in the module can lead to cross-site scripting (XSS) in web pages where scriptless attacker-controlled HTML elements (e.g., an img tag with an unsanitized name attribute) are present.Note that, we have identified similar security issues in Webpack: GHSA-4vvj-4cpr-p986
Details
Backgrounds
DOM Clobbering is a type of code-reuse attack where the attacker first embeds a piece of non-script, seemingly benign HTML markups in the webpage (e.g. through a post or comment) and leverages the gadgets (pieces of js code) living in the existing javascript code to transform it into executable code. More for information about DOM Clobbering, here are some references:
[1] https://scnps.co/papers/sp23_domclob.pdf
[2] https://research.securitum.com/xss-in-amp4email-dom-clobbering/
Gadgets found in Vite
We have identified a DOM Clobbering vulnerability in Vite bundled scripts, particularly when the scripts dynamically import other scripts from the assets folder and the developer sets the build output format to
cjs
,iife
, orumd
. In such cases, Vite replaces relative paths starting with__VITE_ASSET__
using the URL retrieved fromdocument.currentScript
.However, this implementation is vulnerable to a DOM Clobbering attack. The
document.currentScript
lookup can be shadowed by an attacker via the browser's named DOM tree element access mechanism. This manipulation allows an attacker to replace the intended script element with a malicious HTML element. When this happens, the src attribute of the attacker-controlled element is used as the URL for importing scripts, potentially leading to the dynamic loading of scripts from an attacker-controlled server.PoC
Considering a website that contains the following
main.js
script, the devloper decides to use the Vite to bundle up the program with the following configuration.After running the build command, the developer will get following bundle as the output.
Adding the Vite bundled script,
dist/index-DDmIg9VD.js
, as part of the web page source code, the page could load theextra.js
file from the attacker's domain,attacker.controlled.server
. The attacker only needs to insert animg
tag with thename
attribute set tocurrentScript
. This can be done through a website's feature that allows users to embed certain script-less HTML (e.g., markdown renderers, web email clients, forums) or via an HTML injection vulnerability in third-party JavaScript loaded on the page.Impact
This vulnerability can result in cross-site scripting (XSS) attacks on websites that include Vite-bundled files (configured with an output format of
cjs
,iife
, orumd
) and allow users to inject certain scriptless HTML tags without properly sanitizing the name or id attributes.Patch
CVE-2024-45811
Summary
The contents of arbitrary files can be returned to the browser.
Details
@fs
denies access to files outside of Vite serving allow list. Adding?import&raw
to the URL bypasses this limitation and returns the file content if it exists.PoC
Release Notes
vitejs/vite (vite)
v5.2.14
Compare Source
Please refer to CHANGELOG.md for details.
v5.2.13
Compare Source
Please refer to CHANGELOG.md for details.
v5.2.12
Compare Source
build.rollupOptions.output.manualChunks
instead ofbuild.rollupOutput.manualChunks
(89378c0), closes #16721v5.2.11
Compare Source
v5.2.10
Compare Source
v5.2.9
Compare Source
fsp.rm
removing files does not take effect (#16032) (b05c405), closes #16032v5.2.8
Compare Source
/@​vite/client
when not defined (#16318) (646319c), closes #16318define
value (#15805) (445c4f2), closes #15805v5.2.7
Compare Source
__vite__mapDeps
when it's not used (#16271) (890538a), closes #16271v5.2.6
Compare Source
fs.deny
with globs with directories (#16250) (ba5269c), closes #16250v5.2.5
Compare Source
v5.2.4
Compare Source
v5.2.3
Compare Source
optimizeDeps.include
glob syntax for./*
exports (#16230) (f184c80), closes #16230prepareStackTrace
(#16220) (dad7f4f), closes #16220utf8
replaced withutf-8
(#16232) (9800c73), closes #16232v5.2.2
Compare Source
v5.2.1
Compare Source
v5.2.0
Compare Source
,
inside query parameter of image URI in srcset property (#16081) (50caf67), closes #16081@shikiji/vitepress-twoslash
(#16168) (6f8a320), closes #16168Configuration
📅 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 is behind base branch, 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.