llamaCVEVulnerability Intelligence
/
Advisory · GitHub · PyPI · scrapy

GHSA-23J4-MW76-5V7H

Scrapy allows redirect following in protocols other than HTTP

Texto original en inglés · Ver en español

Parche disponible
Descargar PNG JSON
CVSS
—
medium
Fuente: —
ExplotaciónSin evidenciaNo figura en CISA KEV
Exploits públicos0Ninguno conocido
Parche1 versiónPrimer parche el mismo día de la divulgación
Exposición921 dDesde la divulgación, 14 may 2024, 3:14 p. m.
Detección916 dDesde la divulgación hasta su ingreso al índice
Decisión estimadaSeguir
Remediar en la ventana regular de mantenimiento
Estimación de Llama con el árbol SSVC de CISA a partir de la severidad declarada por GHSA (media) y la evidencia de explotación (sin evaluación oficial): sin explotación conocida, no automatizable e impacto técnico parcial. Hay versiones corregidas disponibles.
Ni pánico ni ignorarla: término medio.Si haces parches mensuales, ya estás cubierto.
Timeline

Ciclo de vida de la vulnerabilidad

Hoy
Divulgación
Publicada
Modificada
Explotación
Remediación
Parche 2.11.2
Monitoreo
Detectada
14 may 24
28 nov 24
17 nov 26
21 nov 26
14 may 24
31 dic 24
18 ago 25
5 abr 26
21 nov 26
FechaFaseEventoDetalle
Divulgación Publicada GHSA-23J4-MW76-5V7H divulgada
Remediación Parche 2.11.2 scrapy · 0 d desde divulgación
Divulgación Modificada Última actualización del registro
Monitoreo Detectada Ingresó al índice
Resumen
Descripción del advisory
Texto original · GitHub · en inglés
Impact

Scrapy was following redirects regardless of the URL protocol, so redirects were working for `data://`, `file://`, `ftp://`, `s3://`, and any other scheme defined in the `DOWNLOAD_HANDLERS` setting.

However, HTTP redirects should only work between URLs that use the `http://` or `https://` schemes.

A malicious actor, given write access to the start requests (e.g. ability to define `start_urls`) of a spider and read access to the spider output, could exploit this vulnerability to:
- Redirect to any local file using the `file://` scheme to read its contents.
- Redirect to an `ftp://` URL of a malicious FTP server to obtain the FTP username and password configured in the spider or project.
- Redirect to any `s3://` URL to read its content using the S3 credentials configured in the spider or project.

For `file://` and `s3://`, how the spider implements its parsing of input data into an output item determines what data would be vulnerable. A spider that always outputs the entire contents of a response would be completely vulnerable, while a spider that extracted only fragments from the response could significantly limit vulnerable data.

Patches

Upgrade to Scrapy 2.11.2.

Workarounds

Replace the built-in retry middlewares (`RedirectMiddleware` and `MetaRefreshMiddleware`) with custom ones that implement the fix from Scrapy 2.11.2, and verify that they work as intended.

References

This security issue was reported by @mvsantos at https://github.com/scrapy/scrapy/issues/457.

Incluye detalles técnicos publicados por el investigador. Úselos solo para validar y corregir sus propios sistemas.

Versiones

Rangos afectados

Afectada Corregida Última
scrapy< 2.11.2
2.11.2
2.20.0
Remediación

Estado del parche por paquete

Paquete / productoEstadoCorregida enDesde divulgaciónÚltima versión
pypiscrapy
Corregida 2.11.2 0 d 2.20.0 no afectada
Versiones corregidas2.11.2
Explotación

Arsenal público

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

Referencias
Otrahttps://github.com/scrapy/scrapy/security/advisories/GHSA-23j4-mw76-5v7h
Otrahttps://github.com/scrapy/scrapy/issues/457
Otrahttps://github.com/scrapy/scrapy/commit/36287cb665ab4b0c65fd53181c9a0ef04990ada6
Otrahttps://github.com/scrapy/scrapy

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