CVE-2026-105782

Scrapy: Arbitrary Module Import via Referrer-Policy Header in RefererMiddleware

State
Published
Severity
7.5 High
Published
Oct 5, 2026
Updated
Oct 6, 2026
Reserved
Oct 5, 2026

Read the record on cve.org

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.

Scores

CVSSScoreVectorSource
3.17.5 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:HGitHub_M

Weaknesses

  • CWE-470 Use of Externally-Controlled Input to Select Classes or Code ('Unsafe Reflection')

Affected Products

ProductVersions
scrapyscrapy
  • >= 1.4.0, < 2.14.2Affected

References

Every record here comes from the CVE Program’s CVE List. © 1999–2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.