Upgrade Next.js to 16.4.1 or later
Critical Next.js RCE in 'use cache' functions affects 16.0.0 to 16.4.0 · Security incident · GitHub advisory · vercel · Oct 14, 2026
What happened
The Next.js team published a critical advisory (GHSA-673q-mjm6-r5xr, CVSS 9.5) on 14 Oct. Apps on Next.js 16.0.0 to 16.4.0 that use the App Router with Cache Components can allow unauthenticated remote code execution if they have a use cache function that returns multiple typed arrays. The fix is 16.4.1. The advisory lists no workaround and says to upgrade even if you don't believe you have such a function.
How to prevent it
Most AI app builders generate Next.js apps, so watch for framework advisories and update dependencies as soon as a critical fix lands. Turn on Dependabot or a similar alert for your repo.
Fix prompt for your own AI tool
Copy this into your own AI tool (Cursor, Lovable, Claude Code, Bolt…). It's general guidance written by us. Review what the AI suggests before applying it.
My app was built with an AI tool and uses Next.js. A critical remote code execution advisory (GHSA-673q-mjm6-r5xr, 14 Oct 2026) affects Next.js 16.0.0 to 16.4.0 for apps using the App Router with Cache Components and a use cache function that returns typed arrays. 1) Check which Next.js version my project uses in package.json and the lock file. 2) If it is between 16.0.0 and 16.4.0, show me how to upgrade to 16.4.1 or later and test the build. The advisory says there is no workaround and to upgrade even if I don't think I use such a function. 3) Search my code for use cache functions so I understand my exposure. 4) Check that my host redeploys with the new version and that no old preview deployments stay public. Don't change anything until I've approved your plan. Never ask me to paste API keys, passwords or .env contents; tell me where to check them myself.
Why this keeps happening: leaked secrets & api keys
Secret keys placed in front-end code, mobile bundles or public repositories can be found by automated scanners and abused, often running up large bills on AI or cloud accounts before anyone notices.
A quick checklist before you ship
- Keep secret keys only in server-side environment variables, never in browser or app code.
- Set spend limits and usage alerts with every AI and cloud provider.
- Turn on secret scanning and push protection for your repositories.
- If a key leaks, revoke and replace it first; deleting the file is not enough.
More on this: every leaked secrets & api keys story and our related guide.
Tools involved
Next.js stories, Vercel stories
Related stories
- Upgrade Node.js to a patched version and redeploy
Node.js Brotli flaw (CVE-2026-111497) can leak memory or run code; Node 20 gets no fix - If you self-host n8n with several users, upgrade to 1.123.96, 2.47.6, 2.48.3, 3.2.2 or later and check active workflows for triggers using credentials their owner didn't set
n8n let a member activate a workflow using someone else's credential if they knew its ID - If you self-host the LiteLLM proxy with Azure models, upgrade to 1.106.9, 1.108.6, 1.109.1 or later and rotate the master key if low-trust users had access
LiteLLM proxy: a normal chat request could leak the master key and provider API keys through an Azure error
Source: original post on GitHub advisory ↗. Summarised in our own words; numbers are as stated by the source. Browse all stories.