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 v4.5.2 [security] #2524

Merged
merged 1 commit into from
Jan 23, 2024

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Jan 20, 2024

Mend Renovate

This PR contains the following updates:

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

GitHub Vulnerability Alerts

CVE-2024-23331

Summary

Vite dev server option server.fs.deny can be bypassed on case-insensitive file systems using case-augmented versions of filenames. Notably this affects servers hosted on Windows.

This bypass is similar to https://nvd.nist.gov/vuln/detail/CVE-2023-34092 -- with surface area reduced to hosts having case-insensitive filesystems.

Patches

Fixed in [email protected], [email protected], [email protected], [email protected]

Details

Since picomatch defaults to case-sensitive glob matching, but the file server doesn't discriminate; a blacklist bypass is possible.

See picomatch usage, where nocase is defaulted to false: https://github.com/vitejs/vite/blob/v5.1.0-beta.1/packages/vite/src/node/server/index.ts#L632

By requesting raw filesystem paths using augmented casing, the matcher derived from config.server.fs.deny fails to block access to sensitive files.

PoC

Setup

  1. Created vanilla Vite project using npm create vite@latest on a Standard Azure hosted Windows 10 instance.
  2. Created dummy secret files, e.g. custom.secret and production.pem
  3. Populated vite.config.js with
export default { server: { fs: { deny: ['.env', '.env.*', '*.{crt,pem}', 'custom.secret'] } } }

Reproduction

  1. curl -s http://20.12.242.81:5173/@​fs//
    • Descriptive error page reveals absolute filesystem path to project root
  2. curl -s http://20.12.242.81:5173/@​fs/C:/Users/darbonzo/Desktop/vite-project/vite.config.js
    • Discoverable configuration file reveals locations of secrets
  3. curl -s http://20.12.242.81:5173/@​fs/C:/Users/darbonzo/Desktop/vite-project/custom.sEcReT
    • Secrets are directly accessible using case-augmented version of filename

Proof
Screenshot 2024-01-19 022736

Impact

Who

  • Users with exposed dev servers on environments with case-insensitive filesystems

What

  • Files protected by server.fs.deny are both discoverable, and accessible

Release Notes

vitejs/vite (vite)

v4.5.2

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 has been generated by Mend Renovate. View repository job log here.

@renovate renovate bot requested a review from marcperez as a code owner January 20, 2024 06:01
@renovate renovate bot added the Dependencies Issue with a project dependency or associated system label Jan 20, 2024
Copy link

changeset-bot bot commented Jan 20, 2024

⚠️ No Changeset found

Latest commit: 1480148

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

Size Change: +6 B (0%)

Total Size: 1.12 MB

Filename Size Change
packages/lib/dist/cjs/index.js 257 kB +1 B (0%)
packages/lib/dist/es.modern/index.js 121 kB +2 B (0%)
packages/lib/dist/es/index.js 141 kB +3 B (0%)
ℹ️ View Unchanged
Filename Size
packages/lib/dist/adyen.js 297 kB
packages/lib/dist/es.modern/ar.js 6.92 kB
packages/lib/dist/es.modern/cs-CZ.js 6.17 kB
packages/lib/dist/es.modern/da-DK.js 5.6 kB
packages/lib/dist/es.modern/de-DE.js 6.07 kB
packages/lib/dist/es.modern/el-GR.js 7.88 kB
packages/lib/dist/es.modern/es-ES.js 5.7 kB
packages/lib/dist/es.modern/fi-FI.js 5.71 kB
packages/lib/dist/es.modern/fr-FR.js 5.94 kB
packages/lib/dist/es.modern/hr-HR.js 5.97 kB
packages/lib/dist/es.modern/hu-HU.js 6.25 kB
packages/lib/dist/es.modern/it-IT.js 5.79 kB
packages/lib/dist/es.modern/ja-JP.js 6.67 kB
packages/lib/dist/es.modern/ko-KR.js 6.29 kB
packages/lib/dist/es.modern/nl-NL.js 5.73 kB
packages/lib/dist/es.modern/no-NO.js 5.56 kB
packages/lib/dist/es.modern/pl-PL.js 6.25 kB
packages/lib/dist/es.modern/pt-BR.js 5.76 kB
packages/lib/dist/es.modern/pt-PT.js 5.88 kB
packages/lib/dist/es.modern/ro-RO.js 6.02 kB
packages/lib/dist/es.modern/ru-RU.js 7.36 kB
packages/lib/dist/es.modern/sk-SK.js 6.34 kB
packages/lib/dist/es.modern/sl-SI.js 5.88 kB
packages/lib/dist/es.modern/sv-SE.js 5.57 kB
packages/lib/dist/es.modern/zh-CN.js 6.11 kB
packages/lib/dist/es.modern/zh-TW.js 6.2 kB
packages/lib/dist/es/ar.js 6.92 kB
packages/lib/dist/es/cs-CZ.js 6.17 kB
packages/lib/dist/es/da-DK.js 5.6 kB
packages/lib/dist/es/de-DE.js 6.07 kB
packages/lib/dist/es/el-GR.js 7.88 kB
packages/lib/dist/es/es-ES.js 5.7 kB
packages/lib/dist/es/fi-FI.js 5.71 kB
packages/lib/dist/es/fr-FR.js 5.94 kB
packages/lib/dist/es/hr-HR.js 5.97 kB
packages/lib/dist/es/hu-HU.js 6.25 kB
packages/lib/dist/es/it-IT.js 5.79 kB
packages/lib/dist/es/ja-JP.js 6.67 kB
packages/lib/dist/es/ko-KR.js 6.29 kB
packages/lib/dist/es/nl-NL.js 5.73 kB
packages/lib/dist/es/no-NO.js 5.56 kB
packages/lib/dist/es/pl-PL.js 6.25 kB
packages/lib/dist/es/pt-BR.js 5.76 kB
packages/lib/dist/es/pt-PT.js 5.88 kB
packages/lib/dist/es/ro-RO.js 6.02 kB
packages/lib/dist/es/ru-RU.js 7.36 kB
packages/lib/dist/es/sk-SK.js 6.34 kB
packages/lib/dist/es/sl-SI.js 5.88 kB
packages/lib/dist/es/sv-SE.js 5.57 kB
packages/lib/dist/es/zh-CN.js 6.11 kB
packages/lib/dist/es/zh-TW.js 6.2 kB

compressed-size-action

Copy link

Quality Gate Passed Quality Gate passed

Kudos, no new issues were introduced!

0 New issues
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

@ribeiroguilherme ribeiroguilherme merged commit f920caf into main Jan 23, 2024
10 checks passed
@ribeiroguilherme ribeiroguilherme deleted the renovate/npm-vite-vulnerability branch January 23, 2024 09:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Dependencies Issue with a project dependency or associated system
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant