Repository navigation
⬆️ Updates wcmatch to v11 [SECURITY] - #3587
Open
renovate[bot] wants to merge 1 commit into
Open
renovate[bot] wants to merge 1 commit into
renovate[bot] wants to merge 1 commit into
Conversation
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
|
Dependency limit exceeded — report not shown. This pull request scan exceeded the 10,000-dependency limit applied to this scan, so the results are incomplete and may be inaccurate. To avoid reporting false positives, Socket has not posted a report. Upgrade your plan to raise the dependency limit and get complete reports, or view the partial scan in the dashboard. Socket is always free for open source. If this is a public open source project under an OSI-approved license, contact us to request a free Business plan upgrade. |
Contributor
There was a problem hiding this comment.
Scan Summary
| Tool | Critical | High | Medium | Low | Status |
|---|---|---|---|---|---|
| Dependency Scan (universal) | 2 | 15 | 13 | 3 | ❌ |
| Shell Script Analysis | 0 | 0 | 0 | 195 | ✅ |
| Security Audit for Infrastructure | 14 | 92 | 8 | 32 | ❌ |
| Kotlin Static Analysis | 0 | 0 | 0 | 0 | ✅ |
| Python Source Analyzer | 0 | 0 | 0 | 0 | ✅ |
| Kotlin Security Audit | 0 | 0 | 0 | 0 | ✅ |
| Secrets Audit | 0 | 4 | 0 | 0 | ❌ |
Recommendation
Please review the findings from Code scanning alerts before approving this pull request. You can also configure the build rules or add suppressions to customize this bot 👍
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
==8.3→==11.2Warning
Some dependencies could not be looked up. Check the Dependency Dashboard for more information.
wcmatch: Polynomial-time ReDoS when matching untrusted names against multi-star patterns (default flags)
CVE-2026-132276 / GHSA-53pm-wgxf-c6qf
More information
Details
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 withfnmatch.fnmatch()and 86 s withglob.globmatch(). The standard library'sfnmatchhandles 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):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 ownfnmatch(bpo-40480) by making every star segment except the last one atomic.PoC
wcmatch 11.1, CPython 3.13, macOS:
glob.glob('*_*_*_*.csv', root_dir=d)on a real directory that contains one file named'_' * 255takes 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/WcMatchscans 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 fromfnmatch._join_translated_parts. For example: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.Severity
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:HReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
Release Notes
facelessuser/wcmatch (wcmatch)
v11.2Compare Source
11.2
bracex3.2 for various bug fixes.numpyarrays (@Lushiyao5).
*are used for file name matching. Performance is only improved incases where variable length
EXTGLOBpatterns would not interfere with matching. Issue found by (@gistrec).globandiglob, and preserveunlimited expansion across multiple patterns with negative limits.
WcMatchinstead of 32.finite limits when exclusions consume the entire pattern budget.
EXTGLOB/EXTMATCHinverse group,!(...), is followedby an extended group that contains another extended group, e.g.
!(a)@(b|*(c)).EXTGLOB/EXTMATCHstar group,*(...), being matched as literal text when it directly followsanother
*, e.g.a**(b).globandiglobreturning the same path twice when two patterns find it and case is ignored, e.g.['A*', '*b']withIGNORECASEand a file namedAb. Files that only differ by case are no longer treated asduplicates when the file system is case sensitive.
.or...such as
?(a)*, and avoid returning.and..from these directory scans.rglobtreating a pattern that starts with**or***as if it started with*, e.g.**/a.txtwith
GLOBSTARmisseda.txtin the searched folder and returneda.txtfrom inside a symlinked folder.v11.1Compare Source
11.1
WindowsPathsubclass construction on Python 3.12+ (#238).GLOBSTARcaptures (#239).v11.0.1Compare Source
11.0.1
expected from Wildcard Match in regards to security, and provide general information to allow users to make good
decisions.
EXTGLOB/EXTMATCHwas enabled.v11.0Compare Source
11.0
EXTGLOB/EXTMATCHregular expression patterns when possible to reduce deeplynested patterns.
<0-9>) via newNUMRANGEflag.EXTGLOB/EXTMATCHwas enabled. Due to the new feature added that reduces extended glob group nesting, groups nolonger appear exactly as specified. Moving forward, capturing groups are not included by default. If you need the
old behavior, it can be enabled in a
translate()call via theCAPTUREflag. This flag will cause extended globreduction to be turned off and for capturing groups to be enabled.
EXTGLOB/EXTMATCHparsing once an unclosed extended glob pattern is encountered.SPLITnot accounting for POSIX character class.v10.2.1Compare Source
10.2.1
bracex3.0.v10.2Compare Source
10.2
bracex3.0 for bug fixes.v10.1Compare Source
10.1
wcmatch.glob.compile(pattern)andwcmatch.fnmatch.compile(pattern)to allow for precompiled matcherobjects that can be reused.
v10.0Compare Source
10.0
GLOBSTARLONGwhich adds support for the Zsh style***which acts like**withGLOBSTARbutbut traverses symlinks.
pathlib.matchwill respect symlink rules (when theREALPATHflag is given). Hidden file rules willbe respected at all times. Enable
DOTALLto match hidden files.GLOBSTARis enabled unlessFOLLOWis also enabled, but theyshould still be matched. Prior to this change, symlinks were not traversed and they were ignored from matching
which contradicts how Bash works and could be confusing to users.
globmatchand symlink handling whenREALPATHis enabled.v9.0Compare Source
9.0
glob.raw_escape.v8.5.2Compare Source
8.5.2
pathlibissue with inheritance on Python versions greater than 3.12.EXTMATCHcase with!(...)patterns.v8.5.1Compare Source
8.5.1
wcmatch.glob.v8.5Compare Source
8.5
pathlibchanges).globpattern list.v8.4.1Compare Source
8.4.1
v8.4Compare Source
8.4
excludeoption tofnmatch,pathlib, andglobmethods that allows exclusion patterns to bespecified directly without needing to enable
NEGATEand prepend patterns with!.excludeaccepts a separatepattern or pattern list.
excludeshould not be used in conjunction withNEGATE. One or the other should be used.Configuration
📅 Schedule: (in timezone Europe/Moscow)
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.