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

- Severity: High 7.5 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.38%, higher than 33% of CVEs (2026-12-01)
- Published: 2026-03-13T20:02:36.000Z
- Modified: 2026-10-15T14:55:42.414Z
- Also known as: GHSA-cwxj-rr6w-m6w7, PYSEC-2026-4299
- Weaknesses: CWE-470
- SSVC (CISA-ADP): exploitation none, automatable yes, technical impact partial
- Assigned by: GitHub_M

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

(As written by CVE List.)

## Affected

- scrapy scrapy: >= 1.4.0, < 2.14.2
- scrapy (PyPI): from 1.4.0 before 2.14.2

## Every score

- GitHub_M: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`
- GitHub: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`
- PyPA Advisory Database: CVSS:3.1 7.5 High `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> (web)
- <https://github.com/scrapy/scrapy/commit/945b787a263586cb5803c01c6da57daad8997ae5> (web)
- <https://github.com/scrapy/scrapy/commit/b6e5c58ae707a3d4bb491537b5519534050047e0>
- <https://github.com/scrapy/scrapy/releases/tag/2.14.2>
- <https://github.com/scrapy/scrapy> (package)
- <https://pypi.org/project/scrapy> (package)
- <https://github.com/advisories/GHSA-cwxj-rr6w-m6w7> (advisory)
- <https://nvd.nist.gov/vuln/detail/CVE-2026-105782> (advisory)

## Sources

- CVE List: [CVE-2026-105782](https://www.cve.org/CVERecord?id=CVE-2026-105782), CVE Terms of Use, modified 2026-10-06
- GitHub Advisory Database: [GHSA-cwxj-rr6w-m6w7](https://github.com/advisories/GHSA-cwxj-rr6w-m6w7), CC-BY-4.0, modified 2026-10-15
- NVD: [CVE-2026-105782](https://nvd.nist.gov/vuln/detail/CVE-2026-105782), Public domain, modified 2026-10-06
- PyPA Advisory Database: [PYSEC-2026-4299](https://osv.dev/vulnerability/PYSEC-2026-4299), CC-BY-4.0, modified 2026-10-15

---

Page: https://cve.day/CVE-2026-105782 · Whole record: https://cve.day/CVE-2026-105782.json · Rebuilt by cve.day 2026-11-25T22:59:42.202Z
