{"answers":{"affected":"2 open source packages ship an affected version, including Scrapy and scrapy.","exploited":"There is no known exploitation of GHSA-jm3v-qxmh-hxwv in the wild and no public exploit code.","fix":"Upgrade Scrapy to 2.11.2 or later.","what":"GHSA-jm3v-qxmh-hxwv is a vulnerability in Scrapy, published on 14 May 2024. An attacker can exploit it over the internet without logging in, with no action from the victim."},"fix_prompt":"Check this codebase for GHSA-jm3v-qxmh-hxwv and fix it if it is affected.\n\nWhat it is: GHSA-jm3v-qxmh-hxwv is a vulnerability in Scrapy, published on 14 May 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.\nExploitation: There is no known exploitation of GHSA-jm3v-qxmh-hxwv in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- Scrapy (PyPI): affected all versions; fixed in 2.11.2\n- scrapy (PyPI): affected all versions; fixed in 2.11.2\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/GHSA-jm3v-qxmh-hxwv/ (Markdown: https://insights.sbomify.com/GHSA-jm3v-qxmh-hxwv/index.md)","id":"GHSA-jm3v-qxmh-hxwv","markdown":"https://insights.sbomify.com/GHSA-jm3v-qxmh-hxwv/index.md","name":"GHSA-jm3v-qxmh-hxwv","record":{"aliases":[],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["data_read","security_bypass"],"network_reachable":"yes","non_default_config":true,"product_category":"Python web scraping library","requires_auth":"none","summary":"Scrapy fails to switch proxy settings during HTTP/HTTPS redirects, potentially exposing traffic to unintended proxies if scheme-specific proxies are configured.","user_interaction":"not_required","vuln_class":"security_feature_bypass"},"analysis_generated_by":"qwen3.8-flash-next","assigner":null,"cpe":[],"cvss":{"score":null,"severity":null,"source":null,"vector":null,"version":null},"cwes":[],"description":"### 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.","ecosystems":["PyPI"],"exploits":{"exploitdb":null,"first_seen":null,"github_poc":null,"max_poc_stars":null,"metasploit":null,"nuclei":null,"refs":[],"tier":null},"has_fix":true,"headline":"Scrapy's redirects ignoring scheme-specific proxy settings","id":"GHSA-jm3v-qxmh-hxwv","indexable":true,"kev":null,"kind":"advisory","links":{"ecosystem":"PyPI","product":null,"products":[],"type":"security_feature_bypass","year":"2024"},"n_packages":2,"n_references":null,"packages":[{"ecosystem":"PyPI","fixed":["2.11.2"],"introduced":["0"],"last_affected":[],"package":"Scrapy","purl":null,"source":"GHSA-jm3v-qxmh-hxwv"},{"ecosystem":"PyPI","fixed":["2.11.2"],"introduced":["0"],"last_affected":[],"package":"scrapy","purl":"pkg:pypi/scrapy","source":"GHSA-jm3v-qxmh-hxwv"}],"products":null,"published":"2024-05-14","related":[],"sources":[{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"}],"ssvc":{"automatable":null,"exploitation":null,"technical_impact":null},"state":null,"updated":null,"vendors":null},"summary":"Scrapy fails to switch proxy settings during HTTP/HTTPS redirects, potentially exposing traffic to unintended proxies if scheme-specific proxies are configured.","url":"https://insights.sbomify.com/GHSA-jm3v-qxmh-hxwv/"}