CVE-2021-23387
JSON

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 packageVersionsReported by
trailing-slashfrom unspecified before 2.0.1CVE List
trailing-slash (npm)before 2.0.1GitHub Advisory Database
trailing-slash_project trailing-slashbefore 2.0.1NVD

All scores

snyk5.4medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N/E:P/RL:O/RC:C
GitHub5.4medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N
NVD6.1medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
NVD5.8medium CVSS:2.0AV: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

Sources

SourceRecordLicence
CVE ListCVE-2021-23387 changed 2024-09-17CVE Terms of Use
GitHub Advisory DatabaseGHSA-rfhr-62xp-2fp2 changed 2026-07-08CC-BY-4.0
NVDCVE-2021-23387 changed 2026-06-17Public domain