llamaCVEVulnerability Intelligence
/
next.js

CVE-2021-39178

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

Solo en configuraciones específicasParche disponible
Descargar PNG JSON
CVSS 3.1
7.5
Alta
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H Fuente: CNA
6.1NVD · CVSS 3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
ExplotaciónSin evidenciaNo figura en CISA KEV
Exploits públicos0Ninguno conocido
Parche1 versión11.1.1
Exposición1.908 dDesde la divulgación, 30 ago 2021, 6:55 p. m.
Detección1.890 dDesde la divulgación hasta su ingreso al índice
Timeline

Ciclo de vida de la vulnerabilidad

Hoy
Divulgación
Publicada
Modificada
Explotación
Remediación
Monitoreo
Detectada
Verificada
30 ago 21
4 ago 24
3 nov 26
18 nov 26
21 nov 26
30 ago 21
21 dic 22
11 abr 24
1 ago 25
21 nov 26
FechaFaseEventoDetalle
Divulgación Publicada CVE-2021-39178 divulgada · CVSS 7.5 (CNA)
Divulgación Modificada Última actualización del registro
Monitoreo Detectada Ingresó al índice
Monitoreo Verificada Última verificación contra las fuentes
Resumen

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.

Only affects Next.js 10.0.0 through 11.1.0 that set images.domains in next.config.js to a host serving user-provided SVG. Fixed in 11.1.1.

¿Qué significa?The Image Optimization API in Next.js can be abused to run cross-site scripting (XSS), which injects script into pages viewed by other users. The flaw involves SVG images served from hosts listed in images.domains.
¿Quién está afectado?Next.js versions from 10.0.0 through 11.1.0 are affected, and only when next.config.js has an images.domains array that includes a host allowing user-provided SVG. To check, run the next version command in the project and look at the images.domains setting in next.config.js.
¿Qué hacer?Upgrade Next.js to 11.1.1 or later, which contains the fix.
Contexto

Condiciones y alcance

Condiciones necesarias para que el fallo sea explotable
01
Next.js version between 10.0.0 and 11.1.0“Next.js between version 10.0.0 and 11.1.0”
02
The next.config.js file has images.domains array assigned“The next.config.js file has images.domains array assigned”
03
The image host assigned in images.domains allows user-provided SVG“The image host assigned in images.domains allows user-provided SVG”
¿Quién debe revisar?Teams running Next.js 10.0.0 through 11.1.0 that set images.domains in next.config.js and do not deploy on Vercel.
Vector CVSS 3.1

Desglose de métricas

Opción resaltada = valor del vector · izquierda = peor caso · CNA
Vector de ataqueAV:N
RedAdyacenteLocalFísica
ComplejidadAC:H
BajaAlta
PrivilegiosPR:N
NingunoBajosAltos
InteracciónUI:R
NingunaRequerida
AlcanceS:U
CambiadoSin cambio
ConfidencialidadC:H
AltoBajoNinguno
IntegridadI:H
AltoBajoNinguno
DisponibilidadA:H
AltoBajoNinguno
Score de explotaciónQué tan fácil y probable es que la exploten
5.9/ 10Medio
Vector 5.9 (moderada) · sin evidencia de explotación.
Versiones

Rangos afectados

Afectada Corregida Última
next.js · next≥ 10.0.0 < 11.1.1
10.0.0
11.1.1
16.4.6
Remediación

Estado del parche por paquete

Paquete / productoEstadoCorregida enDesde divulgaciónÚltima versión
npmnext
Corregida 11.1.1 — 16.4.6 no afectada
Versiones corregidas11.1.1
Explotación

Arsenal público

Sin exploits, módulos ni PoC públicos conocidos a la fecha de verificación.

Referencias
Fabricantehttps://github.com/vercel/next.js/security/advisories/GHSA-9gr3-7897-pp7m
Otrahttps://github.com/vercel/next.js/releases/tag/v11.1.1

Las referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.