Skip to content
Next.js Image API and Cache Flaws Enable Unauthenticated Remote Code Execution
Vulnerabilities

Next.js Image API and Cache Flaws Enable Unauthenticated Remote Code Execution

Vercel patches critical remote code execution bugs in Next.js image processing and caching components, urging immediate updates for all production deployments.

Key points

  • Two critical RCE flaws affect Next.js Image Optimization API and App Router cache components.
  • Patches are available in Next.js v16.4.1 and v15.5.28; no workaround exists for the cache flaw.
  • A high-severity DoS bug impacts apps using Server Actions via excessive CPU consumption.

Vercel has released an out-of-band security update for Next.js addressing two critical remote code execution vulnerabilities and one high-severity denial-of-service issue. The patches resolve flaws in the Image Optimization API and App Router cache components that could allow unauthenticated attackers to run arbitrary code or disrupt service availability.

What happened

Vercel published an emergency update for Next.js to fix two critical remote code execution flaws and one high-severity denial-of-service bug. One critical vulnerability, identified as CVE-2026-96889, resides in the Image Optimization API and is triggered through SVG processing. According to Vercel disclosures, this update includes fixes postponed from the September 2026 release due to upstream dependency delays.

The SVG processing flaw is a memory-related vulnerability in an upstream library used for image optimization. It allows unauthenticated remote code execution on glibc-based Linux systems running Next.js. Vercel rates this issue as critical because the feature is commonly exposed in production environments without authentication requirements.

The second critical flaw affects applications using the App Router with Cache Components. It enables unauthenticated remote code execution when a cache function returns multiple typed arrays. Vercel states there is no known workaround for this specific issue and advises immediate upgrading, even for applications that do not currently use similar functions.

A related high-severity vulnerability allows crafted requests to cause excessive CPU usage in App Router applications with at least one Server Action. This CPU load blocks other requests in the same process, resulting in a denial of service. Applications using the Pages Router or those without Server Actions are not vulnerable to this specific issue.

Why it matters

These vulnerabilities expose production environments to significant risk because they require no authentication to exploit. The image processing flaw specifically targets glibc-based Linux systems, which are common in many deployment environments. Teams using Alpine or other musl-based base images are not named as affected, but they should verify their specific configurations rather than assuming safety.

The absence of a workaround for the cache component flaw makes immediate patching essential for affected applications. The denial-of-service vector further complicates matters by targeting the CPU resources of any application utilizing Server Actions.

What to watch

  • Monitor for unexpected SVG processing requests in image optimization logs.
  • Track CPU usage spikes in applications utilizing Server Actions.
  • Watch for anomalous behavior in cache component responses.
  • Verify that upstream dependencies are updated to secure versions.

Signals worth monitoring

Teams usually detect this type of activity by reviewing web server access logs for unusual SVG requests or unexpected cache function calls. Check whether application performance metrics show sudden CPU saturation without corresponding traffic increases. Look for signs of unauthorized process spawning or unexpected network connections originating from the application container. Investigate any error logs related to memory allocation failures in image processing modules. Ensure that logging captures detailed request payloads to identify crafted inputs targeting cache components.

What to do and how to stay safe: Next.js

  • Upgrade Next.js to version 16.4.1 or 15.5.28 using your package manager to apply the critical patches.
  • Verify that the sharp library version is 0.35.5 or later if you cannot immediately upgrade Next.js.
  • Audit your application to confirm whether it uses App Router cache components or Server Actions.
  • Confirm your base image type to determine if you are running on glibc-based Linux or musl-based environments.

General security guidance from the Firewall Chronicle newsroom. It is not confirmed advice from the organisations named in this story.

Frequently asked questions

Which Next.js versions contain the fixes for these vulnerabilities?

Patches are available in Next.js v16.4.1 for the Active LTS line and v15.5.28 for the Maintenance LTS line.

Is there a workaround for the cache component vulnerability?

Vercel states there is no known workaround for the cache component flaw and advises immediate upgrading.

Are Alpine or musl-based environments affected by the SVG processing flaw?

These environments are not named as affected in the advisory, but teams should confirm their base images rather than assume safety.

Sources

  1. GBHackers
Next.jsVercelCVE-2026-96889Remote Code ExecutionDenial of Service

Related stories

Totolink X2000R Stack Overflow in static_dns1 Parameter Allows Authenticated Code Execution

Authenticated HTTP requests targeting the static_dns1 parameter in Totolink X2000R firmware can trigger critical stack-based buffer overflows and arbitrary code execution.