Skip to main content
No exploitation reportedFix available

CVE-2021-41125

No exploitation reported by the sources we read.

  • Published2021-10-06
  • Fixed in2.5.1 · 1.8.1
  • WeaknessCWE-200 · CWE-522

Am I affected?

With a domain, we read the version its public headers and pages expose. A distribution build can carry the fix under an older number.

Description

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`.

Timeline

dates in UTC
  1. 2021-10-0618:15CVE publishedNVD

Observed activity

isMalicious corpus · updated 2026-10-28 15:37 UTC
Indicators tagged with this CVE, per day0 indicators over 7 days
Block these indicators
  • Firewall list (EDL, text): https://api.ismalicious.com/edl/cve/CVE-2021-41125?format=txt
  • CSV export: https://api.ismalicious.com/edl/cve/CVE-2021-41125?format=csv
  • TAXII collection of exploited CVEs
  • The EDL and CSV take an API key on the Pro plan.

Versions per branch

NVD · OSV
Scrapy
BranchAffectedFixed in
2.x≥ 2.0.0, < 2.5.12.5.1
1.8< 1.8.11.8.1
Debian debian linux
BranchAffectedFixed in
9.0= 9.0no fix published

as publishedRanges as NVD and OSV publish them; a distribution’s build can be fixed under an older number.

Fix

  1. Update Scrapy to 2.5.1 · 1.8.1

Advisories and patches

Detection

Nuclei template
none so far
ProjectDiscovery
Exploit-DB
no entry
Exploit-DB
Proof-of-concept repositories
none listed
PoC-in-GitHub

Sources

  • CNACVSS 3.15.7read 2026-10-23
  • NVDCVSS 3.16.5read 2026-10-23
  • NVDCVSS 2.04read 2026-10-23
  • CNAweakness (CWE)CWE-200read 2026-10-23
  • NVDweakness (CWE)CWE-522read 2026-10-23
  • FIRST EPSSEPSS score1.3 %2026-10-26
  • OSVaffected packages—

Technical details

CVSS v3 Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N
Published
2021-10-06
Last Modified
2026-06-17
NVD status
Modified

Frequently asked questions

What is CVE-2021-41125?

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`.

Is CVE-2021-41125 actively exploited?

Active exploitation of CVE-2021-41125 has not been confirmed. Its EPSS score was 1.3% on 2026-10-26, the estimated probability of exploitation in the next 30 days.

What is the CVSS score for CVE-2021-41125?

CVE-2021-41125 has a CVSS v3 base score of 6.5 (MEDIUM severity), with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N.

Running scrapy? Hear about its next vulnerability

Surveillance reads the versions in your stack — a domain, a lockfile or a list — checks each CVE against the ranges its sources publish, and alerts you when one you run is exploited or enters CISA KEV. A version it cannot read stays « version not verified ».

No credit card required · No monthly cap on website lookups · 250 API requests/month