← All advisories

CVE-2026-96889criticalCode execution2026-10-14

CVE-2026-96889: Next.js image optimization RCE via SVG

A memory bug in an upstream library used by Next.js Image Optimization can lead to unauthenticated remote code execution when SVG files are processed and Next.js runs on glibc-based Linux. Fixed in 16.4.1 and 15.5.28.

01.

What it is

Next.js security release, 14 October 2026: “A memory-related vulnerability in an upstream library used for Image Optimization can lead to remote code execution when Next.js runs on glibc-based Linux.” Vercel rates it critical and says no login is needed.

NVD’s record for CVE-2026-96889 describes the upstream flaw: a use-after-free in librsvg when parsing an SVG with nested XML inclusions and duplicate entity declarations, which “could potentially” allow arbitrary code execution.

This was one of two fixes postponed from the September release because of upstream dependency delays.

02.

How to check

  1. Affected: next (npm) 10.0.0 through 15.5.27, and above 16.0.0 through 16.4.0.
  2. Check which sharp version Next.js is using. 0.35.5 or later has the fix (commands below).
03.

How to fix

  1. Upgrade next to 16.4.1 (16.x) or 15.5.28 (15.x). Package managers then pull a fixed sharp automatically.
  2. If you can’t upgrade yet, make sure the sharp used by Next.js is 0.35.5 or later.
npm ls next sharp
npm install [email protected]   # or [email protected] on 15.5
04.

Sources

More advisories for this tool
The weekly email

One email a week. Only what changed.

Every new security hole in AI coding tools, MCP servers, app builders and the stacks they generate (Next.js, Supabase, Node, PHP), each with how to check your app and the fix. No roundups of things you already read.

Free, one email a week. Read the latest issue first if you like. One-click unsubscribe in every email. We never sell or share addresses.