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 Improper Neutralization in src/ignore.ts, when composing an absolute ignore pattern, the resolved root/cwd path is pasted into a glob string and re-parsed by minimatch. The path is escaped with minimatch's escape(), but that function only escapes { and } when the magicalBraces option is enabled, which glob does not pass. A root or cwd path containing brace expressions (e.g. /root{7,8}) is therefore brace-expanded during re-parsing, causing the resulting ignore pattern to match non-existent paths instead of the real path. The exclusion is silently dropped and the excluded file is returned to the caller.
Note: This is only exploitable when the root or cwd path contains brace characters, which is reachable when those paths are derived from externally supplied data such as tenant IDs, project names, or archive extraction paths.
import { Volume, createFsFromVolume } from 'memfs'
import { glob } from 'glob'
const vol = new Volume()
const fs = createFsFromVolume(vol)
vol.fromJSON({
'/root{7,8}/keep.txt': 'x',
'/root{7,8}/skip.log': 'x',
})
const res = await glob('*', {
cwd: '/root{7,8}',
root: '/root{7,8}',
fs,
ignore: ['/skip.log'],
platform: 'posix',
})
console.log(res) // [ 'keep.txt', 'skip.log' ] <-- skip.log should be ignored
Control with a plain root path:
vol.fromJSON({ '/root/keep.txt': 'x', '/root/skip.log': 'x' })
await glob('*', {
cwd: '/root', root: '/root', fs, ignore: ['/skip.log'], platform: 'posix',
})
// [ 'keep.txt' ] <-- ignore correctly enforced