Next.js ships security patches almost monthly: which version you need now (Nov 2026)
Updated · by the Bologu team
Next.js is one of the frameworks AI tools reach for most, from v0 to Bolt and Cursor. In 2026 new Next.js vulnerabilities were announced almost every month, and several were serious enough to let outsiders run code on the server without logging in. A site that was deployed and never updated keeps getting riskier, even if nobody touches its code.
Short version: which version you need now
- Next.js 16: at least
16.4.5(released November 3, 2026). - Next.js 15: at least
15.5.29, but under the Next.js policy the 15 line reached the end of its two-year maintenance window on October 21, 2026. Plan your move to 16. - Next.js 14 and older: no longer get security patches. Upgrade.
What came out this year
Since July 13, 2026 the Next.js team has shipped security patches on a pre-announced schedule, roughly monthly, with extra releases for urgent issues:
- Jul 21: 9 vulnerabilities, including middleware bypass, SSRF in Server Actions and denial of service (fixed in 16.2.11 / 15.5.21).
- Aug 25: 2 critical flaws allowing unauthenticated remote code execution, one of them affecting Windows-hosted servers (fixed in 16.3.3 / 15.5.24).
- Sep 22: a critical flaw in
ImageResponse(the social-preview image generator). If the site puts values from the URL into the image, outsiders can run code on the server (16.2.0–16.3.5, fixed in 16.3.6). - Oct 14: 2 critical flaws: one in the image optimizer when handling SVG files on Linux (from the
sharplibrary), one in theuse cachefeature (fixed in 16.4.1 / 15.5.28). - Nov 3: 7 vulnerabilities. The most serious lets one customer’s cached data show up for another on sites that use
use cacheper customer (fixed in 16.4.5 / 15.5.29).
Many only affect sites using certain features or hosting setups, but checking each one against your site takes longer than updating. For some, such as the October use cache flaw, the Next.js team advised upgrading immediately even if your app doesn’t use that pattern.
Don’t rely on npm audit alone
When the ImageResponse flaw came out, The Hacker News found that npm audit did not yet flag the affected version and no CVE record had been published. Databases lag behind patches, so compare the version you actually have installed against the list above.
Check and update
npm ls next sharp
# then, for Next.js 16:
npm install next@latest
# or, if you must stay on 15 for now:
npm install [email protected]- Run
npm ls next sharpin the project folder to see the installed versions.sharpshould be 0.35.5 or later. - Update, and commit the lockfile too.
- Build and redeploy. Fixing it on GitHub isn’t enough; the live site keeps running the old version until you deploy.
- Follow nextjs.org/blog/security. The team announces releases about a week ahead.
A prompt for your AI
Upgrade Next.js in this project to the latest 16.x release (at least 16.4.5).
1. Read the official upgrade guide for any breaking changes between our version and 16.x
and apply them.
2. Make sure the installed sharp version is 0.35.5 or later (npm ls sharp).
3. Commit the updated lockfile, and make the build use npm ci.
4. Run the build and tests, and list anything that changed behaviour.
Do not change anything unrelated to the upgrade.Let Bologu check for you
The website scan (free) reads the versions of Next.js and other libraries your pages send to the browser and compares them with the OSV.dev vulnerability database. If the version can’t be read from the page, the GitHub code check reads it from your lockfile. (Bologu uses the same kind of database, so like npm audit it can lag behind Next.js announcements.)
Sources
- Next.js: November 2026 Security Release
- Next.js: Security Update for Upstream Vulnerabilities (Oct 14, 2026)
- The Hacker News: Critical Next.js ImageResponse flaw (Sep 2026)
- Netlify: Two critical Next.js vulnerabilities (Aug 25, 2026)
- Next.js: Security release program (Jul 13, 2026)
- Next.js Support Policy
Read next
- npm malware wave of 2026: why AI-built sites are at risk, and how to protect yours
- Lessons from Moltbook: a fully AI-built site that let anyone read and edit its database
- Security checklist before launching an AI-built website
- What is Supabase RLS, and how to check your customers' data isn't exposed
- API key leaked in your website: how to check, and what to do right away
