fix: update vite to 5.5.0+ to patch Rollup path traversal vulnerability#209
fix: update vite to 5.5.0+ to patch Rollup path traversal vulnerability#209fatihtokus wants to merge 1 commit into
Conversation
- Upgraded vite from 5.4.14 to 5.5.0+ which includes patched Rollup version - Fixes CVE: Arbitrary File Write via Path Traversal in Rollup - Rollup now properly sanitizes filenames to prevent path traversal sequences (../) - This prevents attackers from writing files outside the intended output directory Resolves: https://github.com/fatihtokus/scan2html/security/dependabot/37
PR Summary by QodoBump Vite to 5.5.0 to pull patched Rollup and fix path traversal CVE Description
Diagram
High-Level Assessment
Files changed (1)
|
CI Feedback 🧐A test triggered by this PR failed. Here is an AI-generated analysis of the failure:
|
Code Review by Qodo
1. Lockfile still pins old Vite
|
| "raw-loader": "^4.0.2", | ||
| "typescript": "^5.2.2", | ||
| "vite": "^5.4.14", | ||
| "vite": "^5.5.0", |
There was a problem hiding this comment.
1. Lockfile still pins old vite 🐞 Bug ⛨ Security
src/frontend-app/package.json bumps Vite to ^5.5.0, but src/frontend-app/package-lock.json still resolves Vite 5.4.14 (and Rollup 4.22.4), so installs that honor the lockfile will continue using the pre-upgrade toolchain. This undermines the PR’s stated goal (shipping the patched Rollup) and can also break strict installs due to package.json/package-lock.json divergence.
Agent Prompt
### Issue description
`src/frontend-app/package.json` was updated to require `vite: ^5.5.0`, but the committed `src/frontend-app/package-lock.json` still pins `vite@5.4.14` (and its `rollup@4.22.4`). As a result, any install that uses the lockfile will not actually consume the upgraded/patched dependency chain.
### Issue Context
This PR’s intent is to patch a Rollup path traversal vulnerability by upgrading Vite/Rollup. That goal is not achieved if the lockfile continues to resolve the old versions.
### Fix
- From `src/frontend-app/`, run `npm install` (or `npm update vite`), ensuring the resulting `package-lock.json` resolves to `vite@>=5.5.0` and the intended patched Rollup version.
- Commit the updated `src/frontend-app/package-lock.json`.
### Fix Focus Areas
- src/frontend-app/package-lock.json[1-40]
- src/frontend-app/package-lock.json[4401-4435]
- src/frontend-app/package-lock.json[4870-4903]
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
Resolves: https://github.com/fatihtokus/scan2html/security/dependabot/37