CVE-2026-26187: Path Traversal Prefix Bypass

Using `strings.HasPrefix` to verify that a path resides within a directory can lead to partial-path traversal bypasses. If the directory path does not reliably end with a path separator, an attacker can access sibling directories with similar names (e.g., matching '/path/to/lakefs_evil' when the base is '/path/to/lakefs'). Enforce a trailing path separator w

Provally CuratedPublic repositoryHighMedium confidenceVerifiedApache-2.0Go
greprules fetch cve-2026-26187-path-traversal-prefix-bypass --engine opengrep

Description

Using `strings.HasPrefix` to verify that a path resides within a directory can lead to partial-path traversal bypasses. If the directory path does not reliably end with a path separator, an attacker can access sibling directories with similar names (e.g., matching '/path/to/lakefs_evil' when the base is '/path/to/lakefs'). Enforce a trailing path separator w