CVE-2021-23387

Source
https://cve.org/CVERecord?id=CVE-2021-23387
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2021-23387.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2021-23387
Aliases
Published
2021-05-24T19:15:07Z
Modified
2026-10-20T10:53:37Z
Severity
  • 6.1 (Medium) CVSS_V3 - CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N CVSS Calculator
Summary
[none]
Details

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.

References

Affected packages

Git / github.com/fardog/trailing-slash

Affected ranges

Type
GIT
Repo
https://github.com/fardog/trailing-slash
Events
Introduced
0 Unknown introduced commit / All previous commits are affected
Fixed
Fixed
Database specific
Show details
{
    "extracted_events":  [
        {
            "cpe":  "cpe:2.3:a:trailing-slash_project:trailing-slash:*:*:*:*:*:node.js:*:*",
            "range":  [
                {
                    "introduced":  "0"
                },
                {
                    "fixed":  "2.0.1"
                }
            ],
            "source":  "CPE_RANGE"
        },
        {
            "range":  [
                {
                    "fixed":  "f8e66f1429308247e5a119d430203077d8f05048"
                }
            ],
            "source":  "REFERENCES_COMMIT"
        }
    ]
}

Affected versions

v1.*
v1.0.0
v2.*
v2.0.0

Database specific

source
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2021-23387.json"