CVE-2021-22963 URL Redirection to Untrusted Site ('Open Redirect') in fastify-static

Medium 6.1 Published Updated

Remote attackers can redirect users to arbitrary websites in fastify-static when the redirect option is enabled.

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-22963?

CVE-2021-22963 is a medium-severity vulnerability in https://github.com/fastify/fastify-static, published on 14 Oct 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

A redirect vulnerability in the fastify-static module version < 4.2.4 allows remote attackers to redirect users to arbitrary websites via a double slash // followed by a domain: http://localhost:3000//google.com/%2e%2e.The issue shows up on all the fastify-static applications that set redirect: true option. By default, it is false.

Weakness: CWE-601

Which versions are affected by CVE-2021-22963?

2 open source packages ship an affected version, including fastify-static. It affects 1 product.

PackageAffectedFixed in
fastify-static npmAll versions4.2.4
fastify-static npmAll versions4.2.4

Products include Fastify Fastify-Static.

How do I fix CVE-2021-22963?

Upgrade fastify-static to 4.2.4 or later.

Is CVE-2021-22963 being exploited?

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

Sources

Also known as GHSA-p6vg-p826-qp3v.

Is CVE-2021-22963 in your software?

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

Check your SBOMs for free