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 [security] #28773

Merged
merged 2 commits into from
Jan 23, 2024

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Jan 22, 2024

Mend Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
vite (source) 2.9.13 -> 2.9.17 age adoption passing confidence
vite (source) 4.1.2 -> 4.5.2 age adoption passing confidence
vite (source) 4.3.2 -> 4.5.2 age adoption passing confidence
vite (source) 4.1.4 -> 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 vite@5.0.12, vite@4.5.2, vite@3.2.8, vite@2.9.17

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)

v2.9.17

Compare Source

Please refer to CHANGELOG.md for details.

v2.9.16

Compare Source

Please refer to CHANGELOG.md for details.

v2.9.15

Compare Source

Please refer to CHANGELOG.md for details.

v2.9.14

Compare Source

Please refer to CHANGELOG.md for details.


Configuration

📅 Schedule: Branch creation - "" in timezone America/New_York, 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.

👻 Immortal: This PR will be recreated if closed unmerged. Get config help if that's undesired.


  • 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 added renovate Triggered by renovatebot type: dependencies labels Jan 22, 2024
@cypress-app-bot
Copy link
Collaborator

See the guidelines for reviewing dependency updates for info on how to review dependency update PRs.

Copy link

cypress bot commented Jan 22, 2024

7 flaky tests on run #53679 ↗︎

0 4622 950 0 Flakiness 7

Details:

empty commit to trigger CI
Project: cypress Commit: 967c3a72aa
Status: Passed Duration: 15:23 💡
Started: Jan 22, 2024 8:56 PM Ended: Jan 22, 2024 9:11 PM
Flakiness  commands/net_stubbing.cy.ts • 3 flaky tests • 5x-driver-webkit

View Output

Test Artifacts
network stubbing > intercepting request > can delay and throttle a StaticResponse
    </td>
  </tr>
  <tr>
    <td colspan="2">
      <a href="https://cloud.cypress.io/projects/ypt4pf/runs/53679/overview/09269aa9-a2cb-4db2-bbe7-03b730fcd3c2?reviewViewBy=FLAKY&utm_source=github&utm_medium=flaky&utm_campaign=view%20test">
        ... > with `times` > only uses each handler N times
      </a>
    </td>
    <td>
      
    </td>
  </tr>
  <tr>
    <td colspan="2">
      <a href="https://cloud.cypress.io/projects/ypt4pf/runs/53679/overview/fc89f0d5-489e-4444-a68a-331f71a08776?reviewViewBy=FLAKY&utm_source=github&utm_medium=flaky&utm_campaign=view%20test">
        ... > stops waiting when an xhr request is canceled
      </a>
    </td>
    <td>
      
    </td>
  </tr></table>
Flakiness  commands/waiting.cy.js • 1 flaky test • 5x-driver-webkit

View Output

Test Artifacts
... > errors > throws when waiting for 2nd response to route
    </td>
  </tr></table>
Flakiness  cypress/cypress.cy.js • 3 flaky tests • 5x-driver-webkit

View Output

Test Artifacts
... > correctly returns currentRetry
    </td>
  </tr>
  <tr>
    <td colspan="2">
      <a href="https://cloud.cypress.io/projects/ypt4pf/runs/53679/overview/017198a4-2133-4713-9665-6c5dce64fe0f?reviewViewBy=FLAKY&utm_source=github&utm_medium=flaky&utm_campaign=view%20test">
        ... > correctly returns currentRetry
      </a>
    </td>
    <td>
      
    </td>
  </tr>
  <tr>
    <td colspan="2">
      <a href="https://cloud.cypress.io/projects/ypt4pf/runs/53679/overview/da821be8-2405-4ff7-ab89-837722cac756?reviewViewBy=FLAKY&utm_source=github&utm_medium=flaky&utm_campaign=view%20test">
        ... > correctly returns currentRetry
      </a>
    </td>
    <td>
      
    </td>
  </tr></table>

Review all test suite changes for PR #28773 ↗︎

Copy link
Contributor Author

renovate bot commented Jan 22, 2024

Edited/Blocked Notification

Renovate will not automatically rebase this PR, because it does not recognize the last commit author and assumes somebody else may have edited the PR.

You can manually request rebase by checking the rebase/retry box above.

Warning: custom changes will be lost.

@jennifer-shehane jennifer-shehane merged commit b17409a into develop Jan 23, 2024
80 of 82 checks passed
@jennifer-shehane jennifer-shehane deleted the renovate/npm-vite-vulnerability branch January 23, 2024 16:25
cacieprins pushed a commit that referenced this pull request Jan 24, 2024
* chore(deps): update dependency vite [security]

* empty commit to trigger CI

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jennifer Shehane <jennifer@cypress.io>
@cypress-bot
Copy link
Contributor

cypress-bot bot commented Jan 30, 2024

Released in 13.6.4.

This comment thread has been locked. If you are still experiencing this issue after upgrading to
Cypress v13.6.4, please open a new issue.

@cypress-bot cypress-bot bot locked as resolved and limited conversation to collaborators Jan 30, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
renovate Triggered by renovatebot type: dependencies
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants