llamaCVEVulnerability Intelligence
/
Advisory · GitHub · PyPI · Scrapy

GHSA-466X-P45J-M4FX

Per-request http_user and http_pass credentials leaked on cross-domain redirects

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

Parche disponible
Descargar PNG JSON
CVSS 4.0
8.2
Alta
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N Fuente: GitHub
ExplotaciónSin evidenciaNo figura en CISA KEV
Exploits públicos0Ninguno conocido
Parche1 versiónPrimer parche el mismo día de la divulgación
Exposición15 dDesde la divulgación, 6 nov 2026, 1:23 p. m.
Detección13 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 vector CVSS 4.0 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.
Ponle fecha: las tareas sin fecha son leyendas.Programa la remediación y duerme tranquilo.
Timeline

Ciclo de vida de la vulnerabilidad

Hoy
Divulgación
Publicada
Explotación
Remediación
Parche 2.20.0
Monitoreo
Detectada +1
6 nov 26
20 nov 26
21 nov 26
6 nov 26
10 nov 26
14 nov 26
18 nov 26
21 nov 26
FechaFaseEventoDetalle
Divulgación Publicada GHSA-466X-P45J-M4FX divulgada · CVSS 8.2 (GitHub)
Remediación Parche 2.20.0 Scrapy · 0 d desde divulgación
Monitoreo Detectada Ingresó al índice
Monitoreo Verificada Última verificación contra las fuentes
Resumen
Descripción del advisory
Texto original · GitHub · en inglés
Impact

Since version 2.17.0, the `http_user` https://docs.scrapy.org/en/latest/topics/request-response.html#http-user and `http_pass` https://docs.scrapy.org/en/latest/topics/request-response.html#http-pass request meta keys let `HttpAuthMiddleware` https://docs.scrapy.org/en/latest/topics/downloader-middleware.html#scrapy.downloadermiddlewares.httpauth.HttpAuthMiddleware set the `Authorization` header of a request. When `http_auth_domain` https://docs.scrapy.org/en/latest/topics/request-response.html#http-auth-domain was not set as well, those credentials were sent to any URL.

`RedirectMiddleware` https://docs.scrapy.org/en/latest/topics/downloader-middleware.html#scrapy.downloadermiddlewares.redirect.RedirectMiddleware removes the `Authorization` header on cross-domain redirects (GHSA-cw9j-q3vf-hrrv https://github.com/scrapy/scrapy/security/advisories/GHSA-cw9j-q3vf-hrrv), but the redirect request kept those meta keys, so `HttpAuthMiddleware` added the header again, sending the credentials to the redirect target. A website could redirect Scrapy to a host under its control to steal those credentials.

Patches

Upgrade to Scrapy 2.20.0+.

In Scrapy 2.20.0, when `http_auth_domain` is not set, `http_user` and `http_pass` are only sent to the origin (scheme, host and port) of the request where they were first used.

Workarounds

If you cannot upgrade to Scrapy 2.20.0, consider the following mitigations.

  • Set `http_auth_domain`: Whenever you set `http_user` or `http_pass`, set `http_auth_domain` to the domain of the credentials. Its subdomains get the credentials as well. For example:
Request(
    "https://example.com/api",
    meta={
        "http_user": "alice",
        "http_pass": "secret",
        "http_auth_domain": "example.com",
    },
)
  • Set the header yourself: Instead of the meta keys, set the `Authorization` header with `basic_auth_header()` https://w3lib.readthedocs.io/en/latest/w3lib.html#w3lib.http.basic_auth_header. `RedirectMiddleware` removes it on cross-domain redirects, and nothing adds it back. For example:
from w3lib.http import basic_auth_header

Request(
    "https://example.com/api",
    headers={"Authorization": basic_auth_header("alice", "secret")},
)
Vector CVSS 4.0

Desglose de métricas

Opción resaltada = valor del vector · izquierda = peor caso · GitHub
Vector de ataqueAV:N
RedAdyacenteLocalFísica
ComplejidadAC:L
BajaAlta
Requisitos de ataqueAT:P
NingunoPresentes
PrivilegiosPR:N
NingunoBajosAltos
InteracciónUI:N
NingunaPasivaActiva
Confid. (sistema)VC:H
AltoBajoNinguno
Integridad (sistema)VI:N
AltoBajoNinguno
Disponib. (sistema)VA:N
AltoBajoNinguno
Confid. (posterior)SC:N
AltoBajoNinguno
Integridad (posterior)SI:N
AltoBajoNinguno
Disponib. (posterior)SA:N
AltoBajoNinguno
Score de explotaciónQué tan fácil y probable es que la exploten
7.1/ 10Alto
Vector 7.1 (fácil) · sin evidencia de explotación.
Versiones

Rangos afectados

Afectada Corregida Última
Scrapy≥ 2.17.0 < 2.20.0
2.17.0
2.20.0
Remediación

Estado del parche por paquete

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

Arsenal público

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

Referencias
Advisoryhttps://github.com/scrapy/scrapy/security/advisories/GHSA-466x-p45j-m4fx

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