Skip to main content

Protego CVE-2026-55520

| EUVDEUVD-2026-67865 HIGH
Uncontrolled Resource Consumption (CWE-400)
2026-08-28 https://github.com/scrapy/protego GHSA-wjmf-p669-5m5p
7.1
CVSS 4.0 · Vendor: https://github.com/scrapy/protego
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Recon
    Attacker hosts crafted robots.txt with many `*` wildcards
  2. Delivery
    Victim crawler fetches attacker-controlled domain
  3. Exploit
    protego.Protego.parse() ingests malicious directive
  4. Install
    protego.Protego.can_fetch() compiles exponential regex
  5. C2
    Python re engine enters catastrophic backtracking on near-miss URL
  6. Execute
    Crawler thread hangs indefinitely
  7. Impact
    Denial of service

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A06:2025 - Insecure Design
ASVS 5.0
V2 - Validation and Business Logic Resource consumption limits
MITRE ATT&CK

1 technique across 1 tactic: Impact

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Exploitation requires three concurrent conditions: (1) the target application uses protego <= 0.6.1 to parse robots.txt; (2) the application fetches robots.txt from a domain the attacker controls or can influence (e.g., via DNS poisoning or by simply operating the target domain); and (3) the application subsequently calls can_fetch() with a URL that is a near-miss for the crafted wildcard pattern. No authentication or privileges are required of the attacker - serving a valid HTTP robots.txt response is sufficient. Exploitation is bounded by the requirement that the crawler must actually initiate a request to the attacker's domain: deployments restricted to a fixed allow-list of trusted domains are not exploitable in practice. The CVSS 4.0 UI:P metric reflects this client-initiated-fetch dependency. There is no requirement for a non-default configuration; any default Scrapy/protego deployment that crawls external sites is structurally exposed.

Impact

The CVSS 4.0 vector (AV:N/AC:L/AT:N/PR:N/UI:P/VA:H, score 7.1) accurately models the threat: a remote attacker with no credentials can cause complete availability loss in the vulnerable component, but only after the target application fetches the attacker-controlled robots.txt - captured by UI:P. No EPSS score was included in the intelligence package, so exploitation probability cannot be independently quantified; however, the published PoC (requiring only 12 wildcard pairs to trigger an indefinite freeze) substantially lowers the exploitation bar. There is no CISA KEV listing, indicating no confirmed widespread exploitation at time of analysis. Risk is moderate-to-high for web-crawling applications that routinely fetch robots.txt from arbitrary external servers - a standard operational pattern for Scrapy-based crawlers - because those deployments are structurally exposed to attacker-controlled robots.txt content as a matter of normal function. Risk is low for deployments restricted to known, trusted domains, since the crawler must initiate contact with the attacker's server for the exploit to trigger.

Exploit ScenarioDerived

An attacker operates a web server and serves a crafted robots.txt containing a Disallow directive with many consecutive * wildcards (e.g., /a/*a*a*a*...*b with 12 or more wildcard pairs). When a Scrapy-based crawler or any other protego-using application fetches this file and calls can_fetch() with a near-miss URL such as /a/aaa...c, Python's regex engine enters catastrophic backtracking and the calling thread freezes indefinitely. The published PoC in the GitHub advisory demonstrates this with 12 wildcard pairs and a 60-character URL, requiring no special privileges or existing access to the target system.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.4% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv2 – Aug 28, 2026

Exponential backtracking ReDoS in Protego (pip/protego <= 0.6.1) allows any party who can serve a crafted robots.txt to freeze the can_fetch() call indefinitely, denying service to any application using this library for robots.txt compliance. A working proof-of-concept is publicly available in the GitHub security advisory GHSA-wjmf-p669-5m5p; the CVSS 4.0 score of 7.1 (VA:H) reflects meaningful availability risk for web-crawling deployments. No public exploit identified at time of analysis beyond the published PoC, and no CISA KEV listing exists.

Earlier versions of this analysis (1)
v1 Aug 28, 2026 - 19:21

Exponential backtracking in protego (pip/protego <= 0.6.1) allows any web server operator to cause indefinite denial of service in crawlers that fetch robots.txt from untrusted sources. The root cause is that * wildcards in robots.txt Allow/Disallow directives are naively compiled into lazy .*? regex quantifiers; a directive with many consecutive wildcards matched against a sufficiently long near-miss URL triggers catastrophic regex backtracking, freezing can_fetch() indefinitely. A proof-of-concept is publicly documented in the GitHub advisory GHSA-wjmf-p669-5m5p, and a vendor-released patch replacing the regex engine with a safe linear string-search algorithm is available in version 0.6.2.

RemediationAI

Vendor-released patch: 0.6.2. Upgrade immediately via pip install --upgrade protego to version 0.6.2 or later; this release replaces the vulnerable regex-based wildcard matching with a linear string-search algorithm confirmed in commit https://github.com/scrapy/protego/commit/785940181659bf440ba82f1da148fade5087e858. If an immediate upgrade is blocked, a targeted compensating control is to validate fetched robots.txt before parsing: reject or strip any Disallow or Allow directive containing more than a conservative threshold of * characters (e.g., 4 or fewer per line). Trade-off: overly strict filtering may suppress legitimate complex directives, causing the crawler to access paths the site owner intended to disallow - which could have legal or ToS implications. A second option is to wrap can_fetch() calls in a thread with a hard timeout and treat expiry as disallowed; this avoids a frozen thread but adds per-call latency overhead. Neither workaround is a substitute for patching.

Affected VersionsENISA

protego < 0.6.2

Affected Packages

pypi protego fix: 0.6.2

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in pypi

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

Protego is a Python library (pkg:pip/protego) that parses robots.txt files and evaluates URL fetch permissions for web crawlers, used most widely as the robots.txt backend for the Scrapy framework. The vulnerable code path is protego._urlpattern._URLPattern._prepare_pattern_for_regex(), which converts each * wildcard in an Allow or Disallow directive into the lazy regex fragment .*?. When a directive contains many consecutive wildcards (e.g., /*1*1*1...*Z), Python's re module must explore an exponentially growing number of partial-match paths before determining a near-miss URL does not match - classic catastrophic backtracking. CWE-400 (Uncontrolled Resource Consumption) is the precise root-cause class: attacker-supplied input drives unbounded CPU time with no internal resource limit. The fix in 0.6.2 eliminates the regex engine entirely, replacing it with a linear str.find()-based wildcard matcher (_match_wildcard) that runs in O(n·m) time and is immune to backtracking.

Know when Python gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (https://github.com/scrapy/protego) PRIMARY 7.1 HIGH
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
vuln.today AI 6.5 MEDIUM

Attacker serves robots.txt over the network (AV:N, AC:L, PR:N), but the crawling application must actively fetch it (UI:R); impact is availability-only with no scope change.

3.1 AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H
4.0 AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
SUSE MEDIUM
Red Hat 6.5 MEDIUM

Primary rating from Vendor (https://github.com/scrapy/protego).

CVSS VectorVendor: https://github.com/scrapy/protego

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
Passive
Vulnerable system: Confidentiality
None
Vulnerable system: Integrity
None
Vulnerable system: Availability
High
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

Lifecycle Timeline

2
CVSS changed
Aug 28, 2026 - 20:22 NVD
7.1 (HIGH)
CVE Published
Aug 28, 2026 - 18:43 cve.org
HIGH

DescriptionCVE.org

Problem description

Protego constructs regular expressions to match URLs against robots.txt Allow: and Disallow: directives, see protego._urlpattern._URLPattern._prepare_pattern_for_regex(). Every * in the directive value is translated into a lazy .*? regex piece, thus a specially crafted directive value with many asterisks may produce a regex that freezes the parser due to exponential backtracking.

Impact

Parsing a specially crafted robots.txt with protego.Protego.parse() and then trying to match an URL with protego.Protego.can_fetch() results in the latter call not returning for a period dependent on the length of the URL.

Proof of concept

python
from protego import Protego

robotstxt = f"""
User-agent: *
Disallow: /{"*1" * 12}*Z
"""
rp = Protego.parse(robotstxt)
url = "/" + "1" * 60
rp.can_fetch(url, "mybot")
# freezes

Technical POC Analysis

CWE-400 (Uncontrolled Resource Consumption; MITRE also assigns CWE-1333, Inefficient Regular Expression Complexity).

Full technical POC analysis - root cause, step-by-step exploitation and patch breakdown - is part of the Pro and Business plans.

Executive ViewAI

Why It Matters

Protego library versions 0.6.1 and earlier contain a denial-of-service vulnerability where publicly available exploit code exists. The vulnerability can be remotely triggered through malformed robots.txt files, causing application operations to freeze indefinitely. Organizations relying on Protego for web crawler compliance should prioritize patching to protect search indexing and automated discovery service availability.

Business Impact: High
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
0.4%
Top 70% exploitable
Prevalence
Medium
popular Python web-crawling library, primary Scrapy robots.txt dependency
Threat Intel
1
1 sources
Exploit
POC
Public exploit code exists
Data Quality
7 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment GHSA Vendor GitHub

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity HIGH
CISA KEV No
Public POC Yes
EPSS 0.4%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
Yes
Human Impact
High
Technical Impact
Partial

Priority Score

56
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +36
PoC: +20
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.

More in Python

View all
CVE-2025-24016 CRITICAL POC
9.9 Feb 10

Wazuh SIEM platform versions 4.4.0 through 4.9.0 contain an unsafe deserialization vulnerability in the DistributedAPI t

CVE-2025-27520 CRITICAL POC
9.8 Apr 04

BentoML version 1.4.2 and earlier contains an unauthenticated remote code execution vulnerability through insecure deser

CVE-2025-2945 CRITICAL POC
9.9 Apr 03

pgAdmin 4 contains critical remote code execution vulnerabilities in the Query Tool download and Cloud Deployment endpoi

CVE-2013-5093 MEDIUM POC
6.8 Sep 27

The renderLocalView function in render/views.py in graphite-web in Graphite 0.9.5 through 0.9.10 uses the pickle Python

CVE-2025-32375 CRITICAL POC
9.8 Apr 09

BentoML is a Python library for building online serving systems optimized for AI apps and model inference. Rated critica

CVE-2014-0224 HIGH POC
7.4 Jun 05

OpenSSL before 0.9.8za, 1.0.0 before 1.0.0m, and 1.0.1 before 1.0.1h does not properly restrict processing of ChangeCiph

CVE-2024-21644 HIGH POC
7.5 Jan 08

pyLoad download manager version prior to 0.5.0b3.dev77 exposes the Flask SECRET_KEY through an unauthenticated endpoint.

CVE-2026-33017 CRITICAL POC
9.3 Mar 17

Langflow (a visual LLM pipeline builder) contains a critical unauthenticated code execution vulnerability (CVE-2026-3301

CVE-2017-9462 HIGH POC
8.8 Jun 06

In Mercurial before 4.1.3, "hg serve --stdio" allows remote authenticated users to launch the Python debugger, and conse

CVE-2026-49869 CRITICAL POC
10.0 Jun 26

Unauthenticated remote code execution affects Kestra OSS (the open-source event-driven orchestration platform) prior to

CVE-2026-39987 CRITICAL POC
9.3 Apr 08

Unauthenticated remote code execution in Marimo ≤0.20.4 allows attackers to execute arbitrary system commands via the `/

CVE-2024-21645 MEDIUM POC
5.3 Jan 08

pyLoad is the free and open-source Download Manager written in pure Python. Rated medium severity (CVSS 5.3), this vulne

Vendor StatusVendor

SUSE

Severity: Moderate
Product Status
openSUSE Tumbleweed Fixed

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy