Packages / next / Security

CriticalVulnerabilityGHSA-2464-fhr4-w9xwPublished 22 Oct 2026

Next.js: Unauthenticated Remote Code Execution in Image Optimization API when SVG files are used

Affected releases · next

  • 16.x16.0.0 – 16.4.0Fixed in 16.4.1
  • 15.x15.0.0 – 15.5.27Fixed in 15.5.28
  • 14.x14.0.0 – 14.2.35No fix on this line yet
  • 13.x and older10.0.0 – 13.5.11No fix, no longer updated

On 16.x, the newest line:

npm install next@16.4.1
16.x
  1. Affected

    16.0.0 – 16.4.0

    43 releases

  2. Fixed

    16.4.1 – 16.4.2

    2 releases, latest

15.x
  1. Affected

    15.0.0 – 15.5.27

    81 releases

  2. Fixed

    15.5.28

    1 release

14.x
  1. Affected

    14.0.0 – 14.2.35

    46 releases

13.x
  1. Affected

    13.0.0 – 13.5.11

    56 releases

12.x
  1. Affected

    12.0.0 – 12.3.7

    33 releases

11.x
  1. Affected

    11.0.0 – 11.1.4

    7 releases

10.x
  1. Affected

    10.0.0 – 10.2.3

    18 releases

423 stable releases of next, oldest to newest, one row per major.

Is your project affected?

Paste your package.json, or type the range you declare for next. It is read in your browser and sent nowhere.

What happens

Impact

A memory-related vulnerability has been discovered in an upstream library used for Image Optimization can lead to possible remote code execution (RCE) when Next.js runs on glibc-based Linux.

Workaround

Ensure the version of sharp used by Next.js is greater than or equal to 0.35.5. Fresh installs automatically get a fixed version of sharp. Upgrading Next.js to the patched versions will ensure package managers automatically provide a fixed version of sharp to Next.js.