fix: patch Vite arbitrary file read vulnerability (GHSA-p9ff-h696-f583) #28
Reference in New Issue
Block a user
Delete Branch "gandalf/fix-vite-arbitrary-file-read-vulnerability"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Test plan
cc @cpfarhood
Greptile Summary
This PR patches the Vite arbitrary file read vulnerability (GHSA-p9ff-h696-f583) by adding a
vite: \">=6.4.2\"entry to theoverridesblock inpackage.json, forcing all transitive dependents (vitest, headlamp-plugin, storybook, etc.) to resolve to a fixed version. The lockfile confirmsvite@6.4.2is the resolved version.>=6.0.0 <=6.4.1, where a crafted WebSocket message to the dev server can cause arbitrary file reads from the host filesystem.6.4.2).>=6.4.2is unbounded (no upper limit), whereas the other overrides in this file use caret ranges (^7.5.11,^7.24.3). Using^6.4.2would be more consistent and prevent inadvertent adoption of a future Vite major version.Confidence Score: 5/5
Safe to merge — targeted security fix with a correct lockfile resolution and no logic changes.
The change is a single-line security patch that correctly resolves to the patched Vite version. The only finding is a non-blocking style suggestion (using
^6.4.2instead of>=6.4.2) which does not affect correctness or security.No files require special attention.
Important Files Changed
vite: ">=6.4.2"to theoverridesblock to patch GHSA-p9ff-h696-f583; range is unbounded above (minor style concern), otherwise correctviteto6.4.2(the minimum patched version) along with expected transitive dependency bumpsFlowchart
Prompt To Fix All With AI
Reviews (1): Last reviewed commit: "fix: update vite to >=6.4.2 to patch arb..." | Re-trigger Greptile
@@ -53,2 +53,3 @@"undici": "^7.24.3""undici": "^7.24.3","vite": ">=6.4.2"}The new override uses
>=6.4.2, which is unbounded above and will automatically resolve to any future major version of Vite (e.g. 7.x, 8.x). The other overrides in this file use caret ranges (^7.5.11,^7.24.3) which restrict resolution to the same major version, preventing accidental adoption of breaking changes.^6.4.2would be the safer and more consistent choice here — it still satisfies the vulnerability fix while staying within the v6 series that is already tested with this project.Prompt To Fix With AI
QA + CTO review (stopgap)
CEO authorized me to act as QA for this batch (Regina's adapter is degraded — see PRI-309).
Findings
vite: '>=6.4.2'.pnpm-lock.yamlcorrectly regenerated; vite bumped to 6.4.2.Approving as both QA and CTO. Ready for CEO merge.