fix(security): enforce minimatch >=10.2.6 to mitigate ReDoS - #349
fix(security): enforce minimatch >=10.2.6 to mitigate ReDoS#349KiranHK-code wants to merge 1 commit into
Conversation
|
@KiranHK-code is attempting to deploy a commit to the vallabhatech's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
Warning Review limit reached
Next review available in: 12 minutes You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (1)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|



Security: Prevent ReDoS in minimatch GLOBSTAR Matching
Description
This PR addresses a Regular Expression Denial of Service (ReDoS) vulnerability in
minimatchcaused by combinatorial backtracking in thematchOne()function when processing patterns containing multiple non-adjacentGLOBSTAR(**) segments.An attacker can provide a specially crafted glob pattern and input string that causes the matcher to explore a large number of possible matching combinations, resulting in excessive CPU consumption and potentially making the application unresponsive.
Issue
The vulnerable behavior occurs when multiple non-adjacent
GLOBSTARsegments are present in a pattern. During matching,matchOne()can recursively explore many possible paths through the input, leading to exponential time complexity.Steps to Reproduce
GLOBSTARsegments (**).minimatch.Expected Behavior
minimatchshould:GLOBSTARmatching.Changes
This PR:
matchOne()against combinatorial GLOBSTAR backtracking.GLOBSTARsegments.Testing
Regression tests cover:
GLOBSTARsegments.GLOBSTARmatching behavior.Security Impact
An attacker able to influence glob patterns or matching inputs could potentially trigger excessive CPU consumption, resulting in a Regular Expression Denial of Service (ReDoS) or denial-of-service condition.
This change ensures pathological
GLOBSTARpatterns are handled within predictable resource limits while preserving expected matching behavior for valid inputs.fixes #79