fix: upgrade vitest to 4.1.0 (CVE-2026-47429)#8281
Conversation
Automated dependency upgrade by OrbisAI Security Signed-off-by: orbisai0security <mediratta01.pally@gmail.com>
Review: fix: upgrade vitest to 4.1.0 (CVE-2026-47429)CVE VerificationCVE-2026-47429 (GHSA-5xrq-8626-4rwp) is a real, confirmed critical vulnerability in Vitest. It allows arbitrary file read and execution when the Vitest UI server is listening, particularly on Windows or when the API is exposed to the network. The GitHub Security Advisory confirms Concerns1. Major version jump introduces significant risk (3.x -> 4.x) This PR upgrades vitest from Key risks:
2.
3. Pinned version instead of range The PR changes 4. Practical impact assessment The CVE affects users who either (a) expose the Vitest UI server to the network, or (b) run Vitest UI/Browser Mode on Windows. Since vitest is a devDependency used only for running tests during development and CI, and the Jan application does not ship or bundle vitest, the practical exploitability is very low. This does not affect end users of Jan. That said, fixing known CVEs in dev dependencies is still good practice. 5. Alternative approach Rather than jumping to a new major version, the maintainers should consider:
6. Author context The PR author Summary
Recommendation: fix neededThe CVE is legitimate but this PR introduces a major version bump with a known incompatibility (
|
Addresses code review feedback on PR janhq#8281: - Fix major-version mismatch between vitest (4.x) and @vitest/coverage-v8 (was 3.x) - Change vitest pin "4.1.0" to range "^4.1.0" for consistency with project style Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Follow-up Review (new commit since last review)What changed since our last reviewCommit
The commit message is clear and references the PR review feedback. Good. Remaining concerns1. Major version jump risk (3.x to 4.x) is still present This has not changed. Vitest 4.x pulls in Vite 8.0.16, which replaces Rollup with Rolldown 1.0.3 as the bundler. The lockfile adds ~748 lines of new transitive dependencies. While this is a dev-only change, the root 2. No evidence the test suite passes The PR CI status shows 3. Sub-package vitest versions are not updated The sub-packages still use older vitest versions:
Since these are in a yarn workspace and the root orchestrates tests via vitest's Updated assessment
Recommendation: improve neededThe two most critical issues from our previous review have been addressed, which is good. The PR is in better shape than before. However, before merging:
If tests pass, this is safe to merge despite the large transitive dependency delta, since vitest is dev-only and does not affect the shipped application. |
Update vitest and related @vitest/* deps from 2.x/3.x to ^4.1.0 in core, web-app, llamacpp-extension, and download-extension so all workspaces are consistently protected against CVE-2026-47429. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Summary
Upgrade vitest from 2.1.9 to 4.1.0 to fix CVE-2026-47429.
Vulnerability
CVE-2026-47429yarn.lockDescription: When Vitest UI server is listening, arbitrary file can be read and executed
Evidence
Scanner confirmation: trivy rule
CVE-2026-47429flagged this pattern.Production code: This file is in the production codebase, not test-only code.
Threat Model Context
This is a Node.js library - vulnerabilities affect downstream consumers who use this package.
Changes
package.jsonyarn.lockVerification
This change addresses a pattern flagged by static analysis. The code path handles user-influenced input and the fix reduces the attack surface against both manual and automated exploitation.
Automated security fix by OrbisAI Security