Skip to content

chore(deps): update dependency vite to v7.3.2 [security]#690

Open
renovate[bot] wants to merge 1 commit intomainfrom
renovate/auto-npm-vite-vulnerability
Open

chore(deps): update dependency vite to v7.3.2 [security]#690
renovate[bot] wants to merge 1 commit intomainfrom
renovate/auto-npm-vite-vulnerability

Conversation

@renovate
Copy link
Copy Markdown
Contributor

@renovate renovate Bot commented Oct 20, 2025

This PR contains the following updates:

Package Change Age Confidence
vite (source) 7.1.77.3.2 age confidence

Warning

Some dependencies could not be looked up. Check the warning logs for more information.


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 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 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 Arbitrary File Read via Vite Dev Server WebSocket

CVE-2026-39363 / GHSA-p9ff-h696-f583

More information

Details

Summary

server.fs check was not enforced to the fetchModule method that is exposed in Vite dev server's WebSocket.

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)
  • WebSocket is not disabled by server.ws: false

Arbitrary files on the server (development machine, CI environment, container, etc.) can be exposed.

Details

If it is possible to connect to the Vite dev server’s WebSocket without an Origin header, an attacker can invoke fetchModule via the custom WebSocket event vite:invoke and combine file://... with ?raw (or ?inline) to retrieve the contents of arbitrary files on the server as a JavaScript string (e.g., export default "...").

The access control enforced in the HTTP request path (such as server.fs.allow) is not applied to this WebSocket-based execution path.

PoC
  1. Start the dev server on the target
    Example (used during validation with this repository):

    pnpm -C playground/alias exec vite --host 0.0.0.0 --port 5173
  2. Confirm that access is blocked via the HTTP path (example: arbitrary file)

    curl -i 'http://localhost:5173/@​fs/etc/passwd?raw'

    Result: 403 Restricted (outside the allow list)
    image

  3. Confirm that the same file can be retrieved via the WebSocket path
    By connecting to the HMR WebSocket without an Origin header and sending a vite:invoke request that calls fetchModule with a file://... URL and ?raw, the file contents are returned as a JavaScript module.

image image

Severity

  • CVSS Score: 8.2 / 10 (High)
  • Vector String: CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/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).


Vite: server.fs.deny bypassed with queries

CVE-2026-39364 / GHSA-v2wj-q39q-566r

More information

Details

Summary

The contents of files that are specified by server.fs.deny can be returned to the browser.

Impact

Only apps that match the following conditions are affected:

Details

On the Vite dev server, files that should be blocked by server.fs.deny (e.g., .env, *.crt) can be retrieved with HTTP 200 responses when query parameters such as ?raw, ?import&raw, or ?import&url&inline are appended.

PoC
  1. Start the dev server: pnpm exec vite root --host 127.0.0.1 --port 5175 --strictPort
  2. Confirm that server.fs.deny is enforced (expect 403): curl -i http://127.0.0.1:5175/src/.env | head -n 20
    image
  3. Confirm that the same files can be retrieved with query parameters (expect 200):
    image

Severity

  • CVSS Score: 8.2 / 10 (High)
  • Vector String: CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/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).


Release Notes

vitejs/vite (vite)

v7.3.2

Compare Source

Please refer to CHANGELOG.md for details.

v7.3.1

Compare Source

Please refer to CHANGELOG.md for details.

v7.3.0

Compare Source

Please refer to CHANGELOG.md for details.

v7.2.7

Compare Source

v7.2.6

Compare Source

7.2.6 (2025-12-01)

v7.2.4

Compare Source

Bug Fixes

v7.2.3

Compare Source

Bug Fixes
Performance Improvements
Miscellaneous Chores

v7.2.2

Compare Source

Bug Fixes

v7.2.1

Compare Source

Bug Fixes
Code Refactoring

v7.2.0

Compare Source

Bug Fixes
  • css: fallback to sass when sass-embedded platform binary is missing (#​21002) (b1fd616)
  • module-runner: make getBuiltins response JSON serializable (#​21029) (ad5b3bf)
  • types: add undefined to optional properties for exactOptionalProperties type compatibility (#​21040) (2833c55)
Miscellaneous Chores

v7.1.12

Compare Source

Please refer to CHANGELOG.md for details.

v7.1.11

Compare Source

Bug Fixes
Miscellaneous Chores
Code Refactoring
Build System

v7.1.10

Compare Source

Bug Fixes
Documentation
Miscellaneous Chores

v7.1.9

Compare Source

Reverts

v7.1.8

Compare Source

Bug Fixes
Documentation
Miscellaneous Chores

Configuration

📅 Schedule: (in timezone Europe/London)

  • Branch creation
    • ""
  • Automerge
    • At any time (no schedule defined)

🚦 Automerge: Enabled.

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 requested a review from a team as a code owner October 20, 2025 22:44
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Oct 20, 2025

Coverage Report for UI Test Coverage (./ui)

Status Category Percentage Covered / Total
🔵 Lines 99.55% 5421 / 5445
🔵 Statements 99.55% 5421 / 5445
🔵 Functions 96.2% 203 / 211
🔵 Branches 95.79% 775 / 809
File CoverageNo changed files found.
Generated in workflow #2056 for commit 86236c4 by the Vitest Coverage Report Action

@renovate renovate Bot force-pushed the renovate/auto-npm-vite-vulnerability branch from 3ddd8af to 42d4c63 Compare October 25, 2025 03:51
@renovate renovate Bot force-pushed the renovate/auto-npm-vite-vulnerability branch from 42d4c63 to f750418 Compare October 25, 2025 04:09
@renovate renovate Bot force-pushed the renovate/auto-npm-vite-vulnerability branch from f750418 to 85199a0 Compare October 29, 2025 01:27
@renovate renovate Bot force-pushed the renovate/auto-npm-vite-vulnerability branch from 85199a0 to f72e0df Compare October 29, 2025 20:05
@renovate renovate Bot force-pushed the renovate/auto-npm-vite-vulnerability branch from f72e0df to c945e65 Compare November 1, 2025 01:08
@renovate renovate Bot force-pushed the renovate/auto-npm-vite-vulnerability branch from c945e65 to c969763 Compare November 1, 2025 01:25
@renovate renovate Bot force-pushed the renovate/auto-npm-vite-vulnerability branch from c969763 to bce2fba Compare November 5, 2025 00:28
@renovate renovate Bot force-pushed the renovate/auto-npm-vite-vulnerability branch from bce2fba to 20d07f1 Compare November 15, 2025 03:56
@renovate renovate Bot force-pushed the renovate/auto-npm-vite-vulnerability branch from 20d07f1 to f52c32f Compare November 15, 2025 04:13
@renovate renovate Bot force-pushed the renovate/auto-npm-vite-vulnerability branch from f52c32f to c39dde4 Compare November 15, 2025 04:30
@renovate renovate Bot force-pushed the renovate/auto-npm-vite-vulnerability branch from c39dde4 to a1ff250 Compare November 19, 2025 03:39
@renovate renovate Bot force-pushed the renovate/auto-npm-vite-vulnerability branch from a1ff250 to b03d8c5 Compare November 19, 2025 03:55
@renovate renovate Bot force-pushed the renovate/auto-npm-vite-vulnerability branch from b03d8c5 to c36b682 Compare November 19, 2025 06:56
canonical-iam
canonical-iam previously approved these changes Feb 11, 2026
@renovate renovate Bot force-pushed the renovate/auto-npm-vite-vulnerability branch from 942d72e to b4b784d Compare February 18, 2026 21:11
@renovate renovate Bot force-pushed the renovate/auto-npm-vite-vulnerability branch from b4b784d to 5586048 Compare February 25, 2026 14:03
canonical-iam
canonical-iam previously approved these changes Mar 13, 2026
@renovate renovate Bot force-pushed the renovate/auto-npm-vite-vulnerability branch 2 times, most recently from f0855e8 to 0e3495e Compare March 19, 2026 02:54
@renovate renovate Bot changed the title chore(deps): update dependency vite to v7.1.11 [security] chore(deps): update dependency vite to v7.1.11 [security] - autoclosed Mar 27, 2026
@renovate renovate Bot closed this Mar 27, 2026
auto-merge was automatically disabled March 27, 2026 03:43

Pull request was closed

@renovate renovate Bot deleted the renovate/auto-npm-vite-vulnerability branch March 27, 2026 03:43
@renovate renovate Bot changed the title chore(deps): update dependency vite to v7.1.11 [security] - autoclosed chore(deps): update dependency vite to v7.1.11 [security] Mar 30, 2026
@renovate renovate Bot reopened this Mar 30, 2026
@renovate renovate Bot force-pushed the renovate/auto-npm-vite-vulnerability branch from 882ac8a to 0e3495e Compare March 30, 2026 19:11
@canonical-iam canonical-iam enabled auto-merge March 30, 2026 19:11
canonical-iam
canonical-iam previously approved these changes Mar 30, 2026
canonical-iam
canonical-iam previously approved these changes Mar 30, 2026
canonical-iam
canonical-iam previously approved these changes Apr 6, 2026
canonical-iam
canonical-iam previously approved these changes Apr 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant