CVE-2025-59471
JSON

5.9medium

Next.js self-hosted applications vulnerable to DoS via Image Optimizer remotePatterns configuration

Severity
5.9medium CVSS:3.1 by hackerone
Exploit likelihood
0.49% (higher than 43% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
hackerone
Also known as
GHSA-9g9p-9gw9-jx7f

Description

A denial of service 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 or 16.1.5 to reduce risk and prevent availability issues in Next applications.

Affected

Product or packageVersionsReported by
vercel nextfrom 10.0 before 10.0, from 11.0 before 11.0, from 12.0 before 12.0, from 13.0 before 13.0, from 14.0 before 14.0, from 15.0 before 15.5.10, from 16.0 before 16.1.5CVE List
next (npm)from 10.0.0 before 15.5.10, from 15.6.0-canary.0 before 16.1.5GitHub Advisory Database
vercel next.jsfrom 10.0.0 before 15.5.10, from 16.0.0 before 16.1.5NVD

All scores

hackerone5.9medium CVSS:3.1CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H
GitHub5.9medium CVSS:3.1CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H
NVD7.5high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Classification

CWE-400CWE-770

SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.

What each source says

CVE List

A denial of service 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 or 16.1.5 to reduce risk and prevent availability issues in Next applications.

GitHub Advisory Database

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.

NVD (es)

Una vulnerabilidad de denegación de servicio existe en aplicaciones Next.js autoalojadas que tienen `remotePatterns` configurado para el Optimizador de Imágenes. El endpoint de optimización de imágenes (`/_next/image`) carga imágenes externas completamente en memoria sin aplicar un límite de tamaño máximo, permitiendo a un atacante causar condiciones de falta de memoria al solicitar la optimización de imágenes arbitrariamente grandes. Esta vulnerabilidad requiere que `remotePatterns` esté configurado para permitir la optimización de imágenes desde dominios externos y que el atacante pueda servir o controlar una imagen grande en un dominio permitido. Considere encarecidamente actualizar a 15.5.10 o 16.1.5 para reducir el riesgo y prevenir problemas de disponibilidad en aplicaciones Next.

References

Sources

SourceRecordLicence
CVE ListCVE-2025-59471 changed 2026-01-27CVE Terms of Use
GitHub Advisory DatabaseGHSA-9g9p-9gw9-jx7f changed 2026-09-10CC-BY-4.0
NVDCVE-2025-59471 changed 2026-06-17Public domain