GHSA-FWM7-29M4-RRJ9
Files and images pipelines send S3 requests over plaintext HTTP by default
Texto original en inglés · Ver en español
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:L/VA:N/SC:N/SI:N/SA:N
Fuente: GitHub
Ciclo de vida de la vulnerabilidad
| Fecha | Fase | Evento | Detalle |
|---|---|---|---|
| Divulgación | Publicada | GHSA-FWM7-29M4-RRJ9 divulgada · CVSS 8.3 (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 |
Impact
When `FILES_STORE` https://docs.scrapy.org/en/latest/topics/media-pipeline.html#amazon-s3-storage or `IMAGES_STORE` points to Amazon S3 (`s3://…`), `FilesPipeline` https://docs.scrapy.org/en/latest/topics/media-pipeline.html#scrapy.pipelines.files.FilesPipeline, `ImagesPipeline` https://docs.scrapy.org/en/latest/topics/media-pipeline.html#scrapy.pipelines.images.ImagesPipeline and their subclasses send their requests to S3 over plaintext HTTP, unless `AWS_USE_SSL` https://docs.scrapy.org/en/latest/topics/settings.html#aws-use-ssl is `True` or `AWS_ENDPOINT_URL` https://docs.scrapy.org/en/latest/topics/settings.html#aws-endpoint-url is an `https://` URL. The documentation of `AWS_USE_SSL` says that SSL is used by default.
An attacker who can observe that traffic can read:
- the contents of every uploaded file, its upload headers and its S3 metadata (e.g. image dimensions),
- bucket names and object keys, which by default include a hash of the URL of each file,
- the AWS access key ID and, with temporary credentials, the session token (`X-Amz-Security-Token`).
The AWS secret access key is not sent. Requests are signed with SigV4, including a hash of the uploaded body, so an attacker cannot modify uploaded files or reuse the captured signatures for other requests.
An attacker who can tamper with that traffic can forge S3 responses:
- A forged `HEAD` response with a recent `Last-Modified` header makes the pipeline consider the file up to date, so the file is never downloaded or stored, and the attacker-chosen `ETag` is reported as the `checksum` of the file in the item.
- A forged success response to a `PUT` request makes Scrapy report the file as stored when it was never uploaded.
Patches
Upgrade to Scrapy 2.20.0+.
In Scrapy 2.20.0, the default value of `AWS_USE_SSL`, `None`, means HTTPS. To keep using plain HTTP, set `AWS_USE_SSL` to `False`.
Workarounds
If you cannot upgrade to Scrapy 2.20.0, set `AWS_USE_SSL` to `True`, or set `AWS_ENDPOINT_URL` to the `https://` URL of your S3 endpoint.
Desglose de métricas
Rangos afectados
Estado del parche por paquete
| Paquete / producto | Estado | Corregida en | Desde divulgación | Última versión |
|---|---|---|---|---|
pypiScrapy |
Corregida | 2.20.0 | 0 d | 2.20.0 no afectada |
2.20.0Arsenal público
Sin exploits, módulos ni PoC públicos conocidos a la fecha de verificación.
https://github.com/scrapy/scrapy/security/advisories/GHSA-fwm7-29m4-rrj9Las referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.
