Skip to content

chore(deps): update dependency vite@>=5.0.0 <5.4.12 to v6 [security] - autoclosed#929

Closed
renovate[bot] wants to merge 1 commit intomasterfrom
renovate/npm-vite>=5.0.0-<5.4.12-vulnerability
Closed

chore(deps): update dependency vite@&gt;&#x3d;5.0.0 &lt;5.4.12 to v6 [security] - autoclosed#929
renovate[bot] wants to merge 1 commit intomasterfrom
renovate/npm-vite>=5.0.0-<5.4.12-vulnerability

Conversation

@renovate
Copy link
Copy Markdown
Contributor

@renovate renovate bot commented Mar 25, 2025

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
vite@>=5.0.0 <5.4.12 (source) [^5.4.12 -> ^6.0.13](https://renovatebot.com/diffs/npm/vite@&gt;&#x3D;5.0.0 <5.4.12/5.4.12/6.0.13) age adoption passing confidence

GitHub Vulnerability Alerts

CVE-2025-30208

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

@fs denies access to files outside of Vite serving allow list. Adding ?raw?? or ?import&raw?? to the URL bypasses this limitation and returns the file content if it exists. This bypass exists because trailing separators such as ? are removed in several places, but are not accounted for in query string regexes.

PoC

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

$ echo "top secret content" > /tmp/secret.txt

# expected behaviour
$ curl "http://localhost:5173/@&#8203;fs/tmp/secret.txt"

    <body>
      <h1>403 Restricted</h1>
      <p>The request url &quot;/tmp/secret.txt&quot; is outside of Vite serving allow list.

# security bypassed
$ curl "http://localhost:5173/@&#8203;fs/tmp/secret.txt?import&raw??"
export default "top secret content\n"
//# sourceMappingURL=data:application/json;base64,eyJ2...

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

/@&#8203;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/@&#8203;fs/C:/windows/win.ini?import&?inline=1.wasm?init


Release Notes

vitejs/vite (vite@>=5.0.0 <5.4.12)

v6.0.13

Compare Source

Please refer to CHANGELOG.md for details.

v6.0.12

Compare Source

Please refer to CHANGELOG.md for details.

v6.0.11

Compare Source

v6.0.10

Compare Source

v6.0.9

Compare Source

  • 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)

v6.0.8

Compare Source

v6.0.7

Compare Source

v6.0.6

Compare Source

v6.0.5

Compare Source

v6.0.4

Compare Source

v6.0.3

Compare Source

v6.0.2

Compare Source

v6.0.1

Compare Source

v6.0.0

Compare Source

Vite 6 is out!

Today, we're taking another big step in Vite's story. The Vite team, contributors, and ecosystem partners are excited to announce the release of the next Vite major:

We want to thank the more than 1K contributors to Vite Core and the maintainers and contributors of Vite plugins, integrations, tools, and translations that have helped us craft this new major. We invite you to get involved and help us improve Vite for the whole ecosystem. Learn more at our Contributing Guide.

Breaking Changes
Features
Performance
Fixes

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 force-pushed the renovate/npm-vite>=5.0.0-<5.4.12-vulnerability branch 2 times, most recently from 68bcec3 to 015b11b Compare April 1, 2025 11:43
@renovate renovate bot force-pushed the renovate/npm-vite>=5.0.0-<5.4.12-vulnerability branch from 015b11b to 04ef7fd Compare April 1, 2025 16:49
@renovate
Copy link
Copy Markdown
Contributor Author

renovate bot commented Apr 1, 2025

⚠️ Artifact update problem

Renovate failed to update an artifact related to this branch. You probably do not want to merge this PR as-is.

♻ Renovate will retry this branch, including artifacts, only when one of the following happens:

  • any of the package files in this branch needs updating, or
  • the branch becomes conflicted, or
  • you click the rebase/retry checkbox if found above, or
  • you rename this PR's title to start with "rebase!" to trigger it manually

The artifact failure details are included below:

File name: pnpm-lock.yaml
Scope: all 23 workspace projects
Progress: resolved 1, reused 0, downloaded 0, added 0
packages/browser                         |  WARN  deprecated eslint@8.57.0
Progress: resolved 28, reused 0, downloaded 0, added 0
packages/next-server-actions-sample      |  WARN  deprecated eslint@8.50.0
Progress: resolved 56, reused 0, downloaded 0, added 0
Progress: resolved 100, reused 0, downloaded 0, added 0
Progress: resolved 114, reused 0, downloaded 0, added 0
Progress: resolved 267, reused 0, downloaded 0, added 0
/tmp/renovate/repos/github/logto-io/js/packages/client:
 ERR_PNPM_FETCH_403  GET https://registry.npmjs.org/camelcase: Forbidden - 403

This error happened while installing the dependencies of camelcase-keys@9.1.3

No authorization header was set for the request.

No authorization settings were found in the configs.
Try to log in to the registry by running "pnpm login"
or add the auth tokens manually to the ~/.npmrc file.

@renovate renovate bot changed the title chore(deps): update dependency vite@&gt;&#x3d;5.0.0 &lt;5.4.12 to v6 [security] chore(deps): update dependency vite@&gt;&#x3d;5.0.0 &lt;5.4.12 to v6 [security] - autoclosed Apr 2, 2025
@renovate renovate bot closed this Apr 2, 2025
@renovate renovate bot deleted the renovate/npm-vite>=5.0.0-<5.4.12-vulnerability branch April 2, 2025 03:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

0 participants