CVE-2026-132276
wcmatch: Polynomial- time ReDoS when matching untrusted names against multi- star patterns (default flags)
- Severity
- 5.9MediumNetwork attack, no privileges, no user interactionCVSS 3.1, CVE List
- Exploitation
- None reported
- Exploit chance
- 0.88% in 30 daysPercentile60thEPSS, scored
- Listed fix
11.2for wcmatchFrom GitHub Advisories and OSV10 other affected packages
Overview
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.
CVSS 3.1 vector
Exploitability
- Attack vector
- Network
- Complexity
- High
- Privileges needed
- None
- User interaction
- None
Impact
- Scope
- Unchanged
- Confidentiality
- None
- Integrity
- None
- Availability
- High
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:HExploit chance over time
Affected
Packages 11
| Package | Affected | Fixed |
|---|---|---|
wcmatchPyPI | through 11.1 | 11.2 |
| before 11.2, plus listed versions 1.01.0.11.0.210.010.1 Show 45 more versionsShow less10.210.2.111.011.0.111.12.02.0.12.0.22.0.32.12.22.2.13.03.0.13.0.24.04.0.14.14.24.34.3.15.05.0.15.0.25.0.35.16.06.0.16.0.26.0.36.17.07.0.17.17.28.08.0.18.18.1.18.1.28.28.38.48.4.18.5 | 11.2 | |
python-wcmatchDebian:12 | All versions, plus listed versions 10.0-18.4-28.5.1-1 | None listed |
python-wcmatchDebian:13 | All versions, plus listed versions 10.0-1 | None listed |
python-wcmatchDebian:14 | All versions, plus listed versions 10.0-1 | None listed |
datahub-ingestion-lockedDocker Hardened Images:Debian:13 | 1.7.0.19-0 and later, plus listed versions 1.7.0.20-01.7.0.20-11.7.0.20-21.7.0.20-31.7.0.20-4 Show 8 more versionsShow less1.9.0.1-41.9.0.1-51.9.0.1-61.9.0.1-71.9.0.1-81.9.0.2-81.9.0.2-91.9.0.3-9 | None listed |
datahub-ingestionDocker Hardened Images:Debian:13 | 1.5.0.7-0 and later, plus listed versions 1.6.0.1-01.6.0.1-11.6.0.1-21.6.0.1-31.6.0.2-0 Show 34 more versionsShow less1.6.0.2-11.7.0.10-01.7.0.12-01.7.0.13-01.7.0.14-01.7.0.14-11.7.0.14-21.7.0.16-01.7.0.16-11.7.0.17-01.7.0.17-11.7.0.17-21.7.0.17-31.7.0.18-01.7.0.19-01.7.0.19-11.7.0.19-21.7.0.19-31.7.0.19-41.7.0.19-51.7.0.19-61.7.0.20-101.7.0.20-61.7.0.20-71.7.0.20-81.7.0.20-91.9.0.1-101.9.0.1-111.9.0.1-121.9.0.1-131.9.0.1-141.9.0.2-141.9.0.2-151.9.0.3-15 | None listed |
python-wcmatchUbuntu:22.04:LTS | All versions, plus listed versions 8.3-2 | None listed |
python-wcmatchUbuntu:24.04:LTS | All versions, plus listed versions 8.4-28.4-2ubuntu0.1 | None listed |
python-wcmatchUbuntu:26.10 | All versions, plus listed versions 10.0-1 | None listed |
python-wcmatchUbuntu:26.04:LTS | All versions, plus listed versions 10.0-1 | None listed |
python-wcmatchopenSUSE:Tumbleweed | before 12.0.4-1.1 | 12.0.4-1.1 |
The JSON record also has 3 more versions.
Products 1
Exploits
Sources link exploit code, tools that only detect the flaw and other work on it, and most don’t say which a link is.
| Link | Source | Date |
|---|---|---|
| googlesky/CVE-2026-132276 | PoC in GitHub | 2026-11-21 |
Sources
CVE List Score usedCVSS 3.15.9
wcmatch: Polynomial-time ReDoS when matching untrusted names against multi-star patterns (default flags)
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.
- Record
CVE-2026-132276- CVSS 3.1
- 5.9 Medium
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H - Weakness
- CWE-1333
- Updated
- 2026-11-20
EUVDEUVD-2026-131679CVSS 3.15.9
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.
- Record
EUVD-2026-131679- CVSS 3.1
- 5.9 Medium
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H - Updated
- 2026-11-20
GitHub AdvisoriesGHSA-53pm-wgxf-c6qfCVSS 3.15.9
wcmatch: Polynomial-time ReDoS when matching untrusted names against multi-star patterns (default flags)
Summary
With default flags, a pattern that contains several * wildcards takes polynomial time, O(n^k) for k stars, to reject a crafted file name. The pattern is an ordinary developer constant such as *_*_*_*_*.csv; only the string being matched comes from the attacker. A 255-byte file name (the maximum on common filesystems) takes 73 s with fnmatch.fnmatch() and 86 s with glob.globmatch(). The standard library's fnmatch handles the same input in under a millisecond.
This is different from GHSA-84v8-qmgq-9g88: that advisory covers extglob patterns, while this case needs no flags and no attacker-controlled pattern.
Details
Every * is translated to a lazy .*? (_STAR, wcmatch/_wcparse.py:212; _PATH_STAR [^/]*?, :218), which is emitted in _handle_star (:1405-1424):
*_*_*_*_*.csv -> ^(?s:(?=.)(?![.]).*?_.*?_.*?_.*?_.*?\.csv)$
When the subject consists of many _ and does not end in .csv, the regex engine tries every way of splitting it between the stars. CPython fixed the same problem in its own fnmatch (bpo-40480) by making every star segment except the last one atomic.
PoC
import time, fnmatch as std
from wcmatch import fnmatch, glob
for pat, n in [('*_*_*_*.csv', 255), ('*_*_*_*.csv', 400), ('*_*_*_*_*.csv', 150),
('*_*_*_*_*.csv', 200), ('*_*_*_*_*.csv', 255)]:
name = '_' * n
t = time.perf_counter(); fnmatch.fnmatch(name, pat); w = time.perf_counter() - t
t = time.perf_counter(); std.fnmatchcase(name, pat); s = time.perf_counter() - t
print(f'{pat:15} len={n} wcmatch={w:.3f}s stdlib={s:.5f}s')
t = time.perf_counter(); glob.globmatch('uploads/' + '_' * 255, 'uploads/*_*_*_*_*.csv')
print(f'globmatch {time.perf_counter() - t:.2f}s')
wcmatch 11.1, CPython 3.13, macOS:
*_*_*_*.csv len=255 wcmatch=1.412s stdlib=0.00001s
*_*_*_*.csv len=400 wcmatch=8.599s stdlib=0.00004s
*_*_*_*_*.csv len=150 wcmatch=5.333s stdlib=0.00003s
*_*_*_*_*.csv len=200 wcmatch=22.415s stdlib=0.00007s
*_*_*_*_*.csv len=255 wcmatch=72.732s stdlib=0.00047s
globmatch 85.75s
glob.glob('*_*_*_*.csv', root_dir=d) on a real directory that contains one file named '_' * 255 takes 1.7 s.
Impact
Applications that match untrusted names against multi-star patterns can be blocked on a single CPU core for minutes per name. Examples: upload handlers, archive or object-store key filters, and glob/WcMatch scans of directories where other users can create files. No authentication is needed.
Fix
Emit every star segment except the last one as an atomic group, as the standard library does. On Python 3.11 and later use (?>.*?_); on 3.10 use the lookahead/backreference form from fnmatch._join_translated_parts. For example:
^(?s:(?=.)(?![.])(?>.*?_)(?>.*?_)(?>.*?_)(?>.*?_).*?\.csv)$
This rejects the 255-byte name in under 1 ms. On my spot-check inputs it gives the same results as the current regex. The same change applies to _PATH_STAR.
- Record
GHSA-53pm-wgxf-c6qf- CVSS 3.1
- 5.9 Medium
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H - Weakness
- CWE-1333
- Updated
- 2026-11-21
NVDCVSS 3.15.9
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.
- Record
CVE-2026-132276- CVSS 3.1
- 5.9 Medium
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H - Weakness
- CWE-1333
- Updated
- 2026-11-20
OSVCVSS 3.15.9
wcmatch: Polynomial-time ReDoS when matching untrusted names against multi-star patterns (default flags)
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.
- Record
CVE-2026-132276- CVSS 3.1
- 5.9 Medium
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H - Weakness
- CWE-1333
- Updated
- 2026-11-21
OSVDEBIAN-CVE-2026-132276CVSS 3.15.9
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.
- Record
DEBIAN-CVE-2026-132276- CVSS 3.1
- 5.9 Medium
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H - Updated
- 2026-11-24
Show 4 more recordsShow less
OSVDHI-ecd4-4ixx-7rqu-2ha2CVSS 3.15.9
wcmatch is a Python library for wildcard file-name matching. Prior to 11.2, under the default flags, matching a…
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.
- Record
DHI-ecd4-4ixx-7rqu-2ha2- CVSS 3.1
- 5.9 Medium
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H - Updated
- 2026-12-04
OSVGHSA-53pm-wgxf-c6qfCVSS 3.15.9
wcmatch: Polynomial-time ReDoS when matching untrusted names against multi-star patterns (default flags)
Summary
With default flags, a pattern that contains several * wildcards takes polynomial time, O(n^k) for k stars, to reject a crafted file name. The pattern is an ordinary developer constant such as *_*_*_*_*.csv; only the string being matched comes from the attacker. A 255-byte file name (the maximum on common filesystems) takes 73 s with fnmatch.fnmatch() and 86 s with glob.globmatch(). The standard library's fnmatch handles the same input in under a millisecond.
This is different from GHSA-84v8-qmgq-9g88: that advisory covers extglob patterns, while this case needs no flags and no attacker-controlled pattern.
Details
Every * is translated to a lazy .*? (_STAR, wcmatch/_wcparse.py:212; _PATH_STAR [^/]*?, :218), which is emitted in _handle_star (:1405-1424):
*_*_*_*_*.csv -> ^(?s:(?=.)(?![.]).*?_.*?_.*?_.*?_.*?\.csv)$
When the subject consists of many _ and does not end in .csv, the regex engine tries every way of splitting it between the stars. CPython fixed the same problem in its own fnmatch (bpo-40480) by making every star segment except the last one atomic.
PoC
import time, fnmatch as std
from wcmatch import fnmatch, glob
for pat, n in [('*_*_*_*.csv', 255), ('*_*_*_*.csv', 400), ('*_*_*_*_*.csv', 150),
('*_*_*_*_*.csv', 200), ('*_*_*_*_*.csv', 255)]:
name = '_' * n
t = time.perf_counter(); fnmatch.fnmatch(name, pat); w = time.perf_counter() - t
t = time.perf_counter(); std.fnmatchcase(name, pat); s = time.perf_counter() - t
print(f'{pat:15} len={n} wcmatch={w:.3f}s stdlib={s:.5f}s')
t = time.perf_counter(); glob.globmatch('uploads/' + '_' * 255, 'uploads/*_*_*_*_*.csv')
print(f'globmatch {time.perf_counter() - t:.2f}s')
wcmatch 11.1, CPython 3.13, macOS:
*_*_*_*.csv len=255 wcmatch=1.412s stdlib=0.00001s
*_*_*_*.csv len=400 wcmatch=8.599s stdlib=0.00004s
*_*_*_*_*.csv len=150 wcmatch=5.333s stdlib=0.00003s
*_*_*_*_*.csv len=200 wcmatch=22.415s stdlib=0.00007s
*_*_*_*_*.csv len=255 wcmatch=72.732s stdlib=0.00047s
globmatch 85.75s
glob.glob('*_*_*_*.csv', root_dir=d) on a real directory that contains one file named '_' * 255 takes 1.7 s.
Impact
Applications that match untrusted names against multi-star patterns can be blocked on a single CPU core for minutes per name. Examples: upload handlers, archive or object-store key filters, and glob/WcMatch scans of directories where other users can create files. No authentication is needed.
Fix
Emit every star segment except the last one as an atomic group, as the standard library does. On Python 3.11 and later use (?>.*?_); on 3.10 use the lookahead/backreference form from fnmatch._join_translated_parts. For example:
^(?s:(?=.)(?![.])(?>.*?_)(?>.*?_)(?>.*?_)(?>.*?_).*?\.csv)$
This rejects the 255-byte name in under 1 ms. On my spot-check inputs it gives the same results as the current regex. The same change applies to _PATH_STAR.
- Record
GHSA-53pm-wgxf-c6qf- CVSS 3.1
- 5.9 Medium
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H - Weakness
- CWE-1333
- Updated
- 2026-11-21
OSVUBUNTU-CVE-2026-132276CVSS 3.15.9
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.
- Record
UBUNTU-CVE-2026-132276- CVSS 3.1
- 5.9 Medium
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H - Updated
- 2026-12-02
OSVopenSUSE-SU-2026:12719-1No score
python313-wcmatch-12.0.4-1.1 on GA media
These are all security issues fixed in the python313-wcmatch-12.0.4-1.1 package on the GA media of openSUSE Tumbleweed.
- Record
openSUSE-SU-2026:12719-1- Updated
- 2026-11-28
History
Recorded by Every CVE
| Day | Changed | Sources |
|---|---|---|
| Affected packages | OSV | |
| Affected packages | OSV | |
| Affected packages, other IDs, references | OSV | |
| Affected packages | OSV | |
| Affected packages | OSV | |
| Affected packages | OSV | |
| Affected packages | OSV | |
| Affected packages | OSV | |
| Affected packages | OSV | |
| Affected packages | OSV | |
| Affected packages, other IDs, references | OSV | |
| Affected packages, other IDs, references | OSV | |
| Affected packages | OSV | |
| Affected packages | OSV | |
| Exploit links, key facts | PoC in GitHub | |
| Affected packages, other IDs, references | OSV | |
| Affected packages, references | OSV | |
| Affected packages, key facts, references | GitHub Advisories | |
| References | CVE List, NVD | |
| Other IDs, published date | EUVD | |
| Other IDs, references | OSV | |
| First indexed | CVE List |
Upstream dates may differ.
References
github.com/facelessuser/wcmatch/security/advisories/GHSA-53pm-wgxf-c6qf
github.com/facelessuser/wcmatch/commit/83491aadde57780330f993620083e979f645c80c
github.com/facelessuser/wcmatch/releases/tag/11.2
nvd.nist.gov/vuln/detail/CVE-2026-132276
github.com/advisories/GHSA-53pm-wgxf-c6qf
github.com/CVEProject/cvelistV5/tree/main/cves/2026/132xxx/CVE-2026-132276.json
security-tracker.debian.org/tracker/CVE-2026-132276
scout.docker.com/v/DHI-ecd4-4ixx-7rqu-2ha2