llamaCVEVulnerability Intelligence
/
Advisory · GitHub · PyPI · Scrapy

GHSA-Q7WC-MR9R-GCJH

Link extractors and SitemapSpider follow file://, ftp:// and s3:// URLs from crawled content

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.
Tu yo del futuro te agradecerá revisarla hoy.No es drama, es prevención. Hazme caso.
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-Q7WC-MR9R-GCJH 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

`LinkExtractor` https://docs.scrapy.org/en/latest/topics/link-extractors.html#scrapy.linkextractors.lxmlhtml.LxmlLinkExtractor, and so `CrawlSpider` https://docs.scrapy.org/en/latest/topics/spiders.html#scrapy.spiders.CrawlSpider rules that use it, and `SitemapSpider` https://docs.scrapy.org/en/latest/topics/spiders.html#scrapy.spiders.SitemapSpider build requests from URLs found in crawled content: links in HTML pages, `<loc>` entries in sitemaps and sitemap indexes, and `Sitemap` lines in `robots.txt` files.

Link extractors accepted `file://` and `ftp://` URLs, and `SitemapSpider` accepted URLs of any scheme. Scrapy downloads those schemes by default, so a crawled website could:

  • make Scrapy read local files through `file://` URLs, passing their contents to spider callbacks, and potentially to the spider output,
  • make Scrapy log into an FTP server of its choosing through `ftp://` URLs, sending the `FTP_USER` https://docs.scrapy.org/en/latest/topics/settings.html#ftp-user and `FTP_PASSWORD` https://docs.scrapy.org/en/latest/topics/settings.html#ftp-password credentials,
  • from a sitemap, make Scrapy send requests signed with the `AWS_ACCESS_KEY_ID` https://docs.scrapy.org/en/latest/topics/settings.html#aws-access-key-id credentials to an S3 bucket of its choosing through `s3://` URLs.

Spiders that set `allowed_domains` https://docs.scrapy.org/en/latest/topics/spiders.html#scrapy.Spider.allowed_domains only follow such URLs when their host is one of those domains, which rules out `file://` URLs.

Patches

Upgrade to Scrapy 2.20.0+.

In Scrapy 2.20.0, link extractors and `SitemapSpider` only follow `http://` and `https://` URLs by default, plus URLs that use the scheme of the response they come from. To follow URLs with other schemes, use the `schemes` parameter of `LinkExtractor` or the new `sitemap_schemes` attribute of `SitemapSpider`.

Workarounds

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

  • Disable the download handlers you do not need: for example, set `DOWNLOAD_HANDLERS` https://docs.scrapy.org/en/latest/topics/settings.html#download-handlers to `{"file": None, "ftp": None, "s3": None}`. See also local and non-network resources https://docs.scrapy.org/en/latest/topics/security.html#security-local-resources.
  • Drop requests with other schemes: Add a spider middleware https://docs.scrapy.org/en/latest/topics/spider-middleware.html that drops requests from spider callbacks unless they use `http`, `https` or the scheme of the response. For example:
from scrapy import Request
from scrapy.utils.httpobj import urlparse_cached


class SchemeFilterMiddleware:
    def _allowed(self, request_or_item, response):
        if not isinstance(request_or_item, Request):
            return True
        schemes = {"http", "https", urlparse_cached(response).scheme}
        return urlparse_cached(request_or_item).scheme in schemes

    def process_spider_output(self, response, result, spider):
        for request_or_item in result:
            if self._allowed(request_or_item, response):
                yield request_or_item

    async def process_spider_output_async(self, response, result, spider):
        async for request_or_item in result:
            if self._allowed(request_or_item, response):
                yield request_or_item
SPIDER_MIDDLEWARES = {
    "myproject.middlewares.SchemeFilterMiddleware": 0,
}
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.20.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-q7wc-mr9r-gcjh

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