CVE-2026-46508: Insecure Glob Traversal Validation

Validation of path traversal using `.starts_with("../")` on a glob string is insufficient because inline traversals (e.g., `src/../../file`) bypass it. Combined with silently dropping parsing errors (`if let Ok(...)`), an attacker can cause checks to be bypassed by providing malformed or inline-traversed globs. Ensure robust path validation (e.g., `.contains

Provally CuratedPublic repositoryHighMedium confidenceVerifiedApache-2.0Rust
greprules fetch cve-2026-46508-insecure-glob-traversal-validation --engine opengrep

Description

Validation of path traversal using `.starts_with("../")` on a glob string is insufficient because inline traversals (e.g., `src/../../file`) bypass it. Combined with silently dropping parsing errors (`if let Ok(...)`), an attacker can cause checks to be bypassed by providing malformed or inline-traversed globs. Ensure robust path validation (e.g., `.contains