You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit e4c6ee8
Browse filesBrowse the repository at this point in the historyBrowse files
authored
fix(agents): prevent ReDoS in MCP glob-to-regex wildcard matching (#100330)
* fix(agents): prevent ReDoS in MCP glob-to-regex wildcard matching
Collapse consecutive '*' wildcards into a single '*' before building
the regex in globMatches(). Without this, a glob like '**********-x'
tested against a non-matching string causes catastrophic backtracking
(238s for a single call with 10 stars vs 0.4ms after fix).
Affected functions:
- src/agents/agent-bundle-mcp-runtime.ts: globMatches (MCP tool name filter)
- src/agents/agent-bundle-mcp-materialize.ts: globMatches (MCP operation filter)
Co-Authored-By: Claude <[email protected]>
* fix(agents): make MCP filter matching linear
* style(mcp): satisfy filter lint
---------
Co-authored-by: Claude <[email protected]>
Co-authored-by: Peter Steinberger <[email protected]>
0 commit comments