⚠️

Disclaimer & Liability

The content provided on this website is for educational, research, and security awareness purposes only. Any unauthorized, illegal, or abusive use of the information, tools, and techniques discussed is solely the responsibility of the user. The author and publisher assume no liability for any damages, injuries, or consequences resulting from the misuse of this content.

CVE-2026-141598: CPU exhaustion in wcmatch glob matching | Alireza Bolbolabadi - Red Team Security
LOADING

CVE-2026-141598: CPU exhaustion in wcmatch glob matching

Executive summary

CVE-2026-141598 identifies a regular expression denial of service in wcmatch versions before 13.0. The vulnerable implementation can suffer excessive backtracking when it evaluates glob patterns containing three or more globstar segments.

According to the published advisory, an attacker needs only a few kilobytes of specially selected, non-matching path data to trigger approximately O(n^k) backtracking. A vulnerable match may consume a full processor core for minutes. The consequences are primarily operational: requests, background jobs, and other work handled by the affected process may become slow or unavailable.

The flaw does not imply memory corruption, code execution, authentication bypass, or data disclosure. Exploitation also requires the application to pass attacker-controlled path input or glob expressions to an affected wcmatch interface. No known exploitation in the wild, public proof-of-concept, malicious campaign, or named threat actor is identified in the supplied intelligence.

Vulnerability details

The root cause is the conversion of complex glob patterns into regular expressions whose matching behavior can backtrack pathologically. With three or more interacting globstar segments, a non-matching path can cause the matcher to explore a very large number of possible paths before returning a result.

In the approximate complexity expression O(n^k), n represents the input length and k represents the number of interacting globstar segments. The practical concern is that the triggering input can be small while the resulting CPU workload remains substantial.

Affected interfaces

The advisory identifies the following wcmatch interfaces as vulnerable:

  • glob.globmatch

  • glob.globfilter

  • glob.compile matchers

  • pathlib.PurePath.globmatch

An application is at risk when attacker-influenced path strings or glob patterns reach one of these interfaces. Exposure is less likely where inputs are fixed, trusted, tightly constrained, or never evaluated by the vulnerable library.

Affected systems

  • Product: wcmatch

  • Affected versions: All versions before 13.0

  • Fixed version: wcmatch 13.0

  • Platform: Python environments that use an affected wcmatch release

  • Primary impact: Denial of service through CPU exhaustion

Web services, file-processing systems, automation platforms, build systems, and other multi-user workloads may face elevated risk if they repeatedly match untrusted paths or glob expressions. A single blocking operation can tie up a worker, while concurrent requests can amplify CPU saturation across an application or service fleet.

Exploitability assessment

The triggering payload is reportedly only a few kilobytes and does not appear to require authentication or unusual privileges. That makes exploitation practical wherever an attacker can influence a value evaluated by the affected interfaces. The attack does not depend on memory corruption and is therefore best understood as an algorithmic denial-of-service condition.

The supplied CVSS score is 5.9, with Medium severity. No CVSS vector or separate technical exploitability assessment is provided. The information also does not report exploitation in the wild or attribution to a threat actor. Accordingly, this advisory assesses the issue as medium severity rather than treating the vulnerability as evidence of an active widespread attack.

Mitigation

  1. Upgrade wcmatch to version 13.0 or later, then redeploy or restart every application instance using that dependency.

  1. During the upgrade window, exclude untrusted path strings and glob patterns from the affected matching interfaces.

  1. Where untrusted input remains unavoidable, enforce strict limits on input length, pattern length, and the number of globstar segments before matching.

  1. Replace glob matching with literal or fixed-path comparisons when glob semantics are unnecessary.

  1. Isolate matching workloads in bounded worker processes or separate services with CPU, wall-clock, and concurrency limits. Terminating a worker that exceeds its time budget can shorten an individual denial-of-service event, although it does not correct the vulnerable algorithm.

  1. Add request-level timeouts and monitor for long-running glob operations, repeated worker timeouts, sustained processor saturation, and bursts of path-matching failures.

  1. Audit dependency lock files, virtual environments, and built container images to identify any runtime component that continues to use wcmatch before 13.0.

Detection

Detection should focus on availability indicators and use of the affected APIs rather than a malicious file or network signature. Relevant signals include:

  • A worker or service consuming one full CPU core during path matching

  • Requests that remain blocked in glob.globmatch, glob.globfilter, glob.compile, or pathlib.PurePath.globmatch

  • Repeated execution timeouts associated with glob operations

  • Increasing latency or queue growth during bursts of path-matching failures

  • Dependencies resolving to wcmatch versions before 13.0

The advisory does not describe a distinct crash artifact, malicious file, or network indicator. Detection coverage will therefore depend on application tracing, dependency inventory, and resource monitoring.

References

·
← News