Skip to content
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 v6.2.5 [security] #2229

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Mar 25, 2025

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
vite (source) 6.2.3 -> 6.2.5 age adoption passing confidence

GitHub Vulnerability Alerts

CVE-2025-31125

Summary

The contents of arbitrary files can be returned to the browser.

Impact

Only apps explicitly exposing the Vite dev server to the network (using --host or server.host config option) are affected.

Details

  • base64 encoded content of non-allowed files is exposed using ?inline&import (originally reported as ?import&?inline=1.wasm?init)
  • content of non-allowed files is exposed using ?raw?import

/@​fs/ isn't needed to reproduce the issue for files inside the project root.

PoC

Original report (check details above for simplified cases):

The ?import&?inline=1.wasm?init ending allows attackers to read arbitrary files and returns the file content if it exists. Base64 decoding needs to be performed twice

$ npm create vite@latest
$ cd vite-project/
$ npm install
$ npm run dev

Example full URL http://localhost:5173/@​fs/C:/windows/win.ini?import&?inline=1.wasm?init

CVE-2025-31486

Summary

The contents of arbitrary files can be returned to the browser.

Impact

Only apps explicitly exposing the Vite dev server to the network (using --host or server.host config option) are affected..

Details

.svg

Requests ending with .svg are loaded at this line.
https://github.com/vitejs/vite/blob/037f801075ec35bb6e52145d659f71a23813c48f/packages/vite/src/node/plugins/asset.ts#L285-L290
By adding ?.svg with ?.wasm?init or with sec-fetch-dest: script header, the restriction was able to bypass.

This bypass is only possible if the file is smaller than build.assetsInlineLimit (default: 4kB) and when using Vite 6.0+.

relative paths

The check was applied before the id normalization. This allowed requests to bypass with relative paths (e.g. ../../).

PoC

npm create vite@latest
cd vite-project/
npm install
npm run dev

send request to read etc/passwd

curl 'http://127.0.0.1:5173/etc/passwd?.svg?.wasm?init'
curl 'http://127.0.0.1:5173/@​fs/x/x/x/vite-project/?/../../../../../etc/passwd?import&?raw'

Release Notes

vitejs/vite (vite)

v6.2.5

Compare Source

Please refer to CHANGELOG.md for details.

v6.2.4

Compare Source

Please refer to CHANGELOG.md for details.


Configuration

📅 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 becomes conflicted, 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 March 25, 2025 15:14
@renovate renovate bot requested a review from drwpow March 25, 2025 15:14
Copy link

changeset-bot bot commented Mar 25, 2025

⚠️ No Changeset found

Latest commit: 9d50c91

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link
Contributor

github-actions bot commented Mar 25, 2025

size-limit report 📦

Path Size
packages/openapi-fetch/dist/index.min.js 6.55 KB (0%)

Copy link

netlify bot commented Mar 25, 2025

Deploy Preview for openapi-ts canceled.

Name Link
🔨 Latest commit 9d50c91
🔍 Latest deploy log https://app.netlify.com/sites/openapi-ts/deploys/67ebc22f908ee60008db9ad0

@renovate renovate bot changed the title chore(deps): update dependency vite to v6.2.3 [security] chore(deps): update dependency vite to v6.2.3 [security] - autoclosed Mar 25, 2025
@renovate renovate bot closed this Mar 25, 2025
@renovate renovate bot deleted the renovate/npm-vite-vulnerability branch March 25, 2025 15:22
@renovate renovate bot changed the title chore(deps): update dependency vite to v6.2.3 [security] - autoclosed chore(deps): update dependency vite to v6.2.3 [security] Mar 31, 2025
@renovate renovate bot reopened this Mar 31, 2025
@renovate renovate bot changed the title chore(deps): update dependency vite to v6.2.3 [security] chore(deps): update dependency vite to v6.2.4 [security] Mar 31, 2025
@renovate renovate bot force-pushed the renovate/npm-vite-vulnerability branch from f6fa5b7 to eb000b8 Compare March 31, 2025 22:55
@renovate renovate bot force-pushed the renovate/npm-vite-vulnerability branch from eb000b8 to 9d50c91 Compare April 1, 2025 10:38
@renovate renovate bot changed the title chore(deps): update dependency vite to v6.2.4 [security] chore(deps): update dependency vite to v6.2.5 [security] Apr 4, 2025
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.

0 participants