# CVE-2021-23387: Open Redirect

- Severity: Medium 5.4 (CVSS:3.1, scored by snyk) `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`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 1.15%, higher than 67% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2021-05-24T18:16:34.116Z
- Modified: 2026-07-08T06:49:36.985Z
- Also known as: GHSA-rfhr-62xp-2fp2, SNYK-JS-TRAILINGSLASH-1085707
- Weaknesses: CWE-601
- Assigned by: snyk

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

(As written by CVE List.)

## Affected

- trailing-slash: from unspecified before 2.0.1
- trailing-slash (npm): before 2.0.1
- trailing-slash_project trailing-slash: before 2.0.1

## Every score

- snyk: CVSS:3.1 5.4 Medium `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`
- GitHub: CVSS:3.1 5.4 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N`
- NVD: CVSS:3.1 6.1 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N`
- NVD: CVSS:2.0 5.8 Medium `AV:N/AC:M/Au:N/C:P/I:P/A:N`

## References

- <https://snyk.io/vuln/SNYK-JS-TRAILINGSLASH-1085707> (exploit, patch, third-party-advisory, web)
- <https://github.com/fardog/trailing-slash/blob/f640ece055fe85275c983de5eb94661b95e35670/index.js%23L36> (broken-link, web)
- <https://github.com/fardog/trailing-slash/commit/f8e66f1429308247e5a119d430203077d8f05048> (patch, third-party-advisory, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2021-23387> (advisory)

## Sources

- CVE List: [CVE-2021-23387](https://www.cve.org/CVERecord?id=CVE-2021-23387), CVE Terms of Use, modified 2024-09-17
- GitHub Advisory Database: [GHSA-rfhr-62xp-2fp2](https://github.com/advisories/GHSA-rfhr-62xp-2fp2), CC-BY-4.0, modified 2026-07-08
- NVD: [CVE-2021-23387](https://nvd.nist.gov/vuln/detail/CVE-2021-23387), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2021-23387 · Whole record: https://cve.day/CVE-2021-23387.json · Rebuilt by cve.day 2026-11-25T22:58:01.514Z
