NewApp Monitoring is liveSign up free
AgentbeamBeta
Open-source package vulnerability · npm

CVE-2025-59471: Next.js self-hosted applications vulnerable to DoS via Image Optimizer remotePatterns configuration

mediumCVSS 3.1 5.9GHSA-9g9p-9gw9-jx7f

A DoS vulnerability exists in self-hosted Next.js applications that have remotePatterns configured for the Image Optimizer. The image optimization endpoint (/next/image) loads external images entirely into memory without enforcing a maximum size limit, allowing an attacker to cause out-of-memory conditions by requesting optimization of arbitrarily large images.

Published Jan 27, 2026

Affected packages

next

Ecosystem
npm
Affected
>= 10.0.0, < 15.5.10
Fixed in
15.5.10
Check
npm ls next

next

Ecosystem
npm
Affected
>= 15.6.0-canary.0, < 16.1.5
Fixed in
16.1.5
Check
npm ls next

Advisory details

From the GitHub Advisory Database (CC BY 4.0).

A DoS vulnerability exists in self-hosted Next.js applications that have remotePatterns configured for the Image Optimizer. The image optimization endpoint (/_next/image) loads external images entirely into memory without enforcing a maximum size limit, allowing an attacker to cause out-of-memory conditions by requesting optimization of arbitrarily large images. This vulnerability requires that remotePatterns is configured to allow image optimization from external domains and that the attacker can serve or control a large image on an allowed domain.

Strongly consider upgrading to 15.5.10 and 16.1.5 to reduce risk and prevent availability issues in Next applications.

References

How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology

More npm vulnerabilities

All npm entries