Home / scrapy / scrapy / CVE-2021-41125
CVE-2021-41125: is it exploited, and which versions of scrapy are affected and fixed?
CVE-2021-41125 is an information disclosure vulnerability in scrapy. It is not known to be exploited: it is not in CISA's Known Exploited Vulnerabilities catalog (catalog 2026.11.30, read December 3, 2026, 14:08 UTC). Affected: Scrapy before 1.8.1 and Scrapy from 2.0.0 before 2.5.1 (GitHub advisory GHSA-jwqp-28gf-p498). Fixed in 1.8.1 and 2.5.1 (GitHub advisory GHSA-jwqp-28gf-p498). Severity: Medium (5.7, CVSS 3.1, from GitHub_M).
Data checked December 3, 2026: last read CISA KEV December 3, 2026, 14:08 UTC, CVE record November 19, 2026, 07:15 UTC and NVD November 19, 2026, 07:54 UTC.
What is CVE-2021-41125?
HTTP authentication credential leak to target websites in scrapy
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`.
From the CVE record by GitHub_M, last updated August 4, 2024, 02:59 UTC.
Which versions are affected, and which fix it?
| Vendor | Product | Affected | Fixed or not affected from |
|---|---|---|---|
| scrapy | scrapy | < 1.8.1 >= 2.0.0, < 2.5.1 |
As the CVE record by GitHub_M states it, last updated August 4, 2024. Version ranges are the CNA's; a version the record calls not affected is usually the fix.
Which packages are affected, and in which version is each fixed?
| Ecosystem | Package | Affected | Fixed in | Advisory |
|---|---|---|---|---|
| PyPI | Scrapy | < 1.8.1 | 1.8.1 | GHSA-jwqp-28gf-p498 |
| PyPI | Scrapy | >= 2.0.0, < 2.5.1 | 2.5.1 | GHSA-jwqp-28gf-p498 |
GitHub Advisory Database, reviewed advisories (CC BY 4.0); advisory updated October 26, 2024. Summary: Scrapy HTTP authentication credentials potentially leaked to target websites.
Which products and versions does the NVD list as affected?
| Vendor | Product | Versions | Type |
|---|---|---|---|
| scrapy | scrapy | before 1.8.1 | application |
| scrapy | scrapy | from 2.0.0 before 2.5.1 | application |
| debian | debian linux | 9.0 | operating system |
NVD analysis (status Modified), last modified June 17, 2026, 04:07 UTC.
How severe is CVE-2021-41125?
| Score | Version | Vector | Source |
|---|---|---|---|
| Medium 5.7 | CVSS 3.1 | CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:N/A:N | GitHub_M |
| Medium 6.5 | CVSS 3.1 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N | NVD |
| Medium 4.0 | CVSS 2.0 | AV:N/AC:L/Au:S/C:P/I:N/A:N | NVD |
Each score is shown as its source gave it: the CNA that wrote the record, CISA's ADP (vulnrichment) and the NVD. They can differ.
What the ratings mean: in CVSS 3 and 4, scores run from 0 to 10, with Low 0.1 to 3.9, Medium 4.0 to 6.9, High 7.0 to 8.9 and Critical 9.0 to 10.0. CVSS 2 has no Critical band: its High runs from 7.0 to 10.0. The vector lists how the flaw is reached (network, local), what an attacker needs (privileges, a user's click) and what it can harm.
Is CVE-2021-41125 exploited in the wild?
- CISA KEV
- Not listed (catalog 2026.11.30)
- EPSS
- 1.26% probability of exploitation activity in the next 30 days, percentile 70.5 (FIRST EPSS, scores of December 2, 2026)
What kind of flaw is it?
- CWE-200 Exposure of Sensitive Information to an Unauthorized Actor
- CWE-522 Insufficiently Protected Credentials
Where are the vendor advisories and references?
- https://github.com/scrapy/scrapy/security/advisories/GHSA-jwqp-28gf-p498 x_refsource_CONFIRM
- https://github.com/scrapy/scrapy/commit/b01d69a1bf48060daec8f751368622352d8b85a6 x_refsource_MISC
- https://w3lib.readthedocs.io/en/latest/w3lib.html#w3lib.http.basic_auth_header x_refsource_MISC
- http://doc.scrapy.org/en/latest/topics/downloader-middleware.html#module-scrapy.downloadermiddlewares.httpauth x_refsource_MISC
- [debian-lts-announce] 20220316 [SECURITY] [DLA 2950-1] python-scrapy security update mailing-list, x_refsource_MLIST
When was it published, and where is the official record?
- Reserved
- September 15, 2021
- Published
- October 6, 2021, 17:15 UTC
- CVE record updated
- August 4, 2024, 02:59 UTC by GitHub_M
- NVD
- Modified, last modified June 17, 2026, 04:07 UTC
- Last checked
- CVE list November 19, 2026, 07:15 UTC; NVD November 19, 2026, 07:54 UTC; KEV December 3, 2026, 14:08 UTC; EPSS December 2, 2026
- Official record
- cve.org · NVD
What other CVEs affect scrapy?
- Oct 5, 2026CVE-2026-105782 scrapy: unsafe reflection
- Sep 1, 2026CVE-2026-84366 scrapy: sensitive data sent in clear text
- Sep 5, 2017CVE-2017-14158 Scrapy: denial of service (uncontrolled resource consumption)
Questions about CVE-2021-41125
Is CVE-2021-41125 exploited in the wild?
Not as far as CISA knows: it is not in the Known Exploited Vulnerabilities catalog, read December 3, 2026, 14:08 UTC. FIRST's EPSS gives it a 1.26% chance of exploitation activity in the next 30 days (scores of December 2, 2026).
Which versions of scrapy are affected by CVE-2021-41125?
Scrapy before 1.8.1 and Scrapy from 2.0.0 before 2.5.1, per the GitHub advisory GHSA-jwqp-28gf-p498. The tables above give every range the sources list.
Which version fixes CVE-2021-41125?
1.8.1 and 2.5.1, per the GitHub advisory GHSA-jwqp-28gf-p498. Check the vendor's advisory before you rely on it.
How severe is CVE-2021-41125?
Medium (5.7, CVSS 3.1, from GitHub_M). The severity table above shows each score with its source.
Where is the official record of CVE-2021-41125?
The CVE Program's record is at cve.org and the NVD's at nvd.nist.gov. For a fix, the vendor's own advisory is the one to follow.