CVE-2021-41124: Scrapy splash Splash Authentication Credentials Potentially Leaked Vulnerability
HIGHCVE-2021-41124 is a HIGH (CVSS 7.4) splash authentication credentials potentially leaked vulnerability (CWE-200: Exposure of Sensitive Information to an Unauthorized Actor) affecting Scrapy splash libraries in the PyPI ecosystem. The issue involves splash authentication credentials potentially leaked to target websites. Remediation is available by upgrading affected packages to version 0.8.0.
CVE-2021-41124 at a Glance
Security Impact
CVSS: 7.4
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:N/A:N).
How to Fix CVE-2021-41124
To remediate this vulnerability, upgrade all affected Scrapy splash dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
pip install scrapy-splash>=0.8.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
pip show scrapy-splash
How to Check if You Are Affected
To determine whether your Python environment is affected by CVE-2021-41124, inspect your installed packages using pip:
pip show scrapy-splash
Analyze the terminal output to locate any version of Scrapy splash in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.8.0), your application is affected.
Note: The pip show scrapy-splash command checks currently installed packages in your active Python environment.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-200: Exposure of Sensitive Information to an Unauthorized Actor, where the product exposes sensitive information to an actor that is not explicitly authorized to have access to that information. In Scrapy splash, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2021-41124 Affected Scrapy splash Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
scrapy-splash
|
PyPI |
< 0.8.0
|
0.8.0
|
References
Frequently Asked Questions
What is CVE-2021-41124?
Which Scrapy splash versions are affected?
What version fixes CVE-2021-41124?
Is scrapy-splash affected?
What is the CVSS score of CVE-2021-41124?
What CWE is associated with CVE-2021-41124?
How can I check PyPI dependencies for CVE-2021-41124?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-823f-cwm9-4g74",
"modified" : "2024-10-26T22:52:44Z",
"published" : "2021-10-06T17:49:23Z",
"aliases" : [ "CVE-2021-41124" ],
"summary" : "Splash authentication credentials potentially leaked to target websites ",
"details" : "### Impact\n\nIf you use [`HttpAuthMiddleware`](http://doc.scrapy.org/en/latest/topics/downloader-middleware.html#module-scrapy.downloadermiddlewares.httpauth) (i.e. the `http_user` and `http_pass` spider attributes) for Splash authentication, any non-Splash request will expose your credentials to the request target. This includes `robots.txt` requests sent by Scrapy when the `ROBOTSTXT_OBEY` setting is set to `True`.\n\n### Patches\n\nUpgrade to scrapy-splash 0.8.0 and use the new `SPLASH_USER` and `SPLASH_PASS` settings instead to set your Splash authentication credentials safely.\n\n### Workarounds\n\nIf you cannot upgrade, set your Splash request credentials on a per-request basis, [using the `splash_headers` request parameter](https://github.com/scrapy-plugins/scrapy-splash/tree/0.8.x#http-basic-auth), instead of defining them globally using the [`HttpAuthMiddleware`](http://doc.scrapy.org/en/latest/topics/downloader-middleware.html#module-scrapy.downloadermiddlewares.httpauth).\n\nAlternatively, make sure all your requests go through Splash. That includes disabling the [robots.txt middleware](https://docs.scrapy.org/en/latest/topics/downloader-middleware.html#topics-dlmw-robots).\n\n### For more information\nIf you have any questions or comments about this advisory:\n* [Open an issue](https://github.com/scrapy-plugins/scrapy-splash/issues)\n* [Email us](mailto:opensource@zyte.com)\n",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:N/A:N"
}, {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:H/VI:N/VA:N/SC:H/SI:N/SA:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "scrapy-splash"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.8.0"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/scrapy-plugins/scrapy-splash/security/advisories/GHSA-823f-cwm9-4g74"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2021-41124"
}, {
"type" : "WEB",
"url" : "https://github.com/scrapy-plugins/scrapy-splash/commit/2b253e57fe64ec575079c8cdc99fe2013502ea31"
}, {
"type" : "WEB",
"url" : "https://github.com/pypa/advisory-database/tree/main/vulns/scrapy-splash/PYSEC-2021-364.yaml"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/scrapy-plugins/scrapy-splash"
}, {
"type" : "WEB",
"url" : "https://github.com/scrapy-plugins/scrapy-splash/releases/tag/0.8.0"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-200" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2021-10-05T21:11:11Z",
"nvd_published_at" : "2021-10-05T21:15:00Z"
}
}