{"id":"CVE-2021-23387","aliases":["CVE-2021-23387","GHSA-rfhr-62xp-2fp2","SNYK-JS-TRAILINGSLASH-1085707"],"related":[],"kind":"vulnerability","state":"published","title":"Open Redirect","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"es","text":"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/).&#xa0;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","source":"nvd"}],"published":"2021-05-24T18:16:34.116Z","modified":"2026-07-08T06:49:36.985Z","severity":{"scorer":"snyk","scheme":"CVSS:3.1","vector":"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","score":5.4,"rating":"MEDIUM"},"severities":[{"scorer":"snyk","scheme":"CVSS:3.1","vector":"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","score":5.4,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N","score":5.4,"rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","score":6.1,"rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:2.0","vector":"AV:N/AC:M/Au:N/C:P/I:P/A:N","score":5.8,"rating":"MEDIUM"}],"cwes":["CWE-601"],"affected":[{"ranges":[{"type":"custom","introduced":"unspecified","fixed":"2.0.1","status":"affected"}],"product":"trailing-slash","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"2.0.1"}],"ecosystem":"npm","package":"trailing-slash","purl":"pkg:npm/trailing-slash","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"2.0.1"}],"vendor":"trailing-slash_project","product":"trailing-slash","cpe":"cpe:2.3:a:trailing-slash_project:trailing-slash:*:*:*:*:*:node.js:*:*","source":"nvd"}],"references":[{"url":"https://snyk.io/vuln/SNYK-JS-TRAILINGSLASH-1085707","tags":["exploit","patch","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/fardog/trailing-slash/blob/f640ece055fe85275c983de5eb94661b95e35670/index.js%23L36","tags":["broken-link","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/fardog/trailing-slash/commit/f8e66f1429308247e5a119d430203077d8f05048","tags":["patch","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-23387","tags":["advisory"],"sources":["ghsa"]}],"credits":["apple502j"],"assigner":"snyk","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2021-23387","url":"https://www.cve.org/CVERecord?id=CVE-2021-23387","licence":"CVE Terms of Use","modified":"2024-09-17T02:31:13.513Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-rfhr-62xp-2fp2","url":"https://github.com/advisories/GHSA-rfhr-62xp-2fp2","licence":"CC-BY-4.0","modified":"2026-07-08T06:49:36.985Z"},{"source":"nvd","name":"NVD","id":"CVE-2021-23387","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-23387","licence":"Public domain","modified":"2026-06-17T03:38:40.180Z"}],"updatedAt":"2026-11-25T22:58:01.514Z","epss":{"score":0.0115,"percentile":0.67797,"date":"2026-12-01T12:00:22.000Z"}}