Read the docs
TI-2021-17964 Aliases CVE-2021-41125GHSA-jwqp-28gf-p498

HTTP authentication credential leak to target websites in scrapy

Priority LOW 31CWE-200Published · Updated

Key facts

Attack vector
Network
Privileges required
Low
User interaction
None
Attack complexity
Low
Impact type
Information disclosure
Confidentiality · integrity · availability
High · None · None
Fix status
Fixed

Attack profile from CVSS 3.1 · NVD. Fix status from CNA and GitHub. Impact type from CWE-200.

Summary

Scrapy is a high-level web crawling and scraping framework for Python. If you use `HttpAuthMiddleware` (i.e. the `http_user` and `http_pass` spider attributes) for HTTP authentication, all requests will expose your credentials to the request target. This includes requests generated by Scrapy components, such as `robots.txt` requests sent by Scrapy when the `ROBOTSTXT_OBEY` setting is set to `True`, or as requests reached through redirects. Upgrade to Scrapy 2.5.1 and use the new `http_auth_domain` spider attribute to control which domains are allowed to receive the configured HTTP authentication credentials. If you are using Scrapy 1.8 or a lower version, and upgrading to Scrapy 2.5.1 is not an option, you may upgrade to Scrapy 1.8.1 instead. If you cannot upgrade, set your HTTP authentication credentials on a per-request basis, using for example the `w3lib.http.basic_auth_header` function to convert your credentials into a value that you can assign to the `Authorization` header of your request, instead of defining your credentials globally using `HttpAuthMiddleware`.

Why it matters now

EPSS 0.01261 69th percentileScored 2026-11-07
Fix Fixed scrapy (scrapy): 1.8.1, 2.5.1Scrapy (PyPI): 1.8.1, 2.5.1

SSVC decision points

Not available: CISA has not published SSVC decision points for this record.

Affected products

VendorProductAffected versionsFixed inStatusSource
scrapyscrapybefore 1.8.1; 2.0.0 to before 2.5.11.8.1, 2.5.1Patch availableCNA
—Scrapy (PyPI)before 1.8.11.8.1Patch availableGHSA-jwqp-28gf-p498
—Scrapy (PyPI)2.0.0 to before 2.5.12.5.1Patch availableGHSA-jwqp-28gf-p498
  • scrapy Vendorscrapy Affected before 1.8.1; 2.0.0 to before 2.5.1 Fixed in 1.8.1, 2.5.1 Patch available CNA
  • Scrapy (PyPI) Vendor— Affected before 1.8.1 Fixed in 1.8.1 Patch available GHSA-jwqp-28gf-p498
  • Scrapy (PyPI) Vendor— Affected 2.0.0 to before 2.5.1 Fixed in 2.5.1 Patch available GHSA-jwqp-28gf-p498

CPE configurations NVD · 2

CPEVersionsRoleVendor
cpe:2.3:a:scrapy:scrapy:*:*:*:*:*:*:*:*before 1.8.1; 2.0.0 to before 2.5.1Vulnerablescrapy
cpe:2.3:o:debian:debian_linux:9.0:*:*:*:*:*:*:*9.0VulnerableDebian
  • cpe:2.3:a:scrapy:scrapy:*:*:*:*:*:*:*:* Versions before 1.8.1; 2.0.0 to before 2.5.1 Vulnerable ·scrapy
  • cpe:2.3:o:debian:debian_linux:9.0:*:*:*:*:*:*:* Versions 9.0 Vulnerable ·Debian

Remediation

  • Fix · CNA scrapy (scrapy) Fixed in 1.8.1, 2.5.1
  • Fix · GHSA-jwqp-28gf-p498 Scrapy (PyPI) Fixed in 1.8.1 Advisory →
  • Fix · GHSA-jwqp-28gf-p498 Scrapy (PyPI) Fixed in 2.5.1 Advisory →

Vendor assessments

Red Hat

Red Hat's page for this CVE →

Not affected: 1 product
  • Red Hat

Timeline

  1. 2026-10-02 Threatist record created from CVE-2021-41125
  2. 2026-10-03 Alias added: GHSA-jwqp-28gf-p498

References

  • TI-2024-03333 Authorization Header Leak During Cross-Domain Redirect in scrapy/scrapy CVSS 3.0HIGH 7.5
  • TI-2024-03331 XML External Entity (XXE) Vulnerability in scrapy/scrapy CVSS 3.0HIGH 7.5
  • TI-2024-01831 Authorization Header Leakage in scrapy/scrapy on Scheme Change Redirects CVSS 3.0HIGH 7.5
  • TI-2017-10313 Scrapy 1.4 allows remote attackers to cause a denial of service (memory consumption) via… CVSS 3.0HIGH 7.5
  • TI-2024-01761 ReDoS Vulnerability in scrapy/scrapy's XMLFeedSpider CVSS 3.1MEDIUM 6.5
  • TI-2022-00495 Exposure of Sensitive Information to an Unauthorized Actor in scrapy/scrapy CVSS 3.1MEDIUM 6.5

Sources