fix: pin vite ≥ 6.4.2 and postcss ≥ 8.5.10 to address CVE-2026-39365#23
Conversation
Greptile SummaryThis PR pins
Confidence Score: 4/5Safe to merge for the postcss fix; the vite override is a v5→v6 major bump applied to docs tooling under a CVE that doesn't cover v5, so a confirmed clean docs build would provide additional assurance. The postcss change is straightforward and addresses a real vulnerability. The vite override, however, performs a silent major version upgrade (5→6) of a transitive dev dependency justified by a CVE that does not actually apply to the original v5 installation. Vite 6 has breaking changes relative to v5, and while the blast radius is limited to the documentation build, the upgrade path has not been explicitly tested here. The Important Files Changed
Reviews (1): Last reviewed commit: "fix: upgrade vite to 6.4.3 and postcss t..." | Re-trigger Greptile |
| "overrides": { | ||
| "esbuild": "^0.25.0" | ||
| "esbuild": "^0.25.0", | ||
| "vite": "^6.4.2", |
There was a problem hiding this comment.
CVE-2026-39365 does not affect vite 5.x — this override is addressing a scanner false positive
According to NVD and the GitHub Advisory (GHSA-4w7w-66w2-5vf9), CVE-2026-39365 specifically affects vite 6.0.0–6.4.1, 7.x–7.3.1, and 8.x–8.0.4. The original pinned version in the lock file was vite@5.4.21, which is outside all vulnerable ranges. The PR description acknowledges that scanners flag it "due to a simple <=6.4.1 version comparison" — that is the definition of a false positive.
The consequence is that this override silently performs a major version bump from v5 to v6 (via npm overrides) under the guise of a security patch. Vite 6 has breaking changes relative to v5. While vitepress@1.6.4 advertises support for both ^5 and ^6, it's worth verifying the docs build (npm run docs:build) still passes cleanly with the new resolution before merging.
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
There was a problem hiding this comment.
Pull request overview
This PR updates the docs toolchain dependency resolution to eliminate reported vulnerabilities by adding npm overrides, resulting in Vite and PostCSS being resolved to patched versions in the lockfile.
Changes:
- Add npm
overridesto forceviteto^6.4.2andpostcssto^8.5.10. - Update
package-lock.jsonto reflect resolved versions (vite@6.4.3,postcss@8.5.15) and associated transitive dependency changes.
Reviewed changes
Copilot reviewed 1 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| package.json | Adds overrides entries to force patched Vite/PostCSS versions. |
| package-lock.json | Records the new resolved dependency graph (Vite 6.4.3, PostCSS 8.5.15, new transitive deps). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| "esbuild": "^0.25.0", | ||
| "vite": "^6.4.2", | ||
| "postcss": "^8.5.10" |
| "vite": "^6.4.2", | ||
| "postcss": "^8.5.10" |
Summary
CVE-2026-39365 is a path traversal vulnerability in vite affecting versions 6.0.0–6.4.1 (also 7.x and 8.x ranges). The repo's
vitepress@1.6.4pulled invite@5.4.21; scanners flag this as vulnerable due to a simple<= 6.4.1version comparison. Adds npmoverridesto forceviteto the patched6.4.3(vitepress supports^5 || ^6) and fixes a co-located moderatepostcss < 8.5.10XSS issue.Changes in
package.json:"vite": "^6.4.2"override → resolves to6.4.3"postcss": "^8.5.10"override → clears GHSA-qx2v-qp2m-jg93npm auditreports 0 vulnerabilities after these changes.Type of change
Checklist
CONTRIBUTING.mdandAGENTS.md.vendor/bin/phpunitpasses locally (unit suite at minimum).vendor/bin/psalmpasses locally.README.mdand/ordocs/), including examples if needed.Integration tests (if applicable)
AGENTS.md.Breaking changes
None. Dependency-only change; no public API affected.
Notes for reviewers
vitepress@1.6.4declares"vite": "^5.0.0 || ^6.0.0", so bumping to vite 6.4.3 via override is within its supported peer range. The postcss override is similarly safe — it's a transitive dep with no API surface exposed to this project.