CVE-2021-3189:
Open redirect in Slashify
6.1
CVSS ScoreBasic Information
CVE ID
GHSA ID
EPSS Score
-
CWE
Published
2/5/2021
Updated
2/1/2023
KEV Status
No
Technology
JavaScript
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
slashify | npm | <= 1.0.0 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems from the core middleware functionality in index.js that handles URL normalization. The package's purpose is to strip trailing slashes but fails to validate the resulting path after modification. When given paths like '///github.com/', it removes the trailing slash but leaves '//github.com' which browsers interpret as a protocol-relative URL. The main exported middleware function directly handles this path manipulation and redirection logic without any validation checks for absolute URLs or domain boundaries, making it clearly vulnerable to open redirects.