CVE-2026-32235: Unparsed Url Pattern Matching

Validation of a URL using raw string pattern matching allows bypasses by embedding allowed patterns in the userinfo section of a URL (e.g., `http://allowed-domain@attacker.com`). Parse the URL first using `new URL()` and validate its `host`, `hostname`, or `origin`.

Provally CuratedPublic repositoryMediumMedium confidenceVerifiedApache-2.0TS
greprules fetch cve-2026-32235-unparsed-url-pattern-matching --engine opengrep

Description

Validation of a URL using raw string pattern matching allows bypasses by embedding allowed patterns in the userinfo section of a URL (e.g., `http://allowed-domain@attacker.com`). Parse the URL first using `new URL()` and validate its `host`, `hostname`, or `origin`.