LiveActive security incident?Get immediate response
CVE Record

CVE-2021-23387: Open Redirect

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.

MediumCVSS 5.4Not KEV-listedUpdated
Glexia's TakeAutomated analysismoderate

Security readout for executives and security teams

Plain-English summary

CVE-2021-23387 is an open redirect in the npm package trailing-slash before 2.0.1. A crafted URL can make a site redirect users to an external domain. This is mainly a phishing and trust-abuse risk, not a direct server takeover.

Executive priority

Treat as a moderate-priority web trust issue. It is unlikely to compromise infrastructure directly, but it can support phishing, credential theft, or brand misuse when vulnerable redirects are publicly reachable.

Technical view

The issue is in index.js createTrailing(), where redirect construction used relative URLs. With double-slash URL input, browsers may interpret the redirect as an external scheme-relative destination. The CVSS 3.1 score is 5.4 with network access, low complexity, no privileges, and user interaction required.

Likely exposure

Exposure is likely limited to applications that depend on trailing-slash before 2.0.1 and expose routes using the vulnerable trailing-slash redirect behavior. The provided sources do not identify affected downstream applications or platforms.

Exploitation context

The bundle reports proof-of-concept exploit maturity, but it does not cite active exploitation. CISA KEV status is false in the provided data. Practical abuse would require convincing a user to follow a crafted link.

Researcher notes

The evidence clearly identifies trailing-slash before 2.0.1 and points to the vulnerable createTrailing() code and fix commit. No CWE is listed in the bundle, and no active exploitation source is provided.

Mitigation direction

  • Upgrade trailing-slash to version 2.0.1 or later.
  • Check vendor and package maintainer guidance for any additional recommendations.
  • Review exposed routes that perform trailing-slash redirects.
  • Add redirect allowlist or absolute internal URL handling where applicable.

Validation and detection

  • Inventory applications using the trailing-slash package.
  • Confirm installed versions are not below 2.0.1.
  • Review redirect responses for unintended external Location headers.
  • Check dependency lockfiles and container builds for stale vulnerable versions.
  • Add regression tests covering malformed double-slash URL handling.
Prepared
Confidence
high
Sources
5

Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.

Potential ATT&CK relevance

Conservative CVE-to-ATT&CK context

These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.

ATT&CK lookup starting points

Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.

cve · low confidence lookup

CVE-2021-23387 mapping review

Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.

Open ATT&CK lookup
Vulnerability profileCVE Program record
Severity
Medium
CVSS
5.4 (3.1)
Known Exploited
No
Published

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

Official CVE source material

CNA and ADP enrichment extracted from CVE v5

These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.

1CVSS vectors
0Timeline events
0ADP providers
4Source links

CVSS vector scores

1 official score

We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.

ScoreVersionSeverityVectorExploitImpactSource
5.4CVSS 3.1MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N/E:P/RL:O/RC:C2.82.5Primary CVE score

Vulnerability scoring details

Base CVSS 3.1 score

5.4Medium
CVSS 3.1 vector shape for CVE-2021-23387Attack VectorAttack ComplexityPrivileges RequiredUser InteractionScopeConfidentiality ImpactIntegrity ImpactAvailability Impact

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

Attack Vector
NetworkAdjacentLocalPhysical
Attack Complexity
LowHigh
Privileges Required
NoneLowHigh
User Interaction
NoneRequired
Scope
ChangedUnchanged
Confidentiality Impact
HighLowNone
Integrity Impact
HighLowNone
Availability Impact
HighLowNone
Affected products

Products and packages named in the record

VendorProductVersion / packageStatus
n/atrailing-slashunspecifiedListed
Weakness

CWE details

No CWE listed

CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.