CVE-2026-55520: Protego ReDoS in robots.txt wildcard matching

CVE-2026-55520 · Severity: high · CVSS 4 · Published 2026-08-28

Protego is a Python library that parses robots.txt files to determine which web URLs a crawler may access. The library constructs regular expressions to match URLs against permission directives. A malicious robots.txt file with many wildcard characters can cause the regex engine to perform exponential backtracking, freezing the application indefinitely and preventing normal web crawling operations.

Vendors: PyPI.

Quick answers

Is CVE-2026-55520 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2026-55520 being exploited in the wild.
How severe is CVE-2026-55520?
High severity, with a CVSS score of 4, published 28 August 2026.
Which products and versions are affected?
Protego (PyPI) <= 0.6.1, ECOSYSTEM:introduced=0,fixed=0.6.2.
Is there a fix for CVE-2026-55520?
Yes. Protego (PyPI): upgrade to 0.6.2 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2026-55520 attacked?
It is attacked over the network, in a software library.
Am I affected by CVE-2026-55520?
Check whether you run Protego (PyPI) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

How to fix

  • Protego (PyPI): upgrade to 0.6.2 or later
    pip install "Protego>=0.6.2"

Technical details

This is a Regular Expression Denial of Service (ReDoS) vulnerability in the wildcard matching logic of protego._urlpattern._URLPattern._prepare_pattern_for_regex(). The vulnerable code translates each asterisk (*) in robots.txt directives into a lazy regex piece (.*?), so a directive like "/\*1\*1\*1...\*Z" generates a regex with many overlapping lazy quantifiers. When the can_fetch() method attempts to match a URL against this regex, the regex engine exhibits exponential backtracking—trying all possible combinations before determining non-match—causing the application to hang. The vulnerability requires an attacker to control or influence the robots.txt content served to the application. No authentication or user interaction is strictly required beyond passive acceptance of the malicious robots.txt. The issue is fixed in version 0.6.2 by replacing regex-based wildcard matching with a simpler non-regex approach.

Affected products

  • scrapy Protego <= 0.6.1

Identifiers

  • CVE-2026-55520
  • GHSA-wjmf-p669-5m5p
  • PYSEC-2026-3906

Timeline

  • 2026-06-25: disclosed: GHSA-wjmf-p669-5m5p published
  • 2026-06-25: patched: Version 0.6.2 released with fix
  • 2026-08-28: advisory: Advisory updated on GitHub

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.