5.4medium
Open Redirect
- Severity
- 5.4medium CVSS:3.1 by snyk
- Exploit likelihood
- 1.15% (higher than 67% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- snyk
- Also known as
- GHSA-rfhr-62xp-2fp2SNYK-JS-TRAILINGSLASH-1085707
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.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| trailing-slash | from unspecified before 2.0.1 | CVE List |
| trailing-slash (npm) | before 2.0.1 | GitHub Advisory Database |
| trailing-slash_project trailing-slash | before 2.0.1 | NVD |
All scores
| snyk | 5.4medium CVSS:3.1 | 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 | 5.4medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N |
| NVD | 6.1medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N |
| NVD | 5.8medium CVSS:2.0 | AV:N/AC:M/Au:N/C:P/I:P/A:N |
Classification
What each source says
CVE List
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.
NVD (es)
El paquete trailing-slash versiones anteriores a 2.0.1, es vulnerable a Open Redirect por medio del uso de barra diagonal dobles en la URL cuando se accede al extremo vulnerable (como https://example.com//attacker.example/). El código vulnerable está en la función index.js::createTrailing(), ya que el servidor web usa URL relativas en lugar de URL absolutas
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
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2021-23387 changed 2024-09-17 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-rfhr-62xp-2fp2 changed 2026-07-08 | CC-BY-4.0 |
| NVD | CVE-2021-23387 changed 2026-06-17 | Public domain |