CVE-2024-31454: Express Req Url Path Confusion

Extracting path identifiers directly from `req.url` using string manipulation methods like `substring` or `slice` can lead to path confusion vulnerabilities. `req.url` includes the query string, meaning appended query parameters will be included in the extracted string. If downstream logic uses `req.path` or otherwise strips the query string, this discrepanc

Provally CuratedPublic repositoryHighMedium confidenceVerifiedApache-2.0JS
greprules fetch cve-2024-31454-express-req-url-path-confusion --engine opengrep

Description

Extracting path identifiers directly from `req.url` using string manipulation methods like `substring` or `slice` can lead to path confusion vulnerabilities. `req.url` includes the query string, meaning appended query parameters will be included in the extracted string. If downstream logic uses `req.path` or otherwise strips the query string, this discrepanc