PT-2021-15479 · Npm · Koa-Remove-Trailing-Slashes

Apple502J

·

Published

2021-05-17

·

Updated

2022-02-10

·

CVE-2021-23384

CVSS v2.0

5.8

Medium

VectorAV:N/AC:M/Au:N/C:P/I:P/A:N
Name of the Vulnerable Software and Affected Versions koa-remove-trailing-slashes versions prior to 2.0.2
Description The issue allows for Open Redirect via the use of trailing double slashes in the URL when accessing a 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.
Recommendations For versions prior to 2.0.2, update to version 2.0.2 or later to resolve the issue. As a temporary workaround, consider modifying the index.js::removeTrailingSlashes() function to handle trailing double slashes correctly, or restrict access to vulnerable endpoints to minimize the risk of exploitation.

Exploit

Fix

Open Redirect

Found an issue in the description? Have something to add? Feel free to write us 👾

Weakness Enumeration

Related Identifiers

CVE-2021-23384
GHSA-R773-PMW3-F4MR
SNYK-JS-KOAREMOVETRAILINGSLASHES-1085708

Affected Products

Koa-Remove-Trailing-Slashes