Vulnerabilities in pkg:pypi/Protego
PACKAGECVE-2026-55520 is a HIGH denial of service vulnerability (CWE-400: Uncontrolled Resource Consumption) affecting Protego libraries in the PyPI ecosystem. The issue involves protego has exponential backtracking redos in robots.txt url wildcard matching. Remediation is available by upgrading affected packages to version 0.6.2.
pkg:pypi/Protego
Vulnerability advisories affecting package pkg:pypi/Protego. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-wjmf-p669-5m5p | CVE-2026-55520 | HIGH | Protego has exponential backtracking ReDoS in robots.txt URL wildcard matching |
CVE-2026-55520 at a Glance
How to Fix CVE-2026-55520
To remediate this vulnerability, upgrade all affected Protego dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
pip install Protego>=0.6.2
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
pip show Protego
How to Check if You Are Affected
To determine whether your Python environment is affected by CVE-2026-55520, inspect your installed packages using pip:
pip show Protego
Analyze the terminal output to locate any version of Protego in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.6.2), your application is affected.
Note: The pip show Protego command checks currently installed packages in your active Python environment.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-400: Uncontrolled Resource Consumption, where the product does not properly control the allocation and maintenance of a limited resource. In Protego, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-55520 Affected Protego Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
Protego
|
PyPI |
< 0.6.2
|
0.6.2
|
References
Frequently Asked Questions
What is CVE-2026-55520?
Which Protego versions are affected?
What version fixes CVE-2026-55520?
Is Protego affected?
What CWE is associated with CVE-2026-55520?
How can I check PyPI dependencies for CVE-2026-55520?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-wjmf-p669-5m5p",
"modified" : "2026-08-28T18:43:02Z",
"published" : "2026-08-28T18:43:02Z",
"aliases" : [ "CVE-2026-55520" ],
"summary" : "Protego has exponential backtracking ReDoS in robots.txt URL wildcard matching",
"details" : "### Problem description\n\nProtego 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.\n\n### Impact\n\nParsing 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.\n\n### Proof of concept\n\n```python\nfrom protego import Protego\n\nrobotstxt = f\"\"\"\nUser-agent: *\nDisallow: /{\"*1\" * 12}*Z\n\"\"\"\nrp = Protego.parse(robotstxt)\nurl = \"/\" + \"1\" * 60\nrp.can_fetch(url, \"mybot\") # freezes\n```",
"severity" : [ {
"type" : "CVSS_V4",
"score" : "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"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "Protego"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.6.2"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 0.6.1"
}
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/scrapy/protego/security/advisories/GHSA-wjmf-p669-5m5p"
}, {
"type" : "WEB",
"url" : "https://github.com/scrapy/protego/commit/785940181659bf440ba82f1da148fade5087e858"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/scrapy/protego"
}, {
"type" : "WEB",
"url" : "https://github.com/scrapy/protego/releases/tag/0.6.2"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-1333", "CWE-400" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2026-08-28T18:43:02Z",
"nvd_published_at" : null
}
}