GHSA-jm3v-qxmh-hxwv: Scrapy Scrapy's Redirects Ignoring Scheme-specific Proxy Vulnerability
MODERATEGHSA-jm3v-qxmh-hxwv is a MODERATE (CVSS 4.3) scrapy's redirects ignoring scheme-specific proxy vulnerability (General Security Weakness) affecting Scrapy libraries in the PyPI ecosystem. The issue involves scrapy's redirects ignoring scheme-specific proxy settings. Remediation is available by upgrading affected packages to version 2.11.2.
GHSA-jm3v-qxmh-hxwv at a Glance
Security Impact
CVSS: 4.3
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N).
How to Fix GHSA-jm3v-qxmh-hxwv
To remediate this vulnerability, upgrade all affected Scrapy 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>=2.11.2
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
pip show Scrapy
How to Check if You Are Affected
To determine whether your Python environment is affected by GHSA-jm3v-qxmh-hxwv, inspect your installed packages using pip:
pip show Scrapy
Analyze the terminal output to locate any version of Scrapy in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.11.2), your application is affected.
Note: The pip show Scrapy command checks currently installed packages in your active Python environment.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under General Security Weakness. In Scrapy, 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
GHSA-jm3v-qxmh-hxwv Affected Scrapy Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
Scrapy
|
PyPI |
< 2.11.2
|
2.11.2
|
References
Frequently Asked Questions
What is GHSA-jm3v-qxmh-hxwv?
Which Scrapy versions are affected?
What version fixes GHSA-jm3v-qxmh-hxwv?
Is Scrapy affected?
What is the CVSS score of GHSA-jm3v-qxmh-hxwv?
What CWE is associated with GHSA-jm3v-qxmh-hxwv?
How can I check PyPI dependencies for GHSA-jm3v-qxmh-hxwv?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-jm3v-qxmh-hxwv",
"modified" : "2024-05-14T20:14:43Z",
"published" : "2024-05-14T20:14:43Z",
"aliases" : [ ],
"summary" : "Scrapy's redirects ignoring scheme-specific proxy settings",
"details" : "### Impact\n\nWhen using system proxy settings, which are scheme-specific (i.e. specific to `http://` or `https://` URLs), Scrapy was not accounting for scheme changes during redirects.\n\nFor example, an HTTP request would use the proxy configured for HTTP and, when redirected to an HTTPS URL, the new HTTPS request would still use the proxy configured for HTTP instead of switching to the proxy configured for HTTPS. Same the other way around.\n\nIf you have different proxy configurations for HTTP and HTTPS in your system for security reasons (e.g., maybe you don’t want one of your proxy providers to be aware of the URLs that you visit with the other one), this would be a security issue.\n\n### Patches\n\nUpgrade to Scrapy 2.11.2.\n\n### Workarounds\n\nReplace the built-in retry middlewares (`RedirectMiddleware` and `MetaRefreshMiddleware`) and the `HttpProxyMiddleware` middleware with custom ones that implement the fix from Scrapy 2.11.2, and verify that they work as intended.\n\n### References\n\nThis security issue was reported by @redapple at https://github.com/scrapy/scrapy/issues/767.\n",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "Scrapy"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "2.11.2"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/scrapy/scrapy/security/advisories/GHSA-jm3v-qxmh-hxwv"
}, {
"type" : "WEB",
"url" : "https://github.com/scrapy/scrapy/issues/767"
}, {
"type" : "WEB",
"url" : "https://github.com/scrapy/scrapy/commit/1d0502f25bbe55a22899af915623fda1aaeb9dd8"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/scrapy/scrapy"
} ],
"database_specific" : {
"cwe_ids" : [ ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2024-05-14T20:14:43Z",
"nvd_published_at" : null
}
}