← volver
CVE-2021-39178

XSS in Image Optimization API for Next.js versions between 10.0.0 and 11.1.0

CVSS 7.5 HIGHEPSS 1.1%CWE-79
En resumen

Next.js versiones 10.0.0 a 11.0.0 permiten que atacantes inyecten código malicioso a través de imágenes SVG cuando la API de optimización de imágenes está configurada. Si un sitio permite que usuarios carguen o referencien archivos SVG desde dominios configurados, los atacantes pueden ejecutar JavaScript arbitrario en los navegadores de los visitantes.

Detalle técnico

Vulnerabilidad de cross-site scripting (XSS) en la API de Optimización de Imágenes de Next.js versiones 10.0.0–11.0.0. Requiere: (1) `images.domains` configurado en next.config.js, (2) dominio permitiendo SVGs proporcionados por usuarios, y (3) uso del cargador predeterminado (no cargador personalizado ni despliegue en Vercel). Payloads SVG en parámetros de imagen eluden sanitización, permitiendo ejecución de scripts arbitrarios.

Resumen generado y traducido por IA a partir de la descripción oficial.
Next.js is a React framework. Versions of Next.js between 10.0.0 and 11.0.0 contain a cross-site scripting vulnerability. In order for an instance to be affected by the vulnerability, the `next.config.js` file must have `images.domains` array assigned and the image host assigned in `images.domains` must allow user-provided SVG. If the `next.config.js` file has `images.loader` assigned to something other than default or the instance is deployed on Vercel, the instance is not affected by the vulnerability. The vulnerability is patched in Next.js version 11.1.1.
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H
Productos afectados
vercel · next.js

¿Quieres saber si tu infraestructura está expuesta a esto?

Hablar con TrueHacking →