Ecosyste.ms: Advisories

An open API service providing security vulnerability metadata for many open source software ecosystems.

Security Advisories: GSA_kwCzR0hTQS1wNnZnLXA4MjYtcXAzds0WKg

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

Impact

A redirect vulnerability in the fastify-static module allows remote attackers to redirect Mozilla Firefox 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.

Patches

The issue has been patched in [email protected]

Workarounds

If updating is not an option, you can sanitize the input URLs using the rewriteUrl server option.

References

For more information

If you have any questions or comments about this advisory:

Permalink: https://github.com/advisories/GHSA-p6vg-p826-qp3v
JSON: https://advisories.ecosyste.ms/api/v1/advisories/GSA_kwCzR0hTQS1wNnZnLXA4MjYtcXAzds0WKg
Source: GitHub Advisory Database
Origin: Unspecified
Severity: Moderate
Classification: General
Published: over 2 years ago
Updated: about 1 year ago


CVSS Score: 6.1
CVSS vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N

Identifiers: GHSA-p6vg-p826-qp3v, CVE-2021-22963
References: Repository: https://github.com/fastify/fastify-static
Blast Radius: 21.9

Affected Packages

npm:fastify-static
Dependent packages: 372
Dependent repositories: 3,963
Downloads: 680,346 last month
Affected Version Ranges: < 4.2.4
Fixed in: 4.2.4
All affected versions: 0.1.0, 0.2.0, 0.2.1, 0.3.0, 0.4.0, 0.4.1, 0.5.0, 0.6.0, 0.7.0, 0.8.0, 0.9.0, 0.10.0, 0.10.1, 0.11.0, 0.12.0, 0.13.0, 0.14.0, 1.0.0, 1.1.0, 2.0.0, 2.1.0, 2.2.0, 2.3.0, 2.3.1, 2.3.2, 2.3.3, 2.3.4, 2.4.0, 2.5.0, 2.5.1, 2.6.0, 2.7.0, 3.0.0, 3.0.1, 3.1.0, 3.2.0, 3.2.1, 3.3.0, 3.3.1, 3.4.0, 4.0.0, 4.0.1, 4.2.0, 4.2.1, 4.2.2, 4.2.3
All unaffected versions: 4.2.4, 4.3.0, 4.4.0, 4.4.1, 4.4.2, 4.5.0, 4.6.0, 4.6.1, 4.7.0