CVE-2021-3189: Open redirect in Slashify

slashify Updated 02 Oct 2025

Summary

05/02/2021
No i
Moderate
6.1

CVE-2021-3189: Open redirect in Slashify. Affects slashify versions < 1.0.0. No fix is published. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored MarkAI Find prospects already talking about the problem you solve AI watches the communities your customers use to find qualified prospects, then alerts you when a conversation is worth joining. See MarkAI

Background

Slashify is an Express middleware package that normalizes routes by removing any trailing slashes. It is commonly used in Node.js applications to ensure consistent URL patterns. However, the package is vulnerable to an open redirect issue, which can lead to unauthorized redirects to different domains. This vulnerability affects versions 0.0.0 to 1.0.0 of the slashify package.

Vulnerability Detail

The open redirect vulnerability in slashify arises from the package's failure to validate the path it redirects to. When a path starts with two slashes or a combination of slashes and backslashes, it may redirect the user to a different domain. For example, visiting localhost:3000///github.com/ while running a server with slashify middleware will redirect the user to https://github.com. This can be exploited by an attacker to trick users into visiting malicious websites or phishing pages.

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Workaround

As there is no known safe version of slashify, there is no direct workaround for this vulnerability. However, developers can mitigate the risk by manually validating and sanitizing the paths before performing any redirects. This can be achieved by implementing custom middleware or using other well-maintained middleware packages that do not suffer from this vulnerability.

Conclusion

The open redirect vulnerability in slashify can lead to unauthorized redirects to different domains, potentially exposing users to phishing attacks or other malicious activities. Discontinuing the use of slashify and finding alternative middleware packages is recommended to mitigate this vulnerability. For further support on vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for slashify →

Share this vulnerability

FAQ

Slashify is an Express middleware package used to normalize routes by removing trailing slashes.

An open redirect vulnerability allows an attacker to redirect users to a different domain or URL, potentially leading to phishing attacks or other malicious activities.

By crafting a URL with multiple slashes at the beginning, an attacker can trick the slashify middleware into redirecting the user to a different domain.

Currently, there is no known safe version of the slashify package that addresses this vulnerability. Discontinuing the use of slashify is recommended.

Yes, developers can consider using other well-maintained middleware packages that provide similar functionality without the open redirect vulnerability.

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback