Advisory Database
  • Advisories
  • Dependency Scanning
  1. pypi
  2. ›
  3. scrapy
  4. ›
  5. GHSA-23j4-mw76-5v7h

GHSA-23j4-mw76-5v7h: Scrapy allows redirect following in protocols other than HTTP

May 14, 2024

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.

References

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

Code Behaviors & Features

Detect and mitigate GHSA-23j4-mw76-5v7h with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Dependency Scanning using SBOM also detects vulnerabilities from proprietary advisories that this site does not include. Learn more about Dependency Scanning using SBOM →

Affected versions

All versions before 2.11.2

Fixed versions

  • 2.11.2

Solution

Upgrade to version 2.11.2 or above.

Impact 6.5 MEDIUM

CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N

Learn more about CVSS

Weakness

  • CWE-552: Files or Directories Accessible to External Parties

Source file

pypi/scrapy/GHSA-23j4-mw76-5v7h.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sun, 08 Nov 2026 00:15:19 +0000.