Protego: Exponential backtracking ReDoS in robots.txt URL wildcard matching
Protego is a pure-Python robots.txt parser with support for modern conventions. Prior to 0.6.2, protego._urlpattern._URLPattern._prepare_pattern_for_regex translates every asterisk in an Allow or Disallow directive into a lazy regular-expression wildcard, so a directive containing many asterisks creates exponential backtracking. After protego.Protego.parse processes a crafted robots.txt file, protego.Protego.can_fetch can spend an attacker-controlled period matching a near-miss URL and deny service to the crawler. The vulnerable path is src/protego/_urlpattern.py in the _URLPattern match logic. This issue is fixed in version 0.6.2.
- Products
- Not specified
- Affected versions
- Not specified
- Fixed versions
- Not specified
- CVEs
- CVE-2026-55520
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 3 Nov 2026, 11:01 UTC · Revision 1
Source evidence
Protego: Exponential backtracking ReDoS in robots.txt URL wildcard matching
core-osv · Original sourcePublished 28 Aug 2026, 18:42 UTC
Protego is a pure-Python robots.txt parser with support for modern conventions. Prior to 0.6.2, protego._urlpattern._URLPattern._prepare_pattern_for_regex translates every asterisk in an Allow or Disallow directive into a lazy regular-expression wildcard, so a directive containing many asterisks creates exponential backtracking. After protego.Protego.parse processes a crafted robots.txt file, protego.Protego.can_fetch can spend an attacker-controlled period matching a near-miss URL and deny service to the crawler. The vulnerable path is src/protego/_urlpattern.py in the _URLPattern match logic. This issue is fixed in version 0.6.2.
osv:CVE-2026-55520
Complete source record
{
"id": "f932bf76be9fc4018fbc3b13301c841eb6ae058b0cd608b2b826682e9936ed29",
"url": "https://osv.dev/vulnerability/CVE-2026-55520",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "Protego: Exponential backtracking ReDoS in robots.txt URL wildcard matching",
"summary": "Protego is a pure-Python robots.txt parser with support for modern conventions. Prior to 0.6.2, protego._urlpattern._URLPattern._prepare_pattern_for_regex translates every asterisk in an Allow or Disallow directive into a lazy regular-expression wildcard, so a directive containing many asterisks creates exponential backtracking. After protego.Protego.parse processes a crafted robots.txt file, protego.Protego.can_fetch can spend an attacker-controlled period matching a near-miss URL and deny service to the crawler. The vulnerable path is src/protego/_urlpattern.py in the _URLPattern match logic. This issue is fixed in version 0.6.2.",
"evidence": "osv:CVE-2026-55520",
"products": [],
"severity": "high",
"structured": {
"id": "CVE-2026-55520",
"aliases": [
"CVE-2026-55520",
"GHSA-wjmf-p669-5m5p",
"PYSEC-2026-3906"
],
"metrics": [
{
"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": [
{
"ranges": [
{
"repo": "https://github.com/scrapy/protego",
"type": "GIT",
"events": [
{
"introduced": "0"
},
{
"fixed": "efe5039d39ee51f117acd0b01ffd8109ae265c22"
},
{
"fixed": "785940181659bf440ba82f1da148fade5087e858"
}
],
"database_specific": {
"extracted_events": [
{
"range": [
{
"introduced": "0"
},
{
"fixed": "0.6.2"
}
],
"source": "AFFECTED_FIELD",
"strategy": "StringRangeExpression"
},
{
"range": [
{
"fixed": "785940181659bf440ba82f1da148fade5087e858"
}
],
"source": "REFERENCES_COMMIT"
},
{
"range": [
{
"fixed": "efe5039d39ee51f117acd0b01ffd8109ae265c22"
}
],
"source": "REFERENCES_TAG",
"original_tag": "0.6.2"
}
]
}
}
],
"versions": [
"0.6.1",
"0.6.0",
"0.5.0",
"0.4.0",
"0.3.1",
"0.3.0",
"0.2.1",
"0.2.0",
"0.1.16",
"0.1.15",
"0.1.14",
"0.1.13",
"0.1.12",
"0.1.11",
"0.1.10",
"0.1.9",
"0.1.8",
"0.1.7",
"0.1.6",
"v0.1.2",
"0.1.5",
"0.1.4",
"0.1.3",
"v0.1.1",
"v0.1"
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-55520.json"
}
}
],
"modified": "2026-10-28T02:30:28.009072736Z",
"provider": "osv",
"references": [
"https://github.com/scrapy/protego/releases/tag/0.6.2",
"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/55xxx/CVE-2026-55520.json",
"https://github.com/scrapy/protego/security/advisories/GHSA-wjmf-p669-5m5p",
"https://nvd.nist.gov/vuln/detail/CVE-2026-55520",
"https://github.com/scrapy/protego/commit/785940181659bf440ba82f1da148fade5087e858"
],
"provider_metadata": {
"cwe_ids": [
"CWE-1333",
"CWE-400"
],
"cna_assigner": "GitHub_M",
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/55xxx/CVE-2026-55520.json"
}
},
"related_cves": [
{
"value": "CVE-2026-55520",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 494800,
"published_at": "2026-08-28T18:42:38.334+00:00"
}