Impact
Scrapy's RefererMiddleware incorrectly treated the Referrer-Policy header as an import path, loading and executing the referenced Python object. A malicious site could send a Referrer-Policy header pointing to a callable such as sys.exit, causing the crawler to invoke arbitrary code or terminate. This vulnerability can lead to denial of service or the execution of arbitrary commands within the crawler process, classified as arbitrary code execution (CWE‑470).
Affected Systems
The issue affects Scrapy versions from 1.4.0 through 2.14.2 inclusive. All users running these releases on any platform are vulnerable until they upgrade beyond 2.14.2.
Risk and Exploitability
The CVSS base score of 7.5 indicates a high severity. Because the vulnerability depends on a remote website that sends a crafted Referrer-Policy header, the attack vector is remote and requires the crawler to fetch that site. The exploitation condition is low: anyone who can host a site served to the crawler can trigger the flaw. EPSS data is unavailable and the vulnerability is not listed in CISA’s KEV, but the high CVSS and the ability to inject arbitrary code make it a significant risk for environments that crawl untrusted domains.
OpenCVE Enrichment
Github GHSA