CVE-2021-23387Open Redirect
- 5.4MediumCVSS base score
- 1.1%Exploitation in 30 daysEPSS · top 33% of all CVEs
- NoKnown exploitednot in CISA's KEV catalog
- NonePublic exploitsnone known yet
Description
The package trailing-slash before 2.0.1 are vulnerable to Open Redirect via the use of trailing double slashes in the URL when accessing the vulnerable endpoint (such as https://example.com//attacker.example/). The vulnerable code is in index.js::createTrailing(), as the web server uses relative URLs instead of absolute URLs.
Timeline
ID reserved
By snyk
- 5 months later
· 5 months later
Published
- 3 years later
· 3 years later
Record updated
Changes after publication (a new score, a public exploit, EPSS crossing 1, 10 or 50 %, leaving KEV) are kept since November 2026; earlier ones are not known.
Scores
| Scored by | CVSS | Score | Vector |
|---|---|---|---|
| snykCNA (assigner) | 3.1 | Medium5.4 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N/E:P/RL:O/RC:C |
| NVDNVD · Modified | 3.1 | Medium6.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N |
- EPSS (exploitation in 30 days)
- 1.1% · top 33% of all CVEs (17 Nov 2026)
The list uses the assigner's score when there is one, then CISA's, then NVD's: Medium 5.4.
Affected products
trailing-slash
- affected unspecified – < 2.0.1
Affected packages
From reviewed advisories of the GitHub Advisory Database.
- npmtrailing-slashGHSA-rfhr-62xp-2fp2 (opens in a new tab)
References
References3
- https://snyk.io/vuln/SNYK-JS-TRAILINGSLASH-1085707 (opens in a new tab)x_refsource_MISCx_transferred
- https://github.com/fardog/trailing-slash/blob/f640ece055fe85275c983de5eb94661b95e35670/index.js%23L36 (opens in a new tab)x_refsource_MISCx_transferred
- https://github.com/fardog/trailing-slash/commit/f8e66f1429308247e5a119d430203077d8f05048 (opens in a new tab)x_refsource_MISCx_transferred
Sources
The same CVE in the primary databases and aggregators, to check against.
- CVE.org record (opens in a new tab)
- CVE List JSON (GitHub) (opens in a new tab)
- NVD (opens in a new tab)
- FIRST EPSS (opens in a new tab)
- EUVD EUVD-2021-1397 (opens in a new tab)
- OSV.dev (opens in a new tab)
- GitHub Advisory GHSA-rfhr-62xp-2fp2 (opens in a new tab)
- CIRCL Vulnerability-Lookup (opens in a new tab)
Badge for a README or a ticket
[](https://cveledger.app/cve/CVE-2021-23387)Record last updated .