{"id":"CVE-2026-55520","aliases":["DEBIAN-CVE-2026-55520","EUVD-2026-67865","GHSA-wjmf-p669-5m5p","PYSEC-2026-3906","UBUNTU-CVE-2026-55520","openSUSE-SU-2026:11202-1"],"status":"published","title":"Protego: Exponential backtracking ReDoS in robots.txt URL wildcard matching","description":"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.","severity":{"version":"4.0","score":7.1,"vector":"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","level":"high","assessor":"cna","from":"cve"},"epss":{"day":"2026-11-12","score":0.00511,"percentile":0.44069,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-1333","CWE-400"],"published":"2026-07-07T00:00:00Z","modified":"2026-10-28T02:30:28Z","fixes":[{"ecosystem":"PyPI","package":"protego","fixed_in":["0.6.2"],"sources":["ghsa","osv"]},{"ecosystem":"Debian:14","package":"python-protego","fixed_in":["0.6.2+dfsg-1"],"sources":["osv"]},{"ecosystem":"openSUSE:Tumbleweed","package":"python-Protego","fixed_in":["0.6.2-1.1"],"sources":["osv"]}],"affected":[{"source":"ghsa","ecosystem":"PyPI","package":"protego","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"last_affected":"0.6.1"},{"fixed":"0.6.2"}]}]},{"source":"osv","ecosystem":"Debian:12","package":"python-protego","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["0.2.1+dfsg-1","0.3.0+dfsg-1","0.3.1+dfsg-1","0.4.0+dfsg-1","0.5.0+dfsg-1","0.6.0+dfsg-1","0.6.2+dfsg-1","0.7.0+dfsg-1"]},{"source":"osv","ecosystem":"Debian:13","package":"python-protego","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["0.4.0+dfsg-1","0.5.0+dfsg-1","0.6.0+dfsg-1","0.6.2+dfsg-1","0.7.0+dfsg-1"]},{"source":"osv","ecosystem":"Debian:14","package":"python-protego","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.6.2+dfsg-1"}]}],"versions":["0.4.0+dfsg-1","0.5.0+dfsg-1","0.6.0+dfsg-1"]},{"source":"osv","ecosystem":"PyPI","package":"protego","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.6.2"}]}],"versions":["0.1","0.1.12","0.1.14","0.1.15","0.1.16","0.1.dev0","0.2.0","0.2.1","0.3.0","0.3.1","0.4.0","0.5.0","0.6.0","0.6.1"]},{"source":"osv","ecosystem":"PyPI","package":"protego","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.6.2"}]}],"versions":["0.1","0.1.12","0.1.14","0.1.15","0.1.16","0.1.dev0","0.2.0","0.2.1","0.3.0","0.3.1","0.4.0","0.5.0","0.6.0","0.6.1"]},{"source":"osv","ecosystem":"Ubuntu:20.04:LTS","package":"python-protego","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["0.1.16+dfsg-1"]},{"source":"osv","ecosystem":"Ubuntu:22.04:LTS","package":"python-protego","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["0.1.16+dfsg-2","0.1.16+dfsg-3","0.2.1+dfsg-1"]},{"source":"osv","ecosystem":"Ubuntu:24.04:LTS","package":"python-protego","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["0.2.1+dfsg-1","0.3.0+dfsg-1"]},{"source":"osv","ecosystem":"Ubuntu:25.10","package":"python-protego","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["0.4.0+dfsg-1"]},{"source":"osv","ecosystem":"Ubuntu:26.10","package":"python-protego","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["0.6.0+dfsg-1","0.6.2+dfsg-1"]},{"source":"osv","ecosystem":"Ubuntu:26.04:LTS","package":"python-protego","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["0.4.0+dfsg-1","0.5.0+dfsg-1","0.6.0+dfsg-1"]},{"source":"osv","ecosystem":"openSUSE:Tumbleweed","package":"python-Protego","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.6.2-1.1"}]}]}],"products":[{"vendor":"scrapy","product":"protego"}],"references":[{"url":"https://github.com/scrapy/protego/security/advisories/GHSA-wjmf-p669-5m5p","tags":["x_refsource_CONFIRM","advisory","web","report"]},{"url":"https://github.com/scrapy/protego/commit/785940181659bf440ba82f1da148fade5087e858","tags":["x_refsource_MISC","fix","web"]},{"url":"https://github.com/scrapy/protego/releases/tag/0.6.2","tags":["x_refsource_MISC","web"]},{"url":"https://github.com/advisories/GHSA-wjmf-p669-5m5p","tags":["advisory"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/55xxx/CVE-2026-55520.json","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-55520","tags":["advisory"]},{"url":"https://security-tracker.debian.org/tracker/CVE-2026-55520","tags":["advisory"]},{"url":"https://github.com/scrapy/protego","tags":["package"]},{"url":"https://pypi.org/project/protego","tags":["package"]},{"url":"https://ubuntu.com/security/CVE-2026-55520","tags":["report"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2026-55520","tags":["report"]},{"url":"","tags":["advisory"]},{"url":"https://www.suse.com/security/cve/CVE-2026-55520","tags":["web"]}],"sources":{"cve":[{"id":"CVE-2026-55520","title":"Protego: Exponential backtracking ReDoS in robots.txt URL wildcard matching","description":"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.","status":"published","published":"2026-08-28T18:42:38.334Z","modified":"2026-08-31T18:54:01.091Z","cvss":[{"version":"4.0","score":7.1,"vector":"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","level":"high","assessor":"cna"}],"cwes":["CWE-400","CWE-1333"],"updated_at":"2026-11-02T14:20:11.925815Z"}],"euvd":[{"id":"EUVD-2026-67865","description":"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.","status":"published","published":"2026-08-28T18:42:38Z","modified":"2026-08-31T18:54:01Z","cvss":[{"version":"4.0","score":7.1,"vector":"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","level":"high"}],"updated_at":"2026-11-02T18:01:19.818565Z"}],"ghsa":[{"id":"GHSA-wjmf-p669-5m5p","title":"Protego has exponential backtracking ReDoS in robots.txt URL wildcard matching","description":"### 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```","status":"published","published":"2026-08-28T18:43:02Z","modified":"2026-08-28T18:43:04Z","cvss":[{"version":"4.0","score":7.1,"vector":"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","level":"high"}],"cwes":["CWE-400","CWE-1333"],"updated_at":"2026-11-02T14:41:08.084849Z"}],"nvd":[{"id":"CVE-2026-55520","description":"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.","status":"published","published":"2026-08-28T20:18:28.1Z","modified":"2026-09-09T21:09:13.08Z","cvss":[{"version":"4.0","score":7.1,"vector":"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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X","level":"high","assessor":"secondary"}],"cwes":["CWE-400","CWE-1333"],"updated_at":"2026-11-02T14:12:42.366888Z"}],"osv":[{"id":"CVE-2026-55520","title":"Protego: Exponential backtracking ReDoS in robots.txt URL wildcard matching","description":"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.","status":"published","published":"2026-08-28T18:42:38.334Z","modified":"2026-10-28T02:30:28.009072736Z","cvss":[{"version":"4.0","score":7.1,"vector":"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","level":"high"}],"cwes":["CWE-1333","CWE-400"],"updated_at":"2026-11-02T15:45:11.22012Z"},{"id":"DEBIAN-CVE-2026-55520","description":"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.","status":"published","published":"2026-08-28T20:18:28.1Z","modified":"2026-10-01T03:03:27.311907726Z","cvss":[{"version":"4.0","score":7.1,"vector":"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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X","level":"high"}],"updated_at":"2026-11-02T15:45:57.590991Z"},{"id":"GHSA-wjmf-p669-5m5p","title":"Protego has exponential backtracking ReDoS in robots.txt URL wildcard matching","description":"### 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```","status":"published","published":"2026-08-28T18:43:02Z","modified":"2026-09-10T12:25:43.026818158Z","cvss":[{"version":"4.0","score":7.1,"vector":"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","level":"high"}],"cwes":["CWE-1333","CWE-400"],"updated_at":"2026-11-02T15:46:58.767335Z"},{"id":"PYSEC-2026-3906","title":"Protego has exponential backtracking ReDoS in robots.txt URL wildcard matching","description":"### 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```","status":"published","published":"2026-09-10T09:44:58.501183Z","modified":"2026-09-10T12:15:12.559484951Z","cvss":[{"version":"4.0","score":7.1,"vector":"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","level":"high"}],"updated_at":"2026-11-02T15:52:57.255153Z"},{"id":"UBUNTU-CVE-2026-55520","description":"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.","status":"published","published":"2026-08-28T20:18:00Z","modified":"2026-10-17T12:59:07.799702364Z","cvss":[{"version":"4.0","score":7.1,"vector":"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","level":"high"}],"updated_at":"2026-11-02T16:56:41.382716Z"},{"id":"openSUSE-SU-2026:11202-1","title":"python313-Protego-0.6.2-1.1 on GA media","description":"These are all security issues fixed in the python313-Protego-0.6.2-1.1 package on the GA media of openSUSE Tumbleweed.","status":"published","published":"2026-07-07T00:00:00Z","modified":"2026-07-09T10:00:07.081173729Z","updated_at":"2026-11-02T16:58:38.95195Z"}]}}
