CVE-2021-41124: Scrapy splash Splash Authentication Credentials Potentially Leaked Vulnerability

HIGH
Advisory Identifier: GHSA-823f-cwm9-4g74
CVSS 7.4
CWE-200
Published
Advisory Summary

CVE-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

CVE Identifier CVE-2021-41124
GHSA Identifier GHSA-823f-cwm9-4g74
Severity HIGH
CVSS v3.1 Base Score 7.4
CWE Classification CWE-200: Exposure of Sensitive Information to an Unauthorized Actor
Affected Product Scrapy splash
Package Ecosystem PyPI
Published Date
Last Updated

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

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction Required (UI:R)
Scope Changed (S:C)
Confidentiality High (C:H)
Integrity None (I:N)
Availability None (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.

scrapy-splash fixed: 0.8.0
pip install scrapy-splash>=0.8.0
Verify Direct and Transitive Dependencies

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

### Impact If 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`. ### Patches Upgrade to scrapy-splash 0.8.0 and use the new `SPLASH_USER` and `SPLASH_PASS` settings instead to set your Splash authentication credentials safely. ### Workarounds If 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). Alternatively, 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). ### For more information If you have any questions or comments about this advisory: * [Open an issue](https://github.com/scrapy-plugins/scrapy-splash/issues) * [Email us](mailto:opensource@zyte.com)

CVE-2021-41124 Affected Scrapy splash Versions

1 component(s)
Fixed Versions:
0.8.0
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?
CVE-2021-41124 is a security vulnerability in Scrapy splash involving Splash authentication credentials potentially leaked to target websites under CWE-200: Exposure of Sensitive Information to an Unauthorized Actor.
Which Scrapy splash versions are affected?
Affected versions include releases prior to 0.8.0 across affected packages: scrapy-splash.
What version fixes CVE-2021-41124?
Upgrading to 0.8.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is scrapy-splash affected?
Yes, scrapy-splash is affected in releases prior to 0.8.0. Upgrade your dependency to 0.8.0 or later.
What is the CVSS score of CVE-2021-41124?
CVE-2021-41124 has a CVSS v3.1 base score of 7.4 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:N/A:N.
What CWE is associated with CVE-2021-41124?
CVE-2021-41124 is classified under CWE-200: Exposure of Sensitive Information to an Unauthorized Actor (The product exposes sensitive information to an actor that is not explicitly authorized to have access to that information.).
How can I check PyPI dependencies for CVE-2021-41124?
Run the dependency tree command: 'pip show scrapy-splash'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "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"
  }
}