GHSA-cwxj-rr6w-m6w7
High · 7.5Scrapy: Arbitrary Module Import via Referrer-Policy Header in RefererMiddleware
CVSS
7.5
EPSS
—
Published
Mar 13, 2026
CISA due date
—
The record
Since version 1.4.0, Scrapy respects the `Referrer-Policy` response header to decide whether and how to set a `Referer` header on follow-up requests. If the header value looked like a valid Python import path, Scrapy would import the referenced object and call it, assuming it referred to a referrer policy class (for example, `scrapy.spidermiddlewares.referer.DefaultReferrerPolicy`) and attempting to instantiate it to handle the `Referer` header. A malicious site could exploit this by setting `Referrer-Policy` to a path such as `sys.exit`, causing Scrapy to import and execute it and potentially terminate the process.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|
Related vulnerabilities
- CVE-2026-114660 Grav from 2.0.0 before 2.2.5 contains an improper access control vulnerability in… CWE-470
- CVE-2026-112145 A security vulnerability has been detected in speaches-ai speaches up to 0.9.0-rc.3. CWE-470
- CVE-2026-78030 DBI versions before 1.653 for Perl load arbitrary modules via unvalidated dbm_type and… CWE-470
- CVE-2026-76825 RestrictedPython is a tool that helps define a subset of the Python language for… CWE-470
- CVE-2026-79987 A remote, authenticated, non-admin Craft CMS Control Panel user with only the accessCp… CWE-470
- CVE-2026-41871 Missing Authorization, Use of Externally-Controlled Input to Select Classes or Code… CWE-470
- CVE-2026-41870 Missing Authorization, Improper Control of Generation of Code ('Code Injection')… CWE-470
- CVE-2026-58400 GeoNetwork is a catalog application to manage spatially referenced resources. CWE-470