Track vulnerabilities like this one. Sign up free to get alerted when software you use is affected.
5.4

CVE-2021-23384: Koa Remove Trailing Slashes Allows URL Hijacking

CVE-2021-23384 · published 5 years ago
Summary

Koa Remove Trailing Slashes versions before 2.0.2 contain a security flaw that lets attackers redirect users to malicious websites. This affects websites using Koa Remove Trailing Slashes, which rely on absolute URLs to prevent such attacks. Update to version 2.0.2 or later to fix this issue.

What to do
  • Update pakerstrand koa-remove-trailing-slashes to version 2.0.2.
  • Update koa-remove-trailing-slashes_project koa-remove-trailing-slashes to version 2.0.2 or later.
Affected software
Ecosystem VendorProductAffected versions
npm pakerstrand koa-remove-trailing-slashes < 2.0.2
Fix: upgrade to 2.0.2
– koa-remove-trailing-slashes_project koa-remove-trailing-slashes < 2.0.2
cpe:2.3:a:koa-remove-trailing-slashes_project:koa-remove-trailing-slashes:*:*:*:*:*:node.js:*:*
Original advisory text
The package koa-remove-trailing-slashes before 2.0.2 are vulnerable to Open Redirect via the use of trailing double slashes in the URL when accessing the vulnerable endpoint (such as https://exampl...
The package koa-remove-trailing-slashes before 2.0.2 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::removeTrailingSlashes(), as the web server uses relative URLs instead of absolute URLs.
Fix within
Internet-facing 60 days
Internal At next upgrade
  • Not known to be exploited
  • Needs hands-on effort to exploit (estimated)
  • Gives an attacker partial control (estimated)
Severity
5.4 Medium
Exploitation
<1% chance of attack within 30 days
Type
CWE-601Open Redirect
Timeline
Published17 May 2021
Updated31 Oct 2026
First seen6 Mar 2026
Sources
Track software like this
Free during beta