Advisory Database
  • Advisories
  • Dependency Scanning
  1. npm
  2. ›
  3. koa-remove-trailing-slashes
  4. ›
  5. CVE-2021-23384

CVE-2021-23384: URL Redirection to Untrusted Site (Open Redirect)

May 17, 2021 (updated May 25, 2021)

The package koa-remove-trailing-slashes is 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::removeTrailingSlashes(), as the web server uses relative URLs instead of absolute URLs.

References

  • nvd.nist.gov/vuln/detail/CVE-2021-23384

Code Behaviors & Features

Detect and mitigate CVE-2021-23384 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Dependency Scanning using SBOM also detects vulnerabilities from proprietary advisories that this site does not include. Learn more about Dependency Scanning using SBOM →

Affected versions

All versions before 2.0.2

Fixed versions

  • 2.0.2

Solution

Upgrade to version 2.0.2 or above.

Impact 5.4 MEDIUM

CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N

Learn more about CVSS

Weakness

  • CWE-601: URL Redirection to Untrusted Site ('Open Redirect')

Source file

npm/koa-remove-trailing-slashes/CVE-2021-23384.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sun, 08 Nov 2026 00:15:43 +0000.