wcmatch fixes ReDoS vulnerability affecting versions 11.1 and earlier

  • wcmatch
  • ReDoS
  • wildcard matching

Multiple-star patterns can tie up a CPU core for minutes per filename

A 255-byte filename took up to 86 seconds to match

The flaw is fixed in wcmatch 11.2

The wcmatch project disclosed a denial-of-service vulnerability on November 20, 2026. The flaw affects file-name matching with default flags when untrusted names are checked against patterns containing several star wildcards.

The practical effect is prolonged CPU use: the project’s advisory says matching a 255-byte filename against a pattern such as `*_*_*_*_*.csv` takes about 73 seconds with `fnmatch.fnmatch()` and 86 seconds with `glob.globmatch()`. Repeated matches can block a single CPU core for minutes per name without authentication.

The vulnerability affects wcmatch versions 11.1 and earlier. The pattern can be a fixed value supplied by an application developer; the filename is the untrusted input. The project fixed the issue in version 11.2.