fix: patch Vite arbitrary file read vulnerability (GHSA-p9ff-h696-f583) #51
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.2override inpackage.json, which forces all transitive Vite dependencies to use at least the patched version. The current lockfile correctly resolves tovite@6.4.2andvite@7.3.2, both of which are patched releases.Key points:
>=6.0.0 <6.4.2)v7.3.2) — the constraint>=6.4.2permits7.0.0–7.3.1which are still vulnerable, even though the current lockfile happens to resolve to 7.3.2>=6.4.2 <7.0.0 || >=7.3.2would close this theoretical gap for future dependency resolutionspnpm-lock.yamlalso contains incidental transitive bumps (e.g.,@typescript-eslint8.57.2 → 8.59.0,typescript5.6.2 → 5.6.3); these appear to be side effects of the updated peer dependency resolution and are not related to the security fixConfidence Score: 4/5
Safe to merge as-is; current lockfile is fully patched, with one concrete improvement possible to the version constraint.
The immediate vulnerability is resolved — both Vite versions in the lockfile (6.4.2 and 7.3.2) are patched. The one remaining concern is that >=6.4.2 is a slightly imprecise constraint that could theoretically allow a vulnerable 7.x version in future installs, but this is unlikely in normal pnpm usage and the vulnerability only affects dev servers, not production.
package.json — the vite override range should be tightened to exclude the 7.0.0–7.3.1 vulnerable window.
Security Review
>=6.4.2also satisfies vulnerable Vite 7.x versions (7.0.0–7.3.1). The current lockfile is safe (resolves to 7.3.2), but future dependency changes could surface this gap. Impact is limited to dev/build environments only (not production runtime).Important Files Changed
vite: >=6.4.2override to patch GHSA-p9ff-h696-f583; range is overly broad and permits vulnerable 7.x versions (7.0.0–7.3.1)Prompt To Fix All With AI
Reviews (1): Last reviewed commit: "fix: update vite to >=6.4.2 to patch arb..." | Re-trigger Greptile
@@ -54,2 +54,3 @@"undici": "^7.24.3""undici": "^7.24.3","vite": ">=6.4.2"},The constraint
>=6.4.2technically satisfies pnpm with any Vite version>=6.4.2, which includes the 7.x range7.0.0–7.3.1. Those versions are also vulnerable to GHSA-p9ff-h696-f583 (the advisory listsv7.3.2as a separate fix release alongsidev6.4.2andv8.0.5).In the current lockfile this doesn't bite because pnpm resolves
6.4.2and7.3.2— both patched — but a futurepnpm update viteor a newly added transitive dep that constrains vite to^7.0.0could resolve a vulnerable 7.x version and still satisfy the override.A more precise constraint would be:
This explicitly excludes the entire vulnerable 7.0.0–7.3.1 window while still allowing patched 7.3.2+ and any 8.x release.
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.