Subscribe free
Morning Merge JavaScript · Thursday, November 19, 20264 min read

Patch Vite's dev server; Next.js fixes cache mix-ups

Also: Bun 1.4.5 security release, Discord drops Electron, CloudFront Functions get fetch

A Vite dev server exposed with --host can be made to run attacker code, so upgrade and restart it first. Then check Next.js, Bun and your lockfile.

The main thing

A golden construction piece slides through the open service hatch of a small machine into its central socket.

Vite's dev server would run code from a URL

If you start Vite with --host or set server.host, upgrade before you start it again. On November 18, 2026, Vite published a critical advisory, GHSA-p4f5-76q4-ffq7: one HTTP request to a dev server exposed on the network can read files outside Vite's allow list or run code on the machine. The fixed releases are Vite 8.3.7, 8.2.5, 8.1.7, 7.3.8 and 6.4.6, plus Vite+ 1.5.1. Only apps that explicitly expose the dev server are affected, so a server listening only on localhost isn't affected.

The bug is a missing escape in two virtual modules, __vite-browser-external:<suffix> and __vite-optional-peer-dep:<suffix>. Each pasted its module ID, which comes from the URL, into generated code as is. The suffix can be anything, so the attacker gets to write the module.

The weird part is how far that goes, because Vite trusts its own module code twice.

First, files a module imports pass the server.fs check. In the advisory's proof of concept, /@fs/tmp/decoy-secret.txt returns 403 Restricted, then one crafted /@id/__vite-browser-external: request imports that file, and the same URL now returns its contents. Second, Vite uses eval to pull values out of module code for new Worker and import.meta.glob, so injected code runs on the server. Vite hides names like require and exports there, but says that was to avoid bugs and was never a security boundary: globalThis.process.getBuiltinModule walks right past it.

For Vite 8, the vulnerable code lives in the Rolldown binary. 8.3.7, 8.2.5 and 8.1.7 each rely on a fix in Rolldown, so if you pin or override Rolldown, check the advisory for the release each one needs and make sure your lockfile picked it up.

The advisory lists fixed releases, not an affected range, so treat older releases on each of those lines as exposed. The server.fs allow list is the thing the bug bypasses, so it's no mitigation. Keeping the dev server off the network is.

What to do today: run npm ls vite rolldown to see what actually resolves, including the Vite your framework's CLI runs for you. Upgrade, then restart every running dev server. If you use --host to reach a container or test on your phone, drop it until you've upgraded.

Patch check

Two differently shaped blocks slide down two chutes into the same cubby, which already holds a golden piece.

Next.js use cache gave one caller another's result before 16.4.5. A developer tested use cache with 54 pairs of different inputs. On 16.4.4 the key ignored a File's name and type, so a call with bob.pdf got alice.pdf's cached result when the bytes matched. A Blob and a File with the same bytes collided too, and so did an odd-length byte array and the same array plus a trailing zero. Next.js fixed this in 16.4.5 under GHSA-rhh4-g77r-r9qj. Upgrade if your cached functions take Files, Blobs or byte arrays.

Bun 1.4.5 is a security release. It updates lsquic, c-ares, SQLite, llhttp and BoringSSL, with fixes for HTTP/3, TLS and DNS. Affected APIs run from Bun.serve and fetch to node:tls and node:dns, and the post names no CVEs or severities. Two changes can bite: custom root certificates are validated more strictly, so some legacy ones are now rejected (Bun's bundled roots aren't affected), and SQLite 3.54 no longer lets ALTER TABLE add, rename or drop a column named rowid, oid or _rowid_. Run bun upgrade.

install-artifact-from-github skips integrity checks. CVE-2026-73864 (high severity): bin/install-from-cache.js downloads a prebuilt .node addon and writes it to disk with no checksum or signature, and the consumer then require()s it. Whoever can influence that download runs code on your machine. The advisory names v1.6.0 as the affected code, and the excerpt we have doesn't name a fixed release. Run npm ls install-artifact-from-github to see whether something you depend on pulls it in.

Framework watch

A crane lifts a bulky housing off a compact machine while a slimmer golden piece slots straight into its exposed socket.

Discord is dropping Electron and React Native. CTO Stanislav Vishnevskiy says the desktop and mobile clients are being rewritten in Rust: desktop on GPUI, the UI framework Zed built for its editor, and mobile on native iOS and Android views over a shared Rust core. The browser client keeps rendering HTML, with its app logic compiled to WebAssembly. InfoQ reports early internal desktop builds at around 290 MB of RAM with two accounts logged in, and a near-instant cold start against 5.5 s on Electron. The price is what the browser engine used to provide: text layout, input methods, screen-reader hooks and right-to-left support. User testing is coming "soon™", in Vishnevskiy's words.

CloudFront Functions can make network calls. AWS's edge JavaScript gets cf.fetch(), so a function can call your API and act on the answer mid-request, and cf.beacon(), which sends analytics in the background, even for responses served from cache. Network calls cost $0.10 per million on top of invocation charges, with no extra charge on flat-rate Pro plans and above. Auth checks that used to need Lambda@Edge may now fit in a function.

Astro 7.4.13 and Svelte 5.58.0 are easy upgrades. Astro stops server bundles from including every renderable content collection entry when no server-rendered route calls render(). Svelte lets the garbage collector free each component's AST after compiling it, and renders the same <title> on the server as on the client.

Upgrade Vite and restart your dev servers first, then Next.js if your cached functions take uploads.

← All Morning Merge JavaScript issues

Get this in your inbox every morning.

Free. Five minutes. Unsubscribe in one click.

Subscribe free →