chore(deps): pin vite to 4.5.14 — clears 11 advisories including a KEV by Portll · Pull Request #792 · vercel/satori · GitHub
Skip to content

chore(deps): pin vite to 4.5.14 — clears 11 advisories including a KEV - #792

Open
Portll wants to merge 1 commit into
vercel:mainfrom
Portll:deps/vite-4.5.14
Open

Portll wants to merge 1 commit into
vercel:mainfrom
Portll:deps/vite-4.5.14

Conversation

@Portll

@Portll Portll commented Aug 26, 2026 •

Copy link
Copy Markdown

What

vite reaches this repo transitively through vitest, pinned at 4.0.4 since early 2023. osv-scanner reports 18 advisories against that version. A pnpm.overrides pin to the latest 4.x clears 11, including CVE-2025-31125, which CISA added to the Known Exploited Vulnerabilities catalogue on 2026-01-22.

vite advisories:   18 → 7
whole lockfile:    94 → 74
newly introduced:  0

NOT URGENT

0/18 reachable in satori. They're all Vite dev server issues.
— CVE-2025-31125's text reads "Only apps explicitly exposing the Vite dev server to the network (using --host or server.host) are affected."

satori has no vite.config.*, no --host or server.host anywhere, (dev is tsup --watch; playground is Next.js). vite is absent from dependencies.

So: hygiene and scanner surface, not an incident. Worth doing mainly because anyone pointing an SCA scanner at satori currently gets a KEV-flagged hit, and the 4.5.x parser fixes are nice to have regardless.

The one non-obvious change

vite@4.5.14 resolves module ids more strictly than 4.0.4, which surfaces something latent in test/jsx-runtime.test.tsx.

src/jsx/ has no jsx-dev-runtime.ts — only jsx-runtime.ts. The imports field maps both #satori/jsx/jsx-runtime and #satori/jsx/jsx-dev-runtime onto that one file, which is what makes the automatic runtime work. But the test uses a relative @jsxImportSource ../src/jsx, which bypasses the imports map, so the dev variant has nothing to resolve to. (The file's own // TODO: use #satori/jsx as import source after upgradine vitest looks like it's about exactly this.)

Setting esbuild.jsxDev = false keeps the transform on the production runtime. Happy to do it another way if you'd prefer — adding the missing jsx-dev-runtime.ts, or moving the test onto #satori/jsx - I went for lowest touch.

What this deliberately leaves

Seven advisories remain, as none has a fix in the 4.x line: CVE-2025-58751, CVE-2025-58752 (<5.4.20), CVE-2024-52011 (<5.4.9), CVE-2025-62522 (<5.4.21), CVE-2026-39365 (<6.4.2), CVE-2026-53571, CVE-2026-53632 (<6.4.3). Four are Windows-only. Reaching them needs vite ≥ 6.4.3, outside vitest@0.32's peer range — so it means upgrading vitest too. I've put that on a separate branch and opened it as #793, but I don't recommend merging it as-is and that PR explains why. The same non-exploitability applies to all seven.

Verification

  • pnpm install / pnpm test / pnpm build:default — all clean; 55 suites, 512 tests
  • The 498 image snapshots match with zero rewrites
  • Sanity-checked that they're genuinely being compared: corrupting one baseline fails the suite, as it should

Node floor, dependencies, files and the published artefact are unchanged. Since nothing shipped changes I used chore(deps): so it shouldn't cut a release — say the word if you'd rather it were fix:.

vite arrives transitively through vitest and has been pinned at 4.0.4 since
early 2023. osv-scanner reports 18 advisories against it; overriding to the
latest 4.x clears 11 of them, including CVE-2025-31125, which CISA added to
the Known Exploited Vulnerabilities catalogue on 2026-01-22.

None of the 18 are reachable in this repository -- they are all Vite dev
server issues and satori never starts one. This is dependency hygiene and
scanner surface, not an incident.

vite 4.5.14 resolves module ids more strictly than 4.0.4, which surfaces a
latent issue in test/jsx-runtime.test.tsx: src/jsx has no jsx-dev-runtime, so
the automatic runtime's dev variant has nothing to resolve to. The imports
field in package.json maps both specifiers onto jsx-runtime.ts, but the test's
relative @jsxImportSource bypasses that map. Setting esbuild.jsxDev = false
keeps the transform on the production runtime.

pnpm install / vitest run / tsup all clean: 55 suites, 512 tests, and the 498
image snapshots match without a single rewrite.
@Portll
Portll requested a review from shuding as a code owner August 26, 2026 11:01
@vercel

vercel Bot commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

@socket-security

Copy link
Copy Markdown

Warning

Review the following alerts detected in dependencies.

According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.

Action Severity Alert  (click "▶" to expand/collapse)
Warn High
High CVE: npm vite: `server.fs.deny` bypass on Windows alternate paths

CVE: GHSA-fx2h-pf6j-xcff vite: server.fs.deny bypass on Windows alternate paths (HIGH)

Affected versions: >= 8.0.0 < 8.0.16; >= 7.0.0 < 7.3.5; < 6.4.3

Patched version: 6.4.3

From: pnpm-lock.yaml → npm/vitest@0.32.0 → npm/vite@4.5.14

ℹ Read more on: This package | This alert | What is a CVE?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Remove or replace dependencies that include known high severity CVEs. Consumers can use dependency overrides or npm audit fix --force to remove vulnerable dependencies.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/vite@4.5.14. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Warn High
High CVE: launch-editor vulnerable to command injection via the crafted request on Windows in npm vite

CVE: GHSA-c27g-q93r-2cwf launch-editor vulnerable to command injection via the crafted request on Windows (HIGH)

Affected versions: < 5.4.9

Patched version: 5.4.9

From: pnpm-lock.yaml → npm/vitest@0.32.0 → npm/vite@4.5.14

ℹ Read more on: This package | This alert | What is a CVE?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Remove or replace dependencies that include known high severity CVEs. Consumers can use dependency overrides or npm audit fix --force to remove vulnerable dependencies.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/vite@4.5.14. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

View full report

This branch was previously deployed

1 inactive deployment
Preview — 2b8358a9 Deployed Aug 26, 2026 by vercel[bot]
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