Skip to content
OpenAdvisories
High · 7.1 CVE-2026-55520 EUVD-2026-67865GHSA-wjmf-p669-5m5pPYSEC-2026-3906

Protego: Exponential backtracking ReDoS in robots.txt URL wildcard matching

Published Aug 28, 2026 · Updated Aug 31, 2026 · Assigned by GitHub_M

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.

Affected products

VendorProductAffectedFixed
scrapy protego < 0.6.2 —

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Debian 14 python-protego 0.6.2+dfsg-1 —
Debian 13 python-protego No fix yet —
Debian 12 python-protego No fix yet —
ReleasePackageFixed inAdvisory
Ubuntu 26.10 python-protego No fix yet —
Ubuntu 26.04 LTS python-protego No fix yet —
Ubuntu 25.10 python-protego No fix yet —
Ubuntu 24.04 LTS python-protego No fix yet —
Ubuntu 22.04 LTS python-protego No fix yet —
Show 1 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
Ubuntu 20.04 LTS python-protego No fix yet —
ReleasePackageFixed inAdvisory
openSUSE Tumbleweed python-Protego 0.6.2-1.1 openSUSE-SU-2026:11202-1

Affected packages

EcosystemPackageAffectedFixedRecord
PyPI protego < 0.6.2 0.6.2 GHSA-wjmf-p669-5m5p

Advisories 1

References