Skip to content
Heist/ feed
Back to feed
High

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

Type: advisorySources: OSV

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.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2026-105782
Confirmed fixed CVEs
Not specified
Updated in this feed
7 Nov 2026, 12:42 UTC · Revision 1

Source evidence

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

core-osv · Original source

Published 5 Oct 2026, 23:08 UTC

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.

osv:CVE-2026-105782
Complete source record
{
  "id": "aac3b94425719abd7570938c7fe8c6dd57da51dfbb413563ef24a853aade96c2",
  "url": "https://osv.dev/vulnerability/CVE-2026-105782",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "Scrapy: Arbitrary Module Import via Referrer-Policy Header in RefererMiddleware",
    "summary": "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.",
    "evidence": "osv:CVE-2026-105782",
    "products": [],
    "severity": "high",
    "structured": {
      "id": "CVE-2026-105782",
      "aliases": [
        "CVE-2026-105782",
        "GHSA-cwxj-rr6w-m6w7",
        "PYSEC-2026-4299"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/scrapy/scrapy",
              "type": "GIT",
              "events": [
                {
                  "introduced": "5f69ec98f70e1e1e5f65fb36eb1cfb23d0be5b45"
                },
                {
                  "fixed": "498b4fc1a431c71ea699b2d7e0bd518c7ceca302"
                },
                {
                  "fixed": "945b787a263586cb5803c01c6da57daad8997ae5"
                },
                {
                  "fixed": "b6e5c58ae707a3d4bb491537b5519534050047e0"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "range": [
                      {
                        "introduced": "1.4.0"
                      },
                      {
                        "fixed": "2.14.2"
                      }
                    ],
                    "source": "AFFECTED_FIELD",
                    "strategy": "StringRangeExpression"
                  },
                  {
                    "range": [
                      {
                        "fixed": "945b787a263586cb5803c01c6da57daad8997ae5"
                      }
                    ],
                    "source": "REFERENCES_COMMIT"
                  },
                  {
                    "range": [
                      {
                        "fixed": "b6e5c58ae707a3d4bb491537b5519534050047e0"
                      }
                    ],
                    "source": "REFERENCES_COMMIT"
                  },
                  {
                    "range": [
                      {
                        "fixed": "498b4fc1a431c71ea699b2d7e0bd518c7ceca302"
                      }
                    ],
                    "source": "REFERENCES_TAG",
                    "original_tag": "2.14.2"
                  }
                ]
              }
            }
          ],
          "versions": [
            "2.14.1",
            "2.14.0",
            "2.13.0",
            "2.12.0",
            "2.11.0",
            "2.10.0",
            "2.9.0",
            "2.8.0",
            "2.7.1",
            "2.7.0",
            "2.6.1",
            "2.6.0",
            "1.8.0",
            "2.5.0",
            "2.4.0",
            "2.3.0",
            "2.2.0",
            "2.1.0",
            "2.0.0",
            "1.7.0",
            "1.6.0",
            "1.5.0",
            "1.4.0"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-105782.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:50.907004569Z",
      "provider": "osv",
      "references": [
        "https://github.com/scrapy/scrapy/releases/tag/2.14.2",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/105xxx/CVE-2026-105782.json",
        "https://github.com/scrapy/scrapy/security/advisories/GHSA-cwxj-rr6w-m6w7",
        "https://nvd.nist.gov/vuln/detail/CVE-2026-105782",
        "https://github.com/scrapy/scrapy/commit/945b787a263586cb5803c01c6da57daad8997ae5",
        "https://github.com/scrapy/scrapy/commit/b6e5c58ae707a3d4bb491537b5519534050047e0"
      ],
      "provider_metadata": {
        "cwe_ids": [
          "CWE-470"
        ],
        "cna_assigner": "GitHub_M",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/105xxx/CVE-2026-105782.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2026-105782",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 519318,
  "published_at": "2026-10-05T23:08:55.749+00:00"
}