Skip to content
NewCybercrime Report 2026 · Eight Chapters · A Post Is Not An Incident → Explore The ChaptersCybercrime Report 2026 → Explore

Next.js Image Optimization remote code execution (CVE-2026-96889)

CVE-2026-96889 is a critical flaw in the Next.js Image Optimization API.

Published
Updated
Reading Time
4 min read
Dark glass glass picture frame with a shattered corner and red glow with red neon lines, cover art for: Next.js Image Optimization remote code execution (CVE-2026-96889)

Vercel says a memory flaw in an upstream library can lead to unauthenticated remote code execution when SVG files are used and Next.js runs on glibc-based Linux. The Next.js advisory rates it 9.5 on CVSS v4.0. It is fixed in Next.js 15.5.28 and 16.4.1.

What it allows

The Next.js advisory says a memory-related flaw in an upstream library used for Image Optimization can lead to remote code execution when Next.js runs on glibc-based Linux. Its CVSS v4.0 vector rates the flaw Critical. It is reachable over the network, needs no privileges and no user interaction, but has attack requirements present.

The NVD record for the same CVE id describes the upstream cause in librsvg. When the library parses an SVG with nested XML includes and a duplicate entity declaration, it can free an entity that is still in use. NVD says an attacker could cause a denial of service or run code. Red Hat scored the library flaw 7.8 on CVSS v3.1 with a local attack vector and user interaction required. The Next.js advisory scores the Next.js case separately.

The NVD record carries a CISA coordinator entry dated 25 September 2026 with exploitation marked "poc", automatable "no" and technical impact "total". In our dark web and Telegram sources, a vulnerability feed listed a public lab proof of concept for the Next.js case on 16 October 2026. We did not open it.

The researcher who found the librsvg bug, who goes by rafabd1 on GitHub, keeps a public write-up on GitHub. The repository was created on 21 September 2026 and last changed on 15 October. The write-up says the author confirmed command execution through both Next.js routes, the Image Optimization API and the next/og ImageResponse route, and on a Ghost CMS site.

It also says a working public exploit exists for the ImageResponse route, tied to one pinned build, and that there is no universal exploit for the whole chain. The author says a full technical write-up is still to come. These are the author's claims. We did not run any of the code.

Who is affected

The advisory lists Next.js 10.0.0 to 15.5.27 and the 16 line above 16.0.0 up to 16.4.0 as affected. The patched versions are 15.5.28 and 16.4.1. Vercel's post names 16.4 as the Active LTS line and 15.5 as the Maintenance LTS line.

The advisory ties the flaw to Next.js running on glibc-based Linux and to SVG files in the Image Optimization API. It does not say that other operating systems or hosts are affected, and it makes no statement about managed hosting. As a workaround, Vercel says to make sure the sharp version used by Next.js is 0.35.5 or later. Vercel says upgrading Next.js brings a fixed sharp version automatically. The 15.5.28 package manifest still accepts the sharp 0.34 line, so on the 15.5 line confirm 0.35.5 or later in the built image.

NVD also lists CVE-2026-114111, a record from VulnCheck. It says sharp before 0.35.5 bundles the affected librsvg and can lead to code execution on glibc-based Linux.

The Next.js use cache flaw GHSA-673q-mjm6-r5xr, fixed the same day, has its own page. For the full list of fixes shipped on 14 October, read our Next.js and Node.js patch guide. To check that the image fix reached your build, read our Next.js RCE patch check.

Timeline

  1. 23 Sep 2026

    The RustSec database and the NVD record publish the upstream librsvg use-after-free flaw that carries this CVE id.

  2. 25 Sep 2026

    The CISA coordinator entry on the NVD record marks exploitation as "poc", automatable as "no" and technical impact as "total".

  3. 14 Oct 2026

    Vercel publishes Next.js 15.5.28 and 16.4.1 and the advisory GHSA-2464-fhr4-w9xw, rated Critical.

What to do

  1. Find your Next.js version

    Run npm ls next in each project and in each container image. Anything from 10.0.0 to 15.5.27, or 16.x above 16.0.0 up to 16.4.0, is in scope.

  2. Update Next.js

    Install next@15.5.28 for the 15.5 line or next@16.4.1 for the 16.4 line, rebuild the image and redeploy. Vercel says this also brings a fixed sharp.

  3. Check sharp

    Run npm ls sharp. If you cannot update Next.js today, install sharp 0.35.5 or later, as the Vercel workaround says, and redeploy.

  4. Check where it runs

    The advisory names glibc-based Linux. Note which of your containers and servers use it, and do the exposed image endpoints first.

  5. Look for signs of abuse

    Review logs of the image endpoint for unusual SVG requests, and watch for web processes that start shells or download tools. The vendor advisories publish no indicators of compromise.

What Brandefense can do

Frequently Asked Questions

What is CVE-2026-96889?

It is a critical flaw in the Next.js Image Optimization API. A memory flaw in an upstream SVG library can lead to unauthenticated remote code execution on glibc-based Linux. The Next.js advisory rates it 9.5 on CVSS v4.0.

Which Next.js versions fix it?

Next.js 15.5.28 and 16.4.1, published on 14 October 2026. Versions from 10.0.0 to 15.5.27 and the 16 line above 16.0.0 up to 16.4.0 are listed as affected.

Why does NVD show a lower score?

The NVD record describes the library flaw alone, which Red Hat scored 7.8 on CVSS v3.1 with a local attack vector. The Next.js advisory scores the Next.js case separately, at 9.5 on CVSS v4.0 with a network attack vector.

Is CVE-2026-96889 exploited in the wild?

The CVE is not in the CISA Known Exploited Vulnerabilities catalog as of 27 October 2026. CISA's entry in the NVD record marks exploitation as proof of concept. The researcher who found the library flaw says command execution was confirmed through the Next.js Image Optimization API. We have not verified that, so patch now.

Sources

  1. Next.js Security Update for Upstream Vulnerabilities (14 October 2026)Next.js
  2. Unauthenticated Remote Code Execution in Image Optimization API when SVG files are usedGitHub
  3. CVE-2026-96889NVD
  4. RUSTSEC-2026-0305: librsvg use-after-free when XML includes have duplicated entitiesRustSec
  5. Known Exploited Vulnerabilities catalogCISA
  6. Next.js 15.5.28 package manifestnpm registry
ShareLinkedInX
Brandefense logo

Stay Ahead of Digital Threats.

Take control of your digital security with an exclusive demo of our AI-driven threat intelligence platform.

Open The Full Demo Form →