CVE-2021-3189 – slashify
Package
Manager: npm
Name: slashify
Vulnerable Version: >=0 <=1.0.0
Severity
Level: Medium
CVSS v3.1: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
CVSS v4.0: CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N
EPSS: 0.00289 pctl0.51932
Details
Open redirect in Slashify The package is an Express middleware that normalises routes by stripping any final slash, redirecting, for example, `bookings/latest/` to `bookings/latest`. However, it does not validate the path it redirects to in any way. In particular, if the path starts with two slashes (or two backslashes, or a slash and a backslash, etc.) it may redirect to a different domain. Consider the [example from the docs](https://www.npmjs.com/package/slashify#usage). Assume we have run it and started a server on `localhost:3000`, then visiting `localhost:3000///github.com/` redirects you to https://github.com. ## Recommendation This vulnerability is currently un-patched in the `slashify` package so there is no known safe version of this package. Discontinuing use of `slashify` is recommended.
Metadata
Created: 2021-02-05T20:43:34Z
Modified: 2022-05-26T20:40:57Z
Source: https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2021/02/GHSA-f4hq-453j-p95f/GHSA-f4hq-453j-p95f.json
CWE IDs: ["CWE-601"]
Alternative ID: GHSA-f4hq-453j-p95f
Finding: F156
Auto approve: 1