CVE-2026-55520: Python Wildcard To Regex Redos

Translating wildcard patterns into regular expressions by mapping '*' to '.*?' or '.*' can lead to catastrophic backtracking (ReDoS) when evaluated against untrusted or complex inputs. Use non-regex string scanning (such as str.find/split) or a linear-time pattern matcher instead.

Provally CuratedPublic repositoryMediumMedium confidenceVerifiedApache-2.0Python
greprules fetch cve-2026-55520-python-wildcard-to-regex-redos --engine opengrep

Description

Translating wildcard patterns into regular expressions by mapping '*' to '.*?' or '.*' can lead to catastrophic backtracking (ReDoS) when evaluated against untrusted or complex inputs. Use non-regex string scanning (such as str.find/split) or a linear-time pattern matcher instead.