Skip to content

chore(deps-major): Update dependency vite to v6 [SECURITY]#25

Open
renovate[bot] wants to merge 1 commit into
mainfrom
renovate/npm-vite-vulnerability
Open

chore(deps-major): Update dependency vite to v6 [SECURITY]#25
renovate[bot] wants to merge 1 commit into
mainfrom
renovate/npm-vite-vulnerability

Conversation

@renovate

@renovate renovate Bot commented Sep 11, 2025

Copy link
Copy Markdown
Contributor

ℹ️ Note

This PR body was truncated due to platform limits.

This PR contains the following updates:

Package Change Age Confidence
vite (source) ^4.5.9^6.4.2 age confidence

Vite middleware may serve files starting with the same name with the public directory

CVE-2025-58751 / GHSA-g4jq-h2w9-997c

More information

Details

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:

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:

npm  create  vite@latest
cd vite-project/
mkdir p
cd p
ln -s a b
cd ..
echo  'import path from "node:path"; import { defineConfig } from "vite"; export default defineConfig({publicDir: path.resolve(__dirname, "p/"), server: {fs: {deny: [path.resolve(__dirname, "private.txt")]}}})' > vite.config.js
echo  "secret" > private.txt
npm install
npm run dev

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

Severity

  • CVSS Score: 2.3 / 10 (Low)
  • Vector String: CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N

References

This data is provided by the GitHub Advisory Database (CC-BY 4.0).


Vite's server.fs settings were not applied to HTML files

CVE-2025-58752 / GHSA-jqfw-vq24-v9c3

More information

Details

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:

  • explicitly exposes the Vite dev server to the network (using --host or server.host config option)
  • appType: 'spa' (default) or appType: 'mpa' is used

This 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:

npm  create  vite@latest
cd vite-project/
echo  "secret" > /tmp/secret.html
npm install
npm run dev

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:

echo  'import path from "node:path"; import { defineConfig } from "vite"; export default defineConfig({server: {fs: {deny: [path.resolve(__dirname, "secret_files/*")]}}})'  >  [vite.config.js](http://vite.config.js)
mkdir secret_files
echo "secret txt" > secret_files/secret.txt
echo "secret html" > secret_files/secret.html
npm run dev

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.

Severity

  • CVSS Score: 2.3 / 10 (Low)
  • Vector String: CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N

References

This data is provided by the GitHub Advisory Database (CC-BY 4.0).


vite allows server.fs.deny bypass via backslash on Windows

CVE-2025-62522 / GHSA-93m4-6634-74q7

More information

Details

Summary

Files denied by server.fs.deny were sent if the URL ended with \ when the dev server is running on Windows.

Impact

Only apps that match the following conditions are affected:

  • explicitly exposes the Vite dev server to the network (using --host or server.host config option)
  • running the dev server on Windows
Details

server.fs.deny can contain patterns matching against files (by default it includes .env, .env.*, *.{crt,pem} as such patterns). These patterns were able to bypass by using a back slash(\). The root cause is that fs.readFile('/foo.png/') loads /foo.png.

PoC
npm create vite@latest
cd vite-project/
cat "secret" > .env
npm install
npm run dev
curl --request-target /.env\ http://localhost:5173
image

Severity

  • CVSS Score: 6.0 / 10 (Medium)
  • Vector String: CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N

References

This data is provided by the GitHub Advisory Database (CC-BY 4.0).


Vite Vulnerable to Path Traversal in Optimized Deps .map Handling

CVE-2026-39365 / GHSA-4w7w-66w2-5vf9

More information

Details

Summary

Any files ending with .map even out side the project can be returned to the browser.

Impact

Only apps that match the following conditions are affected:

  • explicitly exposes the Vite dev server to the network (using --host or server.host config option)
  • have a sensitive content in files ending with .map and the path is predictable
Details

In Vite v7.3.1, the dev server’s handling of .map requests for optimized dependencies resolves file paths and calls readFile without restricting ../ segments in the URL. As a result, it is possible to bypass the server.fs.strict allow list and retrieve .map files located outside the project root, provided they can be parsed as valid source map JSON.

PoC
  1. Create a minimal PoC sourcemap outside the project root
    cat > /tmp/poc.map <<'EOF'
    {"version":3,"file":"x.js","sources":[],"names":[],"mappings":""}
    EOF
  2. Start the Vite dev server (example)
    pnpm -C playground/fs-serve dev --host 127.0.0.1 --port 18080
  3. Confirm that direct /@&#8203;fs access is blocked by strict (returns 403)
    image
  4. Inject ../ segments under the optimized deps .map URL prefix to reach /tmp/poc.map
    image

Severity

  • CVSS Score: 6.3 / 10 (Medium)
  • Vector String: CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N

References

This data is provided by the GitHub Advisory Database (CC-BY 4.0).


launch-editor vulnerable to command injection via the crafted request on Windows

CVE-2024-52011 / GHSA-c27g-q93r-2cwf

More information

Details

Summary

Due to the insufficient sanitization of the file argument in the launchEditor, an attacker can execute arbitrary commands on Windows by supplying a filename that contains special characters.

Impact

If the following conditions are met, an attacker can execute arbitrary commands on the computer that is using the launch-editor:

  • An attacker can place a file with the malicious filename
  • An attacker can call the launchEditor method with the file argument controlled
  • The launch-editor package is running on Windows

For example, some development server using this package satisfy these conditions, as a malicious website might be able to force the downloading of a file and the path of that file is predictable.

Patch

This issue has been fixed in the launch-editor version 2.9.0 (commit).

Severity

  • CVSS Score: 7.5 / 10 (High)
  • Vector String: CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N

References

This data is provided by the GitHub Advisory Database (CC-BY 4.0).


Release Notes

vitejs/vite (vite)

v6.4.2

Compare Source

Please refer to CHANGELOG.md for details.

v6.4.1

Compare Source

Please refer to CHANGELOG.md for details.

v6.4.0

Compare Source

Please refer to CHANGELOG.md for details.

v6.3.7

Compare Source

Please refer to CHANGELOG.md for details.

v6.3.6

Compare Source

Please refer to CHANGELOG.md for details.

v6.3.5

Compare Source

Vite 7 is out!

Today, we're excited to announce the release of the next Vite major:

⚠ BREAKING CHANGES
  • ssr: don't access Object variable in ssr transformed code (#​19996)
  • remove experimental.skipSsrTransform option (#​20038)
  • remove HotBroadcaster (#​19988)
  • css: always use sass compiler API (#​19978)
  • bump build.target and name it baseline-widely-available (#​20007)
  • bump required node version to 20.19+, 22.12+ and remove cjs build (#​20032)
  • css: remove sass legacy API support (#​19977)
  • remove deprecated HotBroadcaster related types (#​19987)
  • remove deprecated no-op type only properties (#​19985)
  • remove node 18 support (#​19972)
  • remove deprecated hook-level enforce/transform from transformIndexHtml hook (#​19349)
  • remove deprecated splitVendorChunkPlugin (#​19255)
Features
Bug Fixes
Performance Improvements
Documentation
Miscellaneous Chores
Code Refactoring
Tests
Continuous Integration
Beta Changelogs
7.0.0-beta.2 (2025-06-17)

See 7.0.0-beta.2 changelog

7.0.0-beta.1 (2025-06-10)

See 7.0.0-beta.1 changelog

7.0.0-beta.0 (2025-06-02)

See 7.0.0-beta.0 changelog

v6.3.4

Compare Source

Bug Fixes
  • check static serve file inside sirv (#​19965) (c22c43d)
  • optimizer: return plain object when using require to import externals in optimized dependencies (#​19940) (efc5eab)
Code Refactoring

v6.3.3

Compare Source

Bug Fixes
  • assets: ensure ?no-inline is not included in the asset url in the production environment (#​19496) (16a73c0)
  • css: resolve relative imports in sass properly on Windows (#​19920) (ffab442)
  • deps: update all non-major dependencies (#​19899) (a4b500e)
  • ignore malformed uris in tranform middleware (#​19853) (e4d5201)
  • ssr: fix execution order of re-export (#​19841) (ed29dee)
  • ssr: fix live binding of default export declaration and hoist exports getter (#​19842) (80a91ff)
Performance Improvements
  • skip sourcemap generation for renderChunk hook of import-analysis-build plugin (#​19921) (55cfd04)
Tests
  • ssr: test ssrTransform re-export deps and test stacktrace with first line (#​19629) (9399cda)

v6.3.2

Compare Source

Features
Bug Fixes

v6.3.1

Compare Source

Bug Fixes

v6.3.0

Compare Source

Bug Fixes

v6.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

Features
Bug Fixes
Miscellaneous Chores
  • extend commit hash correctly when ambigious with a non-commit object (#​19600) (89a6287)

v6.2.1

Compare Source

Features
  • add *?url&no-inline type and warning for .json?inline / .json?no-inline (#​19566) (c0d3667)
Bug Fixes
  • css: stabilize css module hashes with lightningcss in dev mode (#​19481) (92125b4)
  • deps: update all non-major dependencies (#​19555) (f612e0f)
  • reporter: fix incorrect bundle size calculation with non-ASCII characters (#​19561) (437c0ed)
  • sourcemap: combine sourcemaps with multiple sources without matched source (#​18971) (e3f6ae1)
  • ssr: named export should overwrite export all (#​19534) (2fd2fc1)
Performance Improvements
Miscellaneous Chores
Code Refactoring

Note

PR body was truncated to here.


Configuration

📅 Schedule: (UTC)

  • Branch creation
    • At any time (no schedule defined)
  • 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.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate Bot added the security label Sep 11, 2025
@renovate renovate Bot force-pushed the renovate/npm-vite-vulnerability branch from 8596436 to 1e46946 Compare September 25, 2025 17:04
@renovate renovate Bot changed the title chore(deps-major): Update dependency vite to v5 [SECURITY] chore(deps): Update dependency vite to ^4.5.14 [SECURITY] Sep 25, 2025
@renovate renovate Bot force-pushed the renovate/npm-vite-vulnerability branch from 1e46946 to 96d730d Compare September 25, 2025 21:49
@renovate renovate Bot changed the title chore(deps): Update dependency vite to ^4.5.14 [SECURITY] chore(deps-major): Update dependency vite to v5 [SECURITY] Sep 25, 2025
@renovate renovate Bot force-pushed the renovate/npm-vite-vulnerability branch 2 times, most recently from a8dcc8f to 8287769 Compare October 21, 2025 10:48
@renovate renovate Bot changed the title chore(deps-major): Update dependency vite to v5 [SECURITY] chore(deps): Update dependency vite to ^4.5.14 [SECURITY] Oct 21, 2025
@renovate renovate Bot force-pushed the renovate/npm-vite-vulnerability branch from 8287769 to ee40f1f Compare October 21, 2025 22:31
@renovate renovate Bot changed the title chore(deps): Update dependency vite to ^4.5.14 [SECURITY] chore(deps-major): Update dependency vite to v5 [SECURITY] Oct 21, 2025
@renovate renovate Bot force-pushed the renovate/npm-vite-vulnerability branch from ee40f1f to 5ef6c34 Compare November 10, 2025 18:54
@renovate renovate Bot changed the title chore(deps-major): Update dependency vite to v5 [SECURITY] chore(deps): Update dependency vite to ^4.5.14 [SECURITY] Nov 10, 2025
@renovate renovate Bot force-pushed the renovate/npm-vite-vulnerability branch from 5ef6c34 to 870bb20 Compare November 11, 2025 03:59
@renovate renovate Bot changed the title chore(deps): Update dependency vite to ^4.5.14 [SECURITY] chore(deps-major): Update dependency vite to v5 [SECURITY] Nov 11, 2025
@renovate renovate Bot changed the title chore(deps-major): Update dependency vite to v5 [SECURITY] chore(deps): Update dependency vite to ^4.5.14 [SECURITY] Nov 19, 2025
@renovate renovate Bot force-pushed the renovate/npm-vite-vulnerability branch 2 times, most recently from 7fdead8 to 77cdabe Compare November 19, 2025 06:03
@renovate renovate Bot changed the title chore(deps): Update dependency vite to ^4.5.14 [SECURITY] chore(deps-major): Update dependency vite to v5 [SECURITY] Nov 19, 2025
@renovate renovate Bot force-pushed the renovate/npm-vite-vulnerability branch from 77cdabe to 42d4526 Compare December 3, 2025 16:58
@renovate renovate Bot changed the title chore(deps-major): Update dependency vite to v5 [SECURITY] chore(deps): Update dependency vite to ^4.5.14 [SECURITY] Dec 3, 2025
@renovate renovate Bot force-pushed the renovate/npm-vite-vulnerability branch from 42d4526 to e9b202e Compare December 3, 2025 21:34
@renovate renovate Bot changed the title chore(deps): Update dependency vite to ^4.5.14 [SECURITY] chore(deps-major): Update dependency vite to v5 [SECURITY] Dec 3, 2025
@renovate renovate Bot force-pushed the renovate/npm-vite-vulnerability branch from e9b202e to f2142a8 Compare December 31, 2025 12:37
@renovate renovate Bot changed the title chore(deps-major): Update dependency vite to v5 [SECURITY] chore(deps): Update dependency vite to ^4.5.14 [SECURITY] Dec 31, 2025
@renovate renovate Bot force-pushed the renovate/npm-vite-vulnerability branch from f2142a8 to 7d570eb Compare December 31, 2025 22:53
@renovate renovate Bot changed the title chore(deps): Update dependency vite to ^4.5.14 [SECURITY] chore(deps-major): Update dependency vite to v5 [SECURITY] Dec 31, 2025
@renovate renovate Bot force-pushed the renovate/npm-vite-vulnerability branch from 7d570eb to 0bd29a6 Compare January 8, 2026 18:54
@renovate renovate Bot changed the title chore(deps-major): Update dependency vite to v5 [SECURITY] chore(deps): Update dependency vite to ^4.5.14 [SECURITY] Jan 8, 2026
@renovate renovate Bot force-pushed the renovate/npm-vite-vulnerability branch from 0bd29a6 to 98ec428 Compare January 8, 2026 21:59
@renovate renovate Bot changed the title chore(deps): Update dependency vite to ^4.5.14 [SECURITY] chore(deps-major): Update dependency vite to v5 [SECURITY] Jan 8, 2026
@renovate renovate Bot changed the title chore(deps): Update dependency vite to ^4.5.14 [SECURITY] chore(deps-major): Update dependency vite to v5 [SECURITY] Feb 2, 2026
@renovate renovate Bot force-pushed the renovate/npm-vite-vulnerability branch from bdb0c69 to 46cf2f3 Compare February 12, 2026 18:11
@renovate renovate Bot changed the title chore(deps-major): Update dependency vite to v5 [SECURITY] chore(deps): Update dependency vite to ^4.5.14 [SECURITY] Feb 12, 2026
@renovate renovate Bot force-pushed the renovate/npm-vite-vulnerability branch from 46cf2f3 to da1d61a Compare February 12, 2026 23:29
@renovate renovate Bot changed the title chore(deps): Update dependency vite to ^4.5.14 [SECURITY] chore(deps-major): Update dependency vite to v5 [SECURITY] Feb 12, 2026
@renovate renovate Bot force-pushed the renovate/npm-vite-vulnerability branch from da1d61a to 2aa3ff5 Compare February 17, 2026 14:13
@renovate renovate Bot changed the title chore(deps-major): Update dependency vite to v5 [SECURITY] chore(deps): Update dependency vite to ^4.5.14 [SECURITY] Feb 17, 2026
@renovate renovate Bot force-pushed the renovate/npm-vite-vulnerability branch from 2aa3ff5 to 4166d96 Compare February 17, 2026 21:46
@renovate renovate Bot changed the title chore(deps): Update dependency vite to ^4.5.14 [SECURITY] chore(deps-major): Update dependency vite to v5 [SECURITY] Feb 17, 2026
@renovate renovate Bot force-pushed the renovate/npm-vite-vulnerability branch from 4166d96 to 0743f19 Compare March 5, 2026 17:39
@renovate renovate Bot changed the title chore(deps-major): Update dependency vite to v5 [SECURITY] chore(deps): Update dependency vite to ^4.5.14 [SECURITY] Mar 5, 2026
@renovate renovate Bot force-pushed the renovate/npm-vite-vulnerability branch from 0743f19 to 8dc0921 Compare March 5, 2026 23:35
@renovate renovate Bot changed the title chore(deps): Update dependency vite to ^4.5.14 [SECURITY] chore(deps-major): Update dependency vite to v5 [SECURITY] Mar 5, 2026
@renovate renovate Bot force-pushed the renovate/npm-vite-vulnerability branch from 8dc0921 to 11f16ed Compare March 13, 2026 13:49
@renovate renovate Bot changed the title chore(deps-major): Update dependency vite to v5 [SECURITY] chore(deps): Update dependency vite to ^4.5.14 [SECURITY] Mar 13, 2026
@renovate renovate Bot force-pushed the renovate/npm-vite-vulnerability branch from 11f16ed to aff3a0c Compare March 13, 2026 21:01
@renovate renovate Bot changed the title chore(deps): Update dependency vite to ^4.5.14 [SECURITY] chore(deps-major): Update dependency vite to v5 [SECURITY] Mar 13, 2026
@renovate renovate Bot changed the title chore(deps-major): Update dependency vite to v5 [SECURITY] chore(deps-major): Update dependency vite to v5 [SECURITY] - autoclosed Mar 27, 2026
@renovate renovate Bot closed this Mar 27, 2026
@renovate renovate Bot deleted the renovate/npm-vite-vulnerability branch March 27, 2026 02:07
@renovate renovate Bot changed the title chore(deps-major): Update dependency vite to v5 [SECURITY] - autoclosed chore(deps-major): Update dependency vite to v5 [SECURITY] Mar 30, 2026
@renovate renovate Bot reopened this Mar 30, 2026
@renovate renovate Bot force-pushed the renovate/npm-vite-vulnerability branch 2 times, most recently from 3b84ade to 6461d3b Compare April 1, 2026 17:52
@renovate renovate Bot changed the title chore(deps-major): Update dependency vite to v5 [SECURITY] chore(deps): Update dependency vite to ^4.5.14 [SECURITY] Apr 1, 2026
@renovate renovate Bot force-pushed the renovate/npm-vite-vulnerability branch from 6461d3b to 2258432 Compare April 1, 2026 22:48
@renovate renovate Bot changed the title chore(deps): Update dependency vite to ^4.5.14 [SECURITY] chore(deps-major): Update dependency vite to v5 [SECURITY] Apr 1, 2026
@renovate renovate Bot force-pushed the renovate/npm-vite-vulnerability branch from 2258432 to 710c147 Compare April 8, 2026 18:46
@renovate renovate Bot changed the title chore(deps-major): Update dependency vite to v5 [SECURITY] chore(deps): Update dependency vite to ^4.5.14 [SECURITY] Apr 8, 2026
| datasource | package | from  | to    |
| ---------- | ------- | ----- | ----- |
| npm        | vite    | 4.5.9 | 6.4.2 |
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants