Skip to content
ShipCheck
Guides

Next.js security updates for vibe coders: check your version and patch safely

Updated 5 November 2026

Next.js now ships security fixes on a schedule, and some of them are critical. If an AI tool built your app, you may not even know which Next.js version it runs, or whether it runs Next.js at all. This guide shows you how to find out, which updates matter, how to update without breaking things, and how to check that the fix is actually live.

Check your own app for this, free.

Paste your live URL. ShipCheck looks for leaked API keys in your page and JavaScript, exposed files like /.env and /.git, missing security headers, SSL certificate problems, domain expiry (custom domains only) and what Google sees without running JavaScript. You'll see your score without signing up.

See an example report

Short answer

Find the installed next version (npm ls next). Compare it with the latest patch for your release line on the Next.js security news page. If you're behind, run npm install next@<patched version>, commit the lockfile, deploy a preview, test it, then promote it to production. Then check that production really runs the new version.

Does your app even use Next.js?

  • v0: generates Next.js apps, so this guide applies.
  • Cursor, Bolt, Replit: it depends on what you or the AI picked. Check package.json. If "next" is in dependencies, it's a Next.js app.
  • Lovable: Lovable apps are built on Vite + React or, for newer projects, TanStack Start, not Next.js. Next.js advisories don't apply unless you moved the code to Next.js yourself. Your other dependencies still need updates, so npm audit is still worth running.

How to tell which Next.js version you run

In the code (most reliable). package.json shows a range such as "next": "^15.5.0", not the version that is actually installed. Ask npm for the installed version instead:

npm ls next          # e.g. next@15.5.27
npm ls sharp         # the image library Next.js uses (see the October advisory below)
npm audit            # lists known advisories for your installed packages

No terminal? Open package-lock.json (or pnpm-lock.yaml or yarn.lock) on GitHub and search for node_modules/next. You can also ask your AI tool: "What exact version of next is in the lockfile?"

In the deploy log. next build prints the version near the top of the build output, for example ▲ Next.js 16.4.1. On Vercel, open the latest production deployment and check its build logs.

On the live site (a rough check). In most Next.js apps, typing window.next?.version in the browser console on your site prints the version. Treat that as a hint and the lockfile as the truth. An X-Powered-By: Next.js response header only tells you it's Next.js, not which version, and many apps turn that header off.

Why patch releases matter

Since July 2026, Next.js has had a formal security release program. Roughly once a month it announces an upcoming security release in advance, with the highest severity included, then publishes patches for the supported release lines. Urgent or actively exploited issues still get unscheduled patches, as happened with React2Shell in December 2025.

The most recent at the time of writing is the November 2026 security release of 3 November 2026: Next.js 16.4.5 (Active LTS) and 15.5.29 (Maintenance LTS). It fixes seven issues, one rated high and six medium by Next.js. Most affect apps using Cache Components and use cache (cached content shown to the wrong user or tenant, and cache poisoning). The others are cookie values leaking through an internal header on Edge routes, an SVG rejection bypass in image optimization, and a response-injection issue on some self-hosted setups. The 15.5.29 release notes list only the last three, because Cache Components issues are in 16.x. Upgrade with npm install next@16.4.5 or npm install next@15.5.29.

The release before that was the 14 October 2026 security update (Next.js 16.4.1 and 15.5.28). It fixed:

  • Critical: unauthenticated remote code execution in use cache functions that return typed arrays, for App Router apps using Cache Components (GHSA-673q-mjm6-r5xr, affects 16.0.0 to 16.4.0). There's no workaround, and Next.js says to upgrade even if you don't have such functions.
  • Critical: possible remote code execution through the Image Optimization API when SVGs are used and Next.js runs on glibc-based Linux, caused by an upstream library (CVE-2026-96889 / GHSA-2464-fhr4-w9xw). The workaround is sharp 0.35.5 or later.
  • High: a denial of service in App Router apps that have at least one Server Action (GHSA-p3m5-59mp-jv5r). Pages Router apps and apps without Server Actions aren't affected.

"Remote code execution" means a stranger may be able to run code on your server, where your environment variables live. That includes your Stripe secret key, your Supabase service_role key and your AI keys. If you learn your app ran a vulnerable version, update first, then consider rotating secrets. See which keys to rotate, and in what order.

Which versions still get fixes

The Next.js support policy currently lists 16.x as Active LTS and 15.x as Maintenance LTS. 14.x and older are unsupported, so new security fixes usually aren't backported to them. Maintenance LTS lasts two years from a major version's first release, and 15.x came out in October 2024, so check that page before you rely on 15.x. If you're on 14 or older, plan a major upgrade instead of waiting for a patch.

How to update safely

  1. Stay on your release line first. Going from 15.5.28 to 15.5.29, or 16.4.1 to 16.4.5, is the smallest and lowest-risk change: npm install next@15.5.29 or npm install next@16.4.5. Use the version the latest advisory names.
  2. Follow the advisory's extra steps. Some fixes depend on upstream packages such as React or sharp. After installing, run npm ls sharp and npm audit again.
  3. Commit the lockfile. Your host installs from package-lock.json. If only package.json changes, the deploy may not get the version you tested.
  4. Build and test locally: npm run build, then click through sign-in, payments, forms and any page that uses images or Server Actions.
  5. Deploy a preview first. On Vercel, pushing a branch gives you a preview URL. Test there, then merge or promote to production.
  6. Major upgrades are a separate project (for example 14 to 16). Read the official upgrade guide and do it on a branch, not as an emergency fix.

A prompt for your AI tool:

Update Next.js to the latest security patch on my current release line (for example 15.5.x -> 15.5.29 or 16.4.x -> 16.4.5).
Do not change the major version. Update the lockfile, keep all other dependencies unchanged unless the Next.js
security advisory requires it (for example sharp >= 0.35.5), run the build, and show me the diff before committing.

Hosting platforms sometimes add firewall rules that block known attacks while people patch, and Next.js says it coordinates with hosting providers on this. Treat those rules as a stopgap, not a replacement for updating.

How to check after deploy

  1. Open the production deployment's build log and confirm the ▲ Next.js x.y.z line shows the patched version.
  2. On the live site, run window.next?.version in the console (if your app exposes it).
  3. Run npm audit on the committed lockfile. The Next.js advisories should be gone.
  4. Check that production still works: sign-in, checkout, image-heavy pages, forms, and anything using Server Actions.
  5. Turn on GitHub Dependabot alerts (repo → Settings → Advanced Security) so the next advisory reaches you without you having to look for it.

Checklist

  1. Confirm the app uses Next.js ("next" in package.json).
  2. Find the installed version with npm ls next or the lockfile.
  3. Compare it with the latest advisory on nextjs.org/blog/security.
  4. Update within your release line, plus any packages the advisory names.
  5. Commit the lockfile, test a preview, then promote to production.
  6. Confirm the version in the production build log and with npm audit.
  7. If you ran a version with a remote code execution flaw, review your logs and rotate server secrets.
  8. Turn on Dependabot alerts and watch the Next.js security page monthly.

What ShipCheck checks here (and what it doesn't)

ShipCheck doesn't detect your Next.js version or check it against advisories. Use the lockfile, npm audit and Dependabot for that. What the scan checks on your live site is the damage an outdated or rushed deploy often leaves behind: secret key formats in your HTML, JavaScript bundles and public source maps; publicly served /.env files or /.git; missing security headers and the HTTP to HTTPS redirect; SSL certificate and domain expiry; and what search engines see without JavaScript. Paid plans re-scan automatically, weekly on Solo ($12/mo) or daily on Builder ($29/mo), and check once a day that your app is up.

FAQ

How do I check which Next.js version my app uses?

Run npm ls next in the project to see the installed version, or search the lockfile (package-lock.json, pnpm-lock.yaml or yarn.lock) for next. package.json only shows an allowed range like ^15.5.0. The deploy log also prints it (for example '▲ Next.js 16.4.1'), and in most Next.js apps window.next?.version in the browser console shows it on the live site.

Are Lovable apps affected by Next.js vulnerabilities?

Usually not, because Lovable builds apps on Vite + React or TanStack Start rather than Next.js. If you exported a Lovable project and moved it to Next.js, or your package.json lists next, then Next.js advisories apply. Either way, run npm audit to catch advisories in your other dependencies.

Which Next.js versions still get security patches?

The Next.js support policy currently lists 16.x as Active LTS and 15.x as Maintenance LTS; 14.x and older are unsupported. The latest security release (3 November 2026) shipped as 16.4.5 and 15.5.29. Maintenance LTS lasts two years from a major's first release, so check nextjs.org/support-policy before relying on 15.x.

Does Vercel protect my app if I don't update Next.js?

Not reliably. Next.js says it coordinates with hosting providers to deploy mitigations like firewall rules before or around a security release, but those are a stopgap. Some issues have no workaround at all, so updating to the patched version is the actual fix, on any host.

Will a Next.js security patch break my app?

A patch on the same release line (for example 15.5.28 to 15.5.29) is the lowest-risk update you can make, but test it anyway: build locally, deploy a preview, and click through sign-in, payments, images and forms before promoting to production. Major version upgrades are much more likely to need code changes and shouldn't be rushed.

Can ShipCheck tell me if my Next.js version is vulnerable?

No. ShipCheck doesn't detect framework versions. Use npm ls next, npm audit and GitHub Dependabot alerts. ShipCheck checks your live site for leaked secret keys in HTML, JavaScript and public source maps, exposed /.env and /.git, security headers, the HTTPS redirect, SSL and domain expiry, and what search engines see without JavaScript.

Run the same checks on your app.

A free scan takes under a minute. No card, and no sign-up to see your score and the list of issues.

See an example report