{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2021-23387","id":"CVE-2021-23387","title":"Open Redirect","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.","descriptionLong":"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.","published":"2021-05-24T18:16:34.116Z","updated":"2026-10-20T10:53:37.593057731Z","reserved":"2021-01-08T00:00:00.000Z","status":"Modified","rejected":false,"assigner":"snyk","metric":{"version":"3.1","score":5.4,"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","rating":"medium","source":"snyk"},"metrics":[{"version":"3.1","score":5.4,"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","rating":"medium","source":"snyk"},{"version":"3.1","score":5.4,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N","rating":"medium","source":"snyk.io"},{"version":"3.1","score":6.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","rating":"medium","source":"NVD"},{"version":"3.1","score":6.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","rating":"medium","source":"OSV"},{"version":"3.1","score":5.4,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N","rating":"medium","source":"GitHub"},{"version":"2.0","score":5.8,"vector":"AV:N/AC:M/Au:N/C:P/I:P/A:N","rating":"medium","source":"NVD"}],"rating":"medium","products":["trailing-slash"],"affectedProducts":[{"vendor":"n/a","product":"trailing-slash","defaultStatus":null,"versions":[{"lessThan":"2.0.1","status":"affected","version":"unspecified","versionType":"custom"}],"platforms":[]}],"packages":[{"ecosystem":"npm","name":"trailing-slash","purl":"pkg:npm/trailing-slash","ranges":["<2.0.1"],"fixed":["2.0.1"],"advisory":"GHSA-rfhr-62xp-2fp2"}],"cwes":["CWE-601"],"aliases":["GHSA-rfhr-62xp-2fp2","SNYK-JS-TRAILINGSLASH-1085707"],"references":[{"url":"https://snyk.io/vuln/SNYK-JS-TRAILINGSLASH-1085707","tags":["x_refsource_MISC","x_transferred","Exploit","Patch","Third Party Advisory","fix","web"]},{"url":"https://github.com/fardog/trailing-slash/blob/f640ece055fe85275c983de5eb94661b95e35670/index.js%23L36","tags":["x_refsource_MISC","x_transferred","Broken Link","web"]},{"url":"https://github.com/fardog/trailing-slash/commit/f8e66f1429308247e5a119d430203077d8f05048","tags":["x_refsource_MISC","x_transferred","Patch","Third Party Advisory","fix","web"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-23387","tags":["advisory"]}],"patchReferenced":true,"fixAvailable":true,"exploitReferenced":true,"kev":false,"kevAdded":null,"kevDue":null,"kevEntry":null,"ssvc":null,"epss":0.0115,"epssPercentile":0.67577,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2021-23387","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-23387","ok":true,"note":"Modified"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2021-23387","ok":true,"note":"1 package"},{"name":"GitHub Advisory","url":"https://github.com/advisories/GHSA-rfhr-62xp-2fp2","ok":true,"note":"GHSA-rfhr-62xp-2fp2"},{"name":"CISA KEV","url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","ok":true,"note":"not listed"},{"name":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2021-23387","ok":true,"note":"scored 2026-11-19"}],"aiTitle":false,"tech":[],"critical":[],"attention":null}