Nov 21, 2026·11 min read·0 visits
wcmatch versions prior to 11.2 translate wildcard stars (*) into ungrouped lazy regular expression quantifiers (.*? or [^/]*?). When an application matches untrusted filenames against a static pattern containing multiple star wildcards separated by literals (such as *_*_*_*_*.csv), non-matching inputs containing repeated delimiter characters trigger polynomial-time backtracking O(n^k). Upgrading to wcmatch 11.2 resolves the issue by wrapping intermediate star segments in Python 3.11+ atomic groups (?>...), reducing matching complexity to linear time O(n).
CVE-2026-132276 (GHSA-53pm-wgxf-c6qf) is an algorithmic complexity and Regular Expression Denial of Service (ReDoS) vulnerability in the Python wcmatch wildcard and glob matching library prior to version 11.2. Under default flags, matching a non-matching attacker-controlled filename against a static developer-defined pattern containing multiple star (*) wildcards separated by literal delimiters causes polynomial-time backtracking O(n^k) in the compiled regular expression. A single 255-byte filename evaluated against a 5-star pattern consumes approximately 86 seconds of 100% CPU time, allowing unauthenticated attackers to induce severe availability degradation.
wcmatch (Wildcard Match) is a widely deployed Python library developed by Isaac Muse (facelessuser) that provides enhanced filename matching, globbing, and path manipulation capabilities beyond CPython's standard fnmatch and glob modules. Internally, wcmatch operates by parsing wildcard expressions into an intermediate representation and compiling them into Python re regular expression objects. Because applications frequently use wcmatch to filter user-uploaded filenames, scan multi-tenant directories, or validate user-supplied path strings, the pattern evaluation engine is directly exposed to untrusted input across network boundaries.
In versions prior to 11.2, wcmatch is vulnerable to a polynomial-time Regular Expression Denial of Service (ReDoS), tracked as CVE-2026-132276 (GHSA-53pm-wgxf-c6qf) and classified under CWE-1333 (Inefficient Regular Expression Complexity). The vulnerability occurs under default configuration flags without requiring extended globbing (EXTGLOB) or any non-default options. It is triggered when an application matches an attacker-controlled string against a static, developer-supplied pattern containing multiple * wildcards separated by fixed literal characters.
Unlike traditional ReDoS flaws that require an attacker to inject a malicious regular expression pattern, CVE-2026-132276 operates when the pattern is a trusted application constant (for example, *_*_*_*_*.csv) and only the target filename is attacker-controlled. This attack surface encompasses direct calls to wcmatch.fnmatch.fnmatch(), wcmatch.fnmatch.fnmatchcase(), wcmatch.glob.globmatch(), wcmatch.pathlib.Path.match(), and filesystem scans via wcmatch.glob.glob() where an unprivileged user can create files on disk.
When a non-matching target string contains repeated instances of the literal separator without satisfying the trailing portion of the pattern, the underlying Python regular expression engine attempts every combinatorial distribution of the separator characters across the wildcard slots. For a pattern with $k$ stars and a filename of length $n$, execution time scales polynomially at $O(n^k)$. Within the standard POSIX filename length limit (NAME_MAX of 255 bytes), a single comparison against a 5-star pattern monopolizes a CPU thread for approximately 86 seconds.
The root cause of CVE-2026-132276 lies in how the pattern parser in wcmatch/_wcparse.py translates individual * wildcard tokens into regular expression subpatterns. When the parser encounters a single * token during pattern lexical analysis, it invokes _handle_star(). Depending on whether path separator awareness is active, _handle_star() emits either the _STAR constant (.*?) or the _PATH_STAR constant ([^/]*?). Both constructs use lazy (non-greedy) repetition quantifiers.
Consider a developer-defined pattern containing five star wildcards separated by underscores and terminated by a file extension, such as *_*_*_*_*.csv. In wcmatch versions 11.1 and earlier, the parser translates this wildcard expression into the following regular expression:
^(?s:(?=.)(?![.]).*?_.*?_.*?_.*?_.*?\.csv)$When the regular expression engine evaluates a non-matching input consisting of 255 underscore characters ("_" * 255), the initial lookahead assertions pass, and the first lazy quantifier .*? matches zero characters before the engine consumes the first _ literal. This process repeats until the fifth .*? quantifier consumes the remaining characters in the string in an attempt to locate the trailing \.csv literal. Because the input string does not end with .csv, the match fails at the end of the string.
Upon failure at the terminal token, Python's backtracking re engine rewinds to the fifth .*? quantifier, expands its match across the next available _, and retries. Once all positions for the fifth star are exhausted, the engine backtracks to the fourth .*?_, advances it by one underscore, and re-evaluates all possible split positions for the fifth star. Because all five quantifiers can match the delimiter character _, the engine must exhaustively traverse $\binom{n}{k-1}$ combinations before returning False.
CPython's standard library fnmatch module previously suffered from this identical flaw, which was resolved upstream in bpo-40480 by wrapping intermediate star-plus-literal segments in atomic groups (?>...). Because an unanchored star wildcard can absorb any arbitrary prefix characters, the earliest location at which the subsequent fixed literal matches is mathematically guaranteed to be optimal; if the remainder of the pattern cannot match from that first occurrence, starting the remainder of the pattern at a later occurrence of the same literal will also fail. Prior to version 11.2, wcmatch lacked this atomic grouping transformation.
The vulnerability was remediated in commit 83491aadde57780330f993620083e979f645c80c by Aleksandr Kovalko and Isaac Muse. The patch modifies wcmatch/_wcparse.py to track emitted star tokens and wrap fixed-length segments between consecutive stars inside Python 3.11+ atomic groups (?>...). Consequently, wcmatch 11.2 dropped support for Python 3.10 to rely on native atomic grouping in the standard re engine.
First, the patch introduces two marker subclasses of str in wcmatch/_wcparse.py: AtomicStar, which identifies a standard * token eligible for atomic grouping, and ExtGroup, which identifies top-level variable-length extended glob groups (such as @(...), +(...), or *(...)). In _WcParse.__init__(), a new state tracking attribute self.emitted_star = -1 is initialized to record the index of the first AtomicStar emitted within the current pattern segment.
In _handle_star(), when a single star is processed outside of a character list (not self.in_list), the parser records the first star's position in self.emitted_star and wraps the emitted regex string (.*? or [^/]*?) in the AtomicStar marker class:
# wcmatch/_wcparse.py - _handle_star()
else:
# Ensure the star is not inside a bracketed character class [...]
if not self.in_list:
# Record the starting index of the first star in the current segment
if self.emitted_star == -1:
self.emitted_star = len(current)
# Tag the emitted lazy regex token for post-processing
value = AtomicStar(value)
current.append(value)After parsing a pattern segment (or before splitting on root path separators), the parser calls the newly introduced atomic_stars() method on the accumulated token list parts. This method iterates from self.emitted_star to the end of the parts list and pairs consecutive AtomicStar tokens:
# wcmatch/_wcparse.py - atomic_stars()
def atomic_stars(self, parts: list[str]) -> None:
if self.emitted_star == -1:
return
start = -1
for r in range(self.emitted_star, len(parts)):
part = parts[r]
# Identify the opening star of a potential atomic segment
if start == -1:
if isinstance(part, AtomicStar):
start = r
# Abort atomic wrapping for this star if a variable-length ExtGroup intervenes
elif isinstance(part, ExtGroup):
parts[start] = str(parts[start])
start = -1
# Upon reaching the next star, wrap [start .. r-1] in an atomic group (?>...)
elif isinstance(part, AtomicStar):
end = r - 1
parts[start] = f'(?>{parts[start]}'
parts[end] = f'{parts[end]})'
start = r
# Leave the final star unwrapped, as no subsequent star exists to absorb differences
if start > -1:
parts[start] = str(parts[start])
self.emitted_star = -1With this transformation in place, the pattern *_*_*_*_*.csv compiles to:
^(?s:(?=.)(?![.])(?>.*?_)(?>.*?_)(?>.*?_)(?>.*?_).*?\.csv)$> [!NOTE]
> Regarding fix completeness, atomic_stars() explicitly skips wrapping a segment if an ExtGroup token lies between two stars (elif isinstance(part, ExtGroup)). This exclusion is necessary for correctness: extended glob groups can match variable-length substrings, meaning the first match of an ExtGroup after a star is not guaranteed to leave a suffix that the next star can absorb identically. Therefore, while standard default-flag patterns are fully protected and execute in $O(n)$ linear time, applications that explicitly enable the non-default EXTGLOB flag and interleave * tokens with variable-length extended glob groups remain outside the scope of the AtomicStar optimization.
Exploiting CVE-2026-132276 requires no special privileges or authentication if an application exposes a code path that matches user-provided filenames or strings against a multi-star wcmatch pattern. Common attack vectors include multipart HTTP file upload handlers that validate filenames against expected naming schemas (for example, backup_*_*_*_*.tar.gz), log ingestion pipelines, or shared directories scanned by scheduled jobs using wcmatch.glob.glob().
To trigger worst-case polynomial backtracking, the attacker constructs a string of length $n$ consisting entirely of the literal delimiter characters separating the stars in the target pattern, while omitting or corrupting the final literal suffix so that the match ultimately fails. Because POSIX filesystems permit filenames up to 255 bytes (NAME_MAX = 255), a single valid filename is sufficient to trigger prolonged CPU starvation.
A minimal reproduction script demonstrates the timing divergence on wcmatch <= 11.1:
import time
import wcmatch.fnmatch as fnmatch
# Developer-defined constant pattern containing 5 stars separated by underscores
pattern = "*_*_*_*_*.csv"
# Attacker-supplied filename (255 underscores, omitting the .csv suffix)
malicious_name = "_" * 255
t0 = time.perf_counter()
result = fnmatch.fnmatch(malicious_name, pattern)
elapsed = time.perf_counter() - t0
print(f"Match result: {result} | Elapsed: {elapsed:.4f}s")
# wcmatch 11.1 output: Match result: False | Elapsed: 86.1420s
# wcmatch 11.2 output: Match result: False | Elapsed: 0.0002sEmpirical benchmarking across increasing payload lengths ($n$) against the 5-star pattern *_*_*_*_*.csv illustrates the $O(n^5)$ polynomial growth curve in vulnerable versions compared to the $O(n)$ linear performance in wcmatch 11.2 and CPython's standard library fnmatch:
| Input Length ($n$) | wcmatch <= 11.1 (Vulnerable) | wcmatch 11.2 (Patched) | CPython fnmatch (Stdlib) |
|---|---|---|---|
| $n = 80$ | 0.19 s | 0.0002 s | 0.0002 s |
| $n = 120$ | 1.42 s | 0.0002 s | 0.0002 s |
| $n = 160$ | 5.86 s | 0.0002 s | 0.0002 s |
| $n = 255$ | ~86.00 s | 0.0002 s | 0.0001 s |
In a web service context using synchronous Python worker threads or single-threaded event loops (such as asyncio, Flask, or FastAPI endpoints running synchronous file checks), submitting a small batch of concurrent HTTP requests containing 255-character filenames saturates all available worker processes. Because Python's re engine executes in C without releasing the Global Interpreter Lock (GIL) during a single .match() evaluation, a single malicious filename blocks the entire Python interpreter process for the duration of the backtracking loop.
CVE-2026-132276 is rated Medium severity with a CVSS v3.1 base score of 5.9 (CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H). The Attack Vector is Network (AV:N), requiring no privileges (PR:N) and no user interaction (UI:N). The Attack Complexity is scored as High (AC:H) because successful exploitation depends on the target application utilizing a specific pattern topology—namely, multiple star wildcards separated by literal delimiters (k >= 3).
The security impact is strictly confined to system availability (A:H), with no direct impact on confidentiality (C:N) or integrity (I:N). When triggered, the vulnerability causes complete CPU core saturation within the affected Python process. Because the C-level regular expression engine holds the Python Global Interpreter Lock (GIL) throughout the evaluation of a single string, multi-threaded Python servers cannot preempt the stalled thread or service concurrent requests on other threads within the same process.
In multi-tenant environments where low-privileged users can create files on a shared filesystem (such as shared SFTP dropboxes, Git repositories, or archive extraction directories), an attacker can plant a small number of 255-byte filenames consisting of repeated delimiters. Any privileged daemon, backup utility, or CI/CD runner that subsequently executes wcmatch.glob.glob() or wcmatch.pathlib.Path.glob() over that directory will stall indefinitely as it evaluates each planted filename.
The primary remediation is to upgrade wcmatch to version 11.2 or later, which incorporates commit 83491aadde57780330f993620083e979f645c80c and wraps fixed-length star segments in atomic groups:
pip install --upgrade "wcmatch>=11.2"> [!IMPORTANT]
> wcmatch 11.2 requires Python 3.11 or newer. Support for Python 3.10 was removed in 11.2 because the fix relies on the (?>...) atomic group syntax introduced in Python 3.11's re standard library module. Environments constrained to Python 3.10 or earlier cannot upgrade directly to wcmatch 11.2 and must apply application-level workarounds.
For environments unable to upgrade immediately, developers should implement one or more of the following mitigations:
wcmatch matching functions. Because $O(n^k)$ complexity scales rapidly with $n$, restricting candidate filenames to a maximum of 32 to 48 characters prevents single comparisons from blocking the interpreter for measurable durations.fnmatch for Simple Patterns: If the application does not rely on wcmatch-specific extensions (such as brace expansion, globstar **, or extended globbing) for a given multi-star pattern, replace wcmatch.fnmatch.fnmatch() calls with CPython's built-in fnmatch.fnmatchcase(), which includes the bpo-40480 atomic star fix in supported Python 3 releases.*_*_*_*_*.csv) with deterministic string parsing methods such as name.endswith('.csv') and name.count('_') >= 4.CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H| Product | Affected Versions | Fixed Version |
|---|---|---|
wcmatch facelessuser | < 11.2 | 11.2 |
| Attribute | Detail |
|---|---|
| CVE / GHSA ID | CVE-2026-132276 / GHSA-53pm-wgxf-c6qf |
| Weakness Class | CWE-1333: Inefficient Regular Expression Complexity (ReDoS) |
| CVSS v3.1 Score | 5.9 Medium (CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H) |
| Affected Versions | wcmatch < 11.2 (all versions up to and including 11.1) |
| Patched Version | wcmatch >= 11.2 (requires Python >= 3.11) |
| Attack Vector | Attacker-controlled filename/string matched against multi-star developer pattern |
| Time Complexity | O(n^k) polynomial time in <= 11.1; reduced to O(n) linear time in 11.2 |
| Exploit Status | Public Proof-of-Concept available (CISA KEV: Not Listed) |
The product uses a regular expression with an inefficient, possibly exponential worst-case computational complexity that consumes excessive CPU cycles when evaluating crafted non-matching inputs.
CVE-2026-122244 (GHSA-r2q3-7m4h-63qg) is a high-severity cross-privilege Stored Cross-Site Scripting (XSS) vulnerability in Budibase prior to version 3.50.0. The flaw occurs due to defective character escaping in the JSON formatter utility combined with raw HTML rendering via Svelte's {@html} directive in the Budibase Builder interface. A low-privileged application user or an unauthenticated form visitor can store malicious HTML markup in a shared datasource, which subsequently executes arbitrary JavaScript in the browser session of an administrator or application builder inspecting Handlebars formula bindings.
A tenant-confusion vulnerability in the user initialization endpoint of the Budibase worker service (prior to version 3.50.0) allows unauthenticated remote attackers to bypass the one-time administrative setup guard. By supplying arbitrary tenant identifiers in POST requests to /api/global/users/init, an attacker can force the underlying CouchDB datastore to dynamically provision unlimited tenant databases and persist latent global administrator accounts. This results in datastore resource exhaustion, denial of service, and unauthorized administrative account creation inside non-default tenant contexts.
Paymenter versions prior to 1.5.7 contain an arbitrary method invocation vulnerability within the base Livewire component architecture. The application includes a legacy trait, HasConfirmation, inside app/Livewire/Component.php, which is inherited across 36 client-facing Livewire components. This trait exposes a public remote procedure call (RPC) endpoint named executeConfirmedAction without access controls or method allowlisting. Remote attackers can invoke arbitrary methods on any inheriting component, including Livewire's internal fill() method, enabling them to bypass #[Locked] property protections and manipulate internal component state and hydrated Eloquent models.
OpenRemote prior to version 1.31.0 contains a Missing Authorization vulnerability (CWE-862) in the user management REST API endpoint responsible for disconnecting active MQTT sessions. The disconnectUserSession method in UserResourceImpl fails to verify whether the requesting user owns the target MQTT session, holds administrative privileges, or belongs to the realm specified in the request path. As a result, any authenticated user who obtains a valid MQTT session identifier can forcefully terminate active MQTT connections belonging to other users or IoT devices across any tenant realm.
CVE-2026-69133 (GHSA-cg26-4c6j-2x8h) is a missing resource release vulnerability (CWE-772) in io.netty.incubator:netty-incubator-codec-ohttp affecting versions 0.0.20.Final through 0.0.26.Final. Both OHttpClientCodec and OHttpServerCodec retain the outer cumulationBuffer at its expanded high-water capacity after an Oblivious HTTP (OHTTP) exchange finishes. A remote unauthenticated attacker can complete a large OHTTP request or response over an HTTP keep-alive connection and leave the connection idle, pinning pooled or direct memory allocations across concurrent connections to induce denial of service.
A session fixation vulnerability (CWE-384) exists in CKAN (Comprehensive Knowledge Archive Network) prior to versions 2.10.11 and 2.11.6. When configured with server-side session storage and active public web registration, the user registration view programmatically authenticates newly created accounts without regenerating the active session identifier. An attacker capable of fixing or capturing a victim's pre-authentication session cookie can hijack the newly registered account immediately after registration completes.