Advisory

GHSA-f4hq-453j-p95f

Also known as: CVE-2021-3189

Summary

Open redirect in Slashify

Details

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. 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.

Severity

Medium Basis: The source's own band: MODERATE

Dates

Published
2021-02-05 20:43 UTC
Modified
2023-11-08 04:05 UTC

Affected packages and fixes

slashify

npm · All systems

Affected

  • introduced 0, last affected 1.0.0 (semver)

Fixed versions

None listed

Fix

No fixed version is listed.

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0

Sources & licences