Skip to content

Update dev dependencies to fix security vulnerabilities - #2

Merged
MudassarTariq merged 2 commits into
mainfrom
fix/security-dependencies
Sep 30, 2026
Merged

MudassarTariq merged 2 commits into
mainfrom
fix/security-dependencies

Conversation

@MudassarTariq

@MudassarTariq MudassarTariq commented Sep 29, 2026 •

Copy link
Copy Markdown
Member

What

This updates the test and build tooling to fix security vulnerabilities. Only devDependencies, overrides, package-lock.json and the CI matrix change.

Package Change
vitest, @vitest/coverage-v8 ^1.0.0 (1.6.1) → ^4.1.11
vite (from vitest) 5.4.21 → 6.4.3, via override
postcss (from vite, tsup and next) 8.4.31 / 8.5.14 → 8.5.28, via override
esbuild (from tsup) 0.27.7 → 0.28.2, via override
sharp (optional dependency of the next dev dependency) 0.34.5 → 0.35.5, via override
nanoid, brace-expansion refreshed in range
  • CI: the matrix now tests Node 20 and 22. vitest 4 requires Node 20+, and Node 18 is end-of-life.
  • Package: it has no runtime dependencies, and next stays a peer dependency (>=13.0.0). engines and the published files are unchanged, so nothing changes for users.

Security

  • OSV scan of the lockfile: 17 advisories before, 0 after. npm audit: 10 findings (2 critical, 5 high, 3 moderate) before, 0 after.
  • The fixes include:
    • the vitest UI arbitrary file read and the @vitest/mocker path traversal (CVE-2026-84373)
    • several vite path-traversal issues and the esbuild dev-server issues
    • several postcss issues
    • the libvips/libheif issues in sharp

No functional change: verification

Check Before After
npm run typecheck pass pass on Node 20, 22 and 26
npm test 177 passed 177 passed on Node 20, 22 and 26
vitest run --coverage pass pass
npm run build, 12 files in dist/ byte-identical
npm pack file list same files and sizes. Only package.json differs (dev tooling fields)

The coverage percentages printed by --coverage differ slightly, because vitest 4 maps V8 coverage differently. The same 177 tests run, and no coverage threshold is configured.

Updates vitest and @vitest/coverage-v8 from 1.6.1 to 3.2.7, and adds npm overrides so the build and test tools resolve patched versions: vite 6.4.3, postcss 8.5.28, esbuild 0.28.2 for tsup, and postcss 8.5.28 and sharp 0.35.5 for the next dev dependency. vitest 3.2.7 and vite 6.4.3 still support Node 18, which CI tests.

Only devDependencies and overrides change. The published package has no runtime dependencies, and the built dist/ output is byte-identical.
Fixes the last open advisory, GHSA-82fw-gwwq-j7x9 (CVE-2026-84373) in @vitest/mocker, which is only fixed in vitest 4.1.11. vitest 4 requires Node 20+, so the CI matrix now tests Node 20 and 22. Node 18 is end-of-life. The package itself, its engines field and the built dist/ output are unchanged.
@MudassarTariq
MudassarTariq merged commit bd14668 into main Sep 30, 2026
2 checks passed
@MudassarTariq
MudassarTariq deleted the fix/security-dependencies branch September 30, 2026 20:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant