Skip to content

Next.js now warns you in dev when your version has a known CVE

Starting in Next.js 16.4, next dev and next build flag installed versions affected by a security advisory, and a new upgrade --agent command hands the fix to your coding agent.

Source: Next.js

Vercel published a post on 17 November explaining why Next.js security advisories have climbed: 6 in 2024, 14 in 2025, 51 so far in 2026. It says 70% of this year’s bugs were in code at least a year old, and 43% in code three years or older, meaning AI-assisted bug hunting is surfacing an existing backlog rather than new regressions.

The practical change is in the tooling. Starting in Next.js 16.4, next dev and next build check your installed version against Vercel’s own advisories and print a warning if it is affected, with an option to upgrade on the spot. The DevTools panel shows the same alert with a prompt you can copy into a coding agent. A new command, npx next@canary upgrade --agent, picks the latest patched release within your current major version and hands the migration to your agent along with the matching guide.

Vercel also says it engaged Trail of Bits for a manual audit and now runs its own Security Review agent against every pull request to the framework, catching issues after CI had already gone green.

npx next@canary upgrade --agent

Why it matters: most teams find out about a Next.js CVE from a changelog they weren’t reading. This moves the check into the dev loop itself and turns the fix into a command rather than a manual version chase.

Share

Related reading

More from The Wire

All briefs