CVE-2021-23387
What it is
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.
At a glance
- Exploitability
- Can be exploited over the network without logging in, but needs a user to act. Limited direct impact.
- Exploit odds
- 1.1% chance of exploitation in the next 30 days (EPSS).
- Fix
- A patch, advisory or fixed version is referenced. Upgrade or apply it.
Timeline
- PublishedDisclosed publicly on CVE.org and NVD
- Last updatedMost recent change to the record
Why it ranks here
- Exploited in the wild: no, CISA does not list it.
- Exploit odds: 1.1% in the next 30 days (EPSS).
- Severity: 5.4 MEDIUM (CVSS).
- Fix: a patch or advisory is linked.
Details
- Published
- Last modified
- Exploit probability
- 1.1% · EPSS, next 30 days
- Weakness
- CWE-601
- Record status
- Modified
Affected
- trailing-slash Project trailing-slash < 2.0.1
Attack profile CVSS 3.1 · 5.4
- Attack vector
- Network
- Complexity
- Low
- Privileges needed
- None
- User interaction
- Required
- Scope
- Unchanged
- Confidentiality
- Low
- Integrity
- Low
- Availability
- None
Raw vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N
Is it in your code?
Hand this to your coding agent. It searches your project for the affected products and checks versions. Nothing leaves your machine.
Read https://cve-list.com/agent/cve/CVE-2021-23387.md and follow it. Check whether this project is affected by CVE-2021-23387. Read only. Don't change anything and don't upload my code. Tell me yes, no or not sure, with the file as proof.
Fix and advisories
- https://github.com/fardog/trailing-slash/commit/f8e66f1429308247e5a119d430203077d8f05048
- https://snyk.io/vuln/SNYK-JS-TRAILINGSLASH-1085707
- https://github.com/fardog/trailing-slash/commit/f8e66f1429308247e5a119d430203077d8f05048
- https://snyk.io/vuln/SNYK-JS-TRAILINGSLASH-1085707
References
- https://github.com/fardog/trailing-slash/blob/f640ece055fe85275c983de5eb94661b95e35670/index.js%23L36
- https://github.com/fardog/trailing-slash/commit/f8e66f1429308247e5a119d430203077d8f05048
- https://snyk.io/vuln/SNYK-JS-TRAILINGSLASH-1085707
- https://github.com/fardog/trailing-slash/blob/f640ece055fe85275c983de5eb94661b95e35670/index.js%23L36
- https://github.com/fardog/trailing-slash/commit/f8e66f1429308247e5a119d430203077d8f05048
- https://snyk.io/vuln/SNYK-JS-TRAILINGSLASH-1085707