canonical / specs.canonical.com

2 stars 9 forks source link

chore(deps): update dependency vite to v4.0.5 [security] #143

Closed renovate[bot] closed 1 year ago

renovate[bot] commented 1 year ago

Mend Renovate

This PR contains the following updates:

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

GitHub Vulnerability Alerts

CVE-2023-34092

Summary

Vite Server Options (server.fs.deny) can be bypassed using double forward-slash (//) allows any unauthenticated user to read file from the Vite root-path of the application including the default fs.deny settings (['.env', '.env.*', '*.{crt,pem}'])

Impact

Only users explicitly exposing the Vite dev server to the network (using --host or server.host config option) are affected, and only files in the immediate Vite project root folder could be exposed.

Patches

Fixed in vite@4.3.9, vite@4.2.3, vite@4.1.5, vite@4.0.5 And in the latest minors of the previous two majors: vite@3.2.7, vite@2.9.16

Details

Vite serve the application with under the root-path of the project while running on the dev mode. By default, vite using server options fs.deny to protected the sensitive information of the file. But, with simply double forward-slash, we can bypass this fs restriction.

PoC

  1. Create a new latest project of vite using any package manager. (here I'm using react and vue templates for tested and pnpm)
  2. Serve the application on dev mode using pnpm run dev.
  3. Directly access the file from url using double forward-slash (//) (e.g: //.env, //.env.local)
  4. Server Options fs.deny restrict successfully bypassed.

Proof Images: proof-1 proof-2


Release Notes

vitejs/vite ### [`v4.0.5`](https://togithub.com/vitejs/vite/releases/tag/v4.0.5) [Compare Source](https://togithub.com/vitejs/vite/compare/v4.0.4...v4.0.5) Please refer to [CHANGELOG.md](https://togithub.com/vitejs/vite/blob/v4.0.5/packages/vite/CHANGELOG.md) for details. ### [`v4.0.4`](https://togithub.com/vitejs/vite/blob/HEAD/packages/vite/CHANGELOG.md#small404-2023-01-03-small) [Compare Source](https://togithub.com/vitejs/vite/compare/v4.0.3...v4.0.4) - fix: importmap should insert before module preload link ([#​11492](https://togithub.com/vitejs/vite/issues/11492)) ([25c64d7](https://togithub.com/vitejs/vite/commit/25c64d7)), closes [#​11492](https://togithub.com/vitejs/vite/issues/11492) - fix: server.host with ipv6 missed \[] (fix [#​11466](https://togithub.com/vitejs/vite/issues/11466)) ([#​11509](https://togithub.com/vitejs/vite/issues/11509)) ([2c38bae](https://togithub.com/vitejs/vite/commit/2c38bae)), closes [#​11466](https://togithub.com/vitejs/vite/issues/11466) [#​11509](https://togithub.com/vitejs/vite/issues/11509) - fix: stop considering parent URLs as public file ([#​11145](https://togithub.com/vitejs/vite/issues/11145)) ([568a014](https://togithub.com/vitejs/vite/commit/568a014)), closes [#​11145](https://togithub.com/vitejs/vite/issues/11145) - fix(build): invalidate chunk hash when css changed ([#​11475](https://togithub.com/vitejs/vite/issues/11475)) ([7a97a04](https://togithub.com/vitejs/vite/commit/7a97a04)), closes [#​11475](https://togithub.com/vitejs/vite/issues/11475) - fix(cli): ctrl+C no longer kills processes ([#​11434](https://togithub.com/vitejs/vite/issues/11434)) ([#​11518](https://togithub.com/vitejs/vite/issues/11518)) ([718fc1d](https://togithub.com/vitejs/vite/commit/718fc1d)), closes [#​11434](https://togithub.com/vitejs/vite/issues/11434) [#​11518](https://togithub.com/vitejs/vite/issues/11518) - fix(cli): revert ctrl+C no longer kills processes ([#​11434](https://togithub.com/vitejs/vite/issues/11434)) ([#​11518](https://togithub.com/vitejs/vite/issues/11518)) ([#​11562](https://togithub.com/vitejs/vite/issues/11562)) ([3748acb](https://togithub.com/vitejs/vite/commit/3748acb)), closes [#​11434](https://togithub.com/vitejs/vite/issues/11434) [#​11518](https://togithub.com/vitejs/vite/issues/11518) [#​11562](https://togithub.com/vitejs/vite/issues/11562) - fix(optimizer): check .vite/deps directory existence before removing ([#​11499](https://togithub.com/vitejs/vite/issues/11499)) ([1b043f9](https://togithub.com/vitejs/vite/commit/1b043f9)), closes [#​11499](https://togithub.com/vitejs/vite/issues/11499) - fix(ssr): emit js sourcemaps for ssr builds ([#​11343](https://togithub.com/vitejs/vite/issues/11343)) ([f12a1ab](https://togithub.com/vitejs/vite/commit/f12a1ab)), closes [#​11343](https://togithub.com/vitejs/vite/issues/11343) - chore: update license ([#​11476](https://togithub.com/vitejs/vite/issues/11476)) ([3d346c0](https://togithub.com/vitejs/vite/commit/3d346c0)), closes [#​11476](https://togithub.com/vitejs/vite/issues/11476) - chore(deps): update dependency [@​rollup/plugin-json](https://togithub.com/rollup/plugin-json) to v6 ([#​11553](https://togithub.com/vitejs/vite/issues/11553)) ([3647d07](https://togithub.com/vitejs/vite/commit/3647d07)), closes [#​11553](https://togithub.com/vitejs/vite/issues/11553)

Configuration

📅 Schedule: Branch creation - "" (UTC), Automerge - At any time (no schedule defined).

🚦 Automerge: Enabled.

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.



This PR has been generated by Mend Renovate. View repository job log here.

webteam-app commented 1 year ago

Demo starting at https://specs-canonical-com-143.demos.haus