Vulnerability · Published Oct 5, 2026 · Assigned by GitHub_M
CVE-2026-105782Scrapy: Arbitrary Module Import via Referrer-Policy Header in RefererMiddleware
High 7.5
In plain English
A high-severity security flaw in scrapy from scrapy. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.4% (higher than 32% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official 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.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian:12 | python-scrapy | no fix listed | DEBIAN-CVE-2026-105782 |
| Debian:13 | python-scrapy | no fix listed | DEBIAN-CVE-2026-105782 |
| Debian:14 | python-scrapy | 2.14.2-1 | DEBIAN-CVE-2026-105782 |
| PyPI | scrapy | 2.14.2 | GHSA-cwxj-rr6w-m6w7 |
| PyPI | scrapy | 2.14.2 | PYSEC-2026-4299 |
| Ubuntu:26.04:LTS | python-scrapy | no fix listed | UBUNTU-CVE-2026-105782 |
Affected products (as reported)
Weakness: CWE-470 · Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
References
- https://github.com/scrapy/scrapy/security/advisories/GHSA-cwxj-rr6w-m6w7 x_refsource_CONFIRM
- https://github.com/scrapy/scrapy/commit/945b787a263586cb5803c01c6da57daad8997ae5 x_refsource_MISC
- https://github.com/scrapy/scrapy/commit/b6e5c58ae707a3d4bb491537b5519534050047e0 x_refsource_MISC
- https://github.com/scrapy/scrapy/releases/tag/2.14.2 x_refsource_MISC