CVE-2026-132276 in wcmatchinfo

Summary

by MITRE • 11/20/2026

wcmatch is a Python library for wildcard file-name matching. Prior to 11.2, under the default flags, matching a non-matching attacker-controlled name against an application-supplied pattern containing several star wildcards separated by literals makes the lazy .? and [^/]? segments, including _STAR and _PATH_STAR emitted by _handle_star() in wcmatch/_wcparse.py, backtrack across possible splits, so a single comparison can consume prolonged CPU time. The pattern remains a developer-controlled constant and only the name is attacker-controlled; affected paths include fnmatch.fnmatch(), glob.globmatch(), and filesystem glob scans where another user can create names, without enabling extglob or any non-default flag. This issue is fixed in 11.2.

If you want to get the best quality for vulnerability data then you always have to consider VulDB.

Analysis

by VulDB Data Team • 11/20/2026

The wcmatch library serves as a Python utility for performing wildcard file-name matching, providing functionality that extends beyond standard shell globs by supporting extended globbing patterns. A critical vulnerability exists within the core parsing and matching logic of versions prior to 11.2, specifically affecting operations such as fnmatch.fnmatch(), glob.globmatch(), and filesystem glob scans where user-supplied filenames are matched against developer-defined pattern strings. The flaw is rooted in how the library handles wildcard characters under default configuration flags, particularly when processing patterns that contain multiple star wildcards separated by literal characters. This architectural decision leads to a significant performance degradation due to inefficient backtracking behavior within the regular expression engine used internally for matching.

The technical root cause lies in the implementation of the _handle_star() function located in wcmatch/_wcparse.py. When processing patterns with several star wildinterspersed with literals, the library emits lazy non-greedy segments such as .? and [^/]?. These segments are designed to match minimal amounts of text but lack sufficient constraints to prevent catastrophic backtracking when faced with specific input structures crafted by an attacker. Because the pattern itself is a constant controlled by the developer while only the filename is supplied by the user, this creates a scenario where malicious actors can exploit the asymmetry in control. By providing a non-matching name that forces the engine to explore numerous possible splits between literal characters and wildcards, the system triggers an exponential increase in computational steps required for each comparison attempt.

This vulnerability results in a Denial of Service condition characterized by prolonged CPU consumption rather than memory exhaustion or code execution. An attacker who can influence file names within directories being scanned by applications using wcmatch can trigger this behavior repeatedly. In environments where filesystem glob scans are performed on user-writable paths, such as temporary upload directories or shared storage locations, a malicious actor could create files with specifically crafted names to exhaust server resources. This effectively renders the application unresponsive or significantly slows down legitimate operations without requiring elevated privileges or complex exploitation chains beyond simple file creation and triggering of the matching function.

From a classification perspective, this issue aligns with CWE-400: Uncontrolled Resource Consumption, as it involves an attacker causing the system to consume excessive computational resources through crafted input that triggers inefficient algorithmic behavior. It also relates to CWE-730: Improper Regular Expression Matching, specifically regarding patterns that allow for catastrophic backtracking when processing untrusted data. In terms of adversary tactics, this vulnerability supports techniques associated with Resource Hijacking within the MITRE ATT&CK framework, where an attacker aims to degrade service availability by consuming system resources such as CPU cycles or memory through inefficient code paths triggered by specific input sequences.

The operational impact is primarily focused on availability and performance integrity rather than confidentiality or data integrity. Applications relying heavily on file matching for security checks, access control decisions based on filename patterns, or batch processing of large directory trees are most susceptible to this issue. The lack of extglob support in the affected default configuration means that many standard use cases remain vulnerable unless explicitly configured otherwise, which developers may not be aware of given the library's default settings prioritize ease of use over strict performance guarantees for edge-case inputs.

Mitigation strategies require immediate upgrading to wcmatch version 11.2 or later, where this backtracking issue has been resolved through improved handling of wildcard segments and more efficient regular expression construction. For organizations unable to upgrade immediately due to dependency constraints, applying a temporary workaround involves validating input filenames before passing them to matching functions if possible, although complete validation is often impractical in globbing scenarios. Additionally, implementing resource limits at the operating system or application level can help contain the impact of such attacks by capping CPU usage per process. Developers should also review their use of wcmatch to ensure that patterns are not overly complex with multiple wildcards separated by literals when processing untrusted input, and consider using more robust file matching libraries if high-volume user-controlled filename processing is a core requirement.

Responsible

GitHub M

Reservation

11/18/2026

Disclosure

11/20/2026

Moderation

accepted

CPE

ready

EPSS

0.00881

KEV

no

Activities

very low

Sources

Might our Artificial Intelligence support you?

Check our Alexa App!