CVE-2024-31207: Picomatch Matchbase Directory Bypass

Using `picomatch` with `matchBase: true` fails to correctly match glob patterns that contain directory separators due to an upstream issue limit. When used in security controls such as file-denial lists, this causes authorization bypasses. To mitigate, set `matchBase: false`, manually format patterns by prepending `**/` if they lack a slash, and set `dot: tr

Provally CuratedPublic repositoryMediumMedium confidenceVerifiedApache-2.0JS
greprules fetch cve-2024-31207-picomatch-matchbase-directory-bypass --engine opengrep

Description

Using `picomatch` with `matchBase: true` fails to correctly match glob patterns that contain directory separators due to an upstream issue limit. When used in security controls such as file-denial lists, this causes authorization bypasses. To mitigate, set `matchBase: false`, manually format patterns by prepending `**/` if they lack a slash, and set `dot: tr