Vulnerabilities |
4 via 6 paths |
|---|---|
Dependencies |
25 |
Source |
GitHub |
Find, fix and prevent vulnerabilities in your code.
high severity
- Vulnerable module: deepmerge-ts
- Introduced through: deepmerge-ts@7.1.6
Detailed paths
-
Introduced through: git-command-helper@dimaslanjaka/git-command-helper › deepmerge-ts@7.1.6Remediation: Upgrade to deepmerge-ts@8.0.0.
Overview
deepmerge-ts is a Deeply merge 2 or more objects respecting type information.
Affected versions of this package are vulnerable to Uncontrolled Recursion via the deepmerge and deepmergeInto functions. An attacker can cause a process crash or denial of service by supplying crafted recursive object graphs that trigger unbounded recursion and stack exhaustion.
Remediation
Upgrade deepmerge-ts to version 8.0.0 or higher.
References
medium severity
- Vulnerable module: minimatch
- Introduced through: minimatch@10.2.6 and glob@13.0.7
Detailed paths
-
Introduced through: git-command-helper@dimaslanjaka/git-command-helper › minimatch@10.2.6Remediation: Upgrade to minimatch@11.0.1.
-
Introduced through: git-command-helper@dimaslanjaka/git-command-helper › glob@13.0.7 › minimatch@10.2.6Remediation: Upgrade to glob@14.0.0.
Overview
minimatch is a minimal matching utility.
Affected versions of this package are vulnerable to Asymmetric Resource Consumption (Amplification) in the firstPhasePreProcess method, where the **/.. transform clones a globParts entry and pushes the clone back onto the same array inside a do...while (didSomething) fixpoint loop. An attacker can exhaust CPU and memory by supplying a glob pattern whose **/.. sequences regenerate entries during preprocessing, which secondPhasePreProcess then compares in an O(n^2) pairwise partsMatch pass over the expanded set. Exploitation requires the pattern to be parsed with optimizationLevel set to 2 or higher.
Remediation
Upgrade minimatch to version 11.0.1 or higher.
References
medium severity
new
- Vulnerable module: glob
- Introduced through: glob@13.0.7
Detailed paths
-
Introduced through: git-command-helper@dimaslanjaka/git-command-helper › glob@13.0.7Remediation: Upgrade to glob@14.0.6.
Overview
Affected versions of this package are vulnerable to Allocation of Resources Without Limits or Throttling in src/ignore.ts, the Ignore class constructs its own minimatch options without including a braceExpandMax limit, causing ignore patterns to fall back to minimatch's default of 100,000 instead of the 10,000 cap applied to regular patterns. Both code paths force optimizationLevel: 2, which is the precondition for minimatch's O(n²) globparts amplification in secondPhasePreProcess(). An attacker who can supply ignore patterns can pass a brace-expansion payload that is rejected in milliseconds as a regular pattern but consumes several seconds of CPU when processed as an ignore pattern, blocking the Node.js event loop.
PoC
import { Volume, createFsFromVolume } from 'memfs'
import { glob } from 'glob'
const vol = new Volume()
const fs = createFsFromVolume(vol)
vol.fromJSON({ '/p/f.txt': 'x' })
// 14 '**/..' groups -> 2^14 = 16384 rows, over the 10_000 limit
const payload = Array.from({ length: 14 })
.map((_, i) => `**/../x${i}/y${i}`)
.join('/')
glob.sync(payload, { cwd: '/p', fs, platform: 'posix' })
// throws: optimizationLevel 2: too many patterns from '**/..' (rejected fast)
glob.sync('*', { cwd: '/p', fs, ignore: [payload], platform: 'posix' })
// accepted, ~1.5-2.0 s of CPU
Measured on the published glob@14.0.4:
payload: 175 bytes
as PATTERN : 6 ms REJECTED (optimizationLevel 2: too many patterns from '**/..)
as IGNORE : 1985 ms accepted
Note: The PoC uses memfs for an in-memory filesystem and targets the published glob@14.0.4 on a posix platform.
Remediation
Upgrade glob to version 14.0.6 or higher.
References
medium severity
new
- Vulnerable module: minimatch
- Introduced through: minimatch@10.2.6 and glob@13.0.7
Detailed paths
-
Introduced through: git-command-helper@dimaslanjaka/git-command-helper › minimatch@10.2.6Remediation: Upgrade to minimatch@11.0.8.
-
Introduced through: git-command-helper@dimaslanjaka/git-command-helper › glob@13.0.7 › minimatch@10.2.6Remediation: Upgrade to glob@14.0.0.
Overview
minimatch is a minimal matching utility.
Affected versions of this package are vulnerable to Improper Encoding or Escaping of Output via minimatch.escape() in src/escape.ts, which fails to neutralize four classes of special input before the result is used as a glob pattern. A leading ! passes through unescaped and becomes a negation operator, causing the pattern to match every path except the intended literal. A leading # passes through and becomes a comment, causing the pattern to match nothing. When the escaped output is combined with a brace group (either caller-supplied or present in the user text itself), brace-expansion collapses the \\ escape sequence and reactivates the following magic character (such as *), widening the match. With { windowsPathsNoEscape: true, magicalBraces: true }, brace-literal encoding using character classes ([{]) is misinterpreted by brace-expansion, producing patterns that match unintended strings and fail to match the intended literal. Applications that pass attacker-controlled text through escape() and use the result for authorization, filtering, or path-selection decisions may grant or deny access to unintended paths.
Workaround
Until upgrading, the following per-behavior mitigations can be applied (each measured on 11.0.5):
- Behaviors 1 and 2 (leading
!and#): pass{ nonegate: true, nocomment: true }when matching escaped patterns. - Behavior 3 (escaped backslash plus brace group): do not combine escaped text with a brace group, and use
{ magicalBraces: true }so user braces are escaped. Alternatively, passnobrace: trueto stop the over-match, but note that the caller's brace group then also becomes literal. - Behavior 4 (
windowsPathsNoEscape+magicalBraces): passnobrace: truewhen matching.
Remediation
Upgrade minimatch to version 11.0.8 or higher.