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:07.427Z
Modified
2026-07-09T12:33:04.500635Z
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
{
    "source": [
        "CPE_RANGE",
        "REFERENCES"
    ],
    "cpe": "cpe:2.3:a:trailing-slash_project:trailing-slash:*:*:*:*:*:node.js:*:*",
    "extracted_events": [
        {
            "introduced": "0"
        },
        {
            "fixed": "2.0.1"
        }
    ]
}

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"