Quick answers
- Is CVE-2021-22963 exploited in the wild?
- No. Junglewise Threat Intelligence has no report of CVE-2021-22963 being exploited in the wild.
- How severe is CVE-2021-22963?
- Low severity, with a CVSS score of 3.1, published 5 October 2021.
- Which products and versions are affected?
- @fastify/static (npm) SEMVER:introduced=0,fixed=4.2.4.
- Is there a fix for CVE-2021-22963?
- Yes. @fastify/static (npm): upgrade to 4.2.4 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
- How is CVE-2021-22963 attacked?
- It is attacked over the network, in a software library.
- Am I affected by CVE-2021-22963?
- Check whether you run @fastify/static (npm) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.
How to fix
- @fastify/static (npm): upgrade to 4.2.4 or later
npm install @fastify/static@4.2.4
Technical details
The vulnerability is a URL redirection flaw (CWE-601) in the fastify-static module's redirect handling. When the redirect option is set to true (disabled by default), an attacker can exploit improper URL parsing by using a double slash (//) followed by a domain name to redirect users to arbitrary external sites (e.g., http://localhost:3000//google.com/%2e%2e). The attack requires user interaction (the victim must click the malicious link) and is primarily effective against Mozilla Firefox. The vulnerability has been patched in version 4.2.4, and can be mitigated by using the rewriteUrl option to sanitize input URLs.
Affected products
- Fastify fastify-static before 4.2.4
Identifiers
- CVE-2021-22963
- GHSA-p6vg-p826-qp3v
Timeline
- 2021-10-05: disclosed
- 2021-10-05: patched: Version 4.2.4 released