Scrapy
Scrapy: Arbitrary Module Import via Referrer-Policy Header in RefererMiddleware
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.
First public PoC
None yetno public PoC found
Public PoCs00 on GitHub
CVSS7.5high · scored by CNA · CWE-470
CISA KEV
Not listednot known exploited
Affected versions and mitigation
From the CVE record and the vendor's references.Affected
scrapy scrapy
- >= 1.4.0, < 2.14.2
Fixed in 2.14.2
Mitigation
Upgrade scrapy to 2.14.2 or later.
References
- Vendor advisory github.com/scrapy/scrapy/security/advisories/G…
- Patch github.com/scrapy/scrapy/commit/945b787a263586…
- Patch github.com/scrapy/scrapy/commit/b6e5c58ae707a3…
1 more
- Release notes github.com/scrapy/scrapy/releases/tag/2.14.2
Timeline
Days relative to CVE publicationNo public PoC found yet; not in CISA KEV.
PoC repositories
Found on GitHub.No PoC repositories found yet.