All CVEs / Trailing-slash Project
CVE-2021-23387Trailing-slash Project Trailing-slash
Medium 6.1 No auth needed
Follow: this CVE · Trailing-slash Project · Trailing-slash Project Trailing-slash We alert you by email or Slack (account required).
- Priority
- 52
- CVSS 3.1
- 6.1
- EPSS
- 1.1% probability of exploitation in 30 days · percentile 68
- Auth required
- No
- Published
- May 24, 2021
- Updated
- Jun 17, 2026
- Category
- Application · Cross-platform
- Weakness (CWE)
- CWE-601
- Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
What happens
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.
What to do
- Apply the vendor's security update for Trailing-slash.
- It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.
Affected packages
| Ecosystem | Package | Affected versions | Fixed in | How to upgrade |
|---|---|---|---|---|
| npm | trailing-slash |
< 2.0.1 |
2.0.1 |
npm install trailing-slash@2.0.1 |
Per OSV / GitHub Advisories (GHSA-rfhr-62xp-2fp2). Check the version in your lockfile before upgrading.
Affected products (CPE)
| Vendor | Product | Versions |
|---|---|---|
| trailing-slash_project | trailing-slash | < 2.0.1 |
Official sources
References
Links published by the sources. Open them with care.
- github.com Broken Link
- github.com Patch Third Party Advisory
- snyk.io Exploit Patch Third Party Advisory