CVE-2021-23384 Open Redirect

Medium 5.4 Published Updated

An attacker can redirect users to malicious sites via crafted URLs with double slashes in the koa-remove-trailing-slashes middleware.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
A user has to click or open something
Fix
Available

What is CVE-2021-23384?

CVE-2021-23384 is a medium-severity vulnerability in koa-remove-trailing-slashes, published on 17 May 2021. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.

Official description

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.

Weakness: CWE-601

Which versions are affected by CVE-2021-23384?

2 open source packages ship an affected version, including koa-remove-trailing-slashes. It affects 1 product.

PackageAffectedFixed in
koa-remove-trailing-slashes npmAll versions2.0.2
koa-remove-trailing-slashes npmAll versions2.0.2

Products include Koa-Remove-Trailing-Slashes Project Koa-Remove-Trailing-Slashes.

How do I fix CVE-2021-23384?

Upgrade koa-remove-trailing-slashes to 2.0.2 or later.

Is CVE-2021-23384 being exploited?

There is no known exploitation of CVE-2021-23384 in the wild and no public exploit code.

Sources

Also known as GHSA-r773-pmw3-f4mr.

Is CVE-2021-23384 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free