Ecosyste.ms: Advisories

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

Security Advisories: GSA_kwCzR0hTQS1wZ2g2LW02NXItMnJocc0Wew

DOS and Open Redirect with user input

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//a//youtube.com/%2e%2e%2f%2e%2e.

A DOS vulnerability is possible if the URL contains invalid characters curl --path-as-is "http://localhost:3000//^/.."

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-pgh6-m65r-2rhq
JSON: https://advisories.ecosyste.ms/api/v1/advisories/GSA_kwCzR0hTQS1wZ2g2LW02NXItMnJocc0Wew
Source: GitHub Advisory Database
Origin: Unspecified
Severity: High
Classification: General
Published: over 2 years ago
Updated: about 1 year ago


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

Identifiers: GHSA-pgh6-m65r-2rhq, CVE-2021-22964
References: Repository: https://github.com/fastify/fastify-static
Blast Radius: 31.7

Affected Packages

npm:fastify-static
Dependent packages: 372
Dependent repositories: 3,963
Downloads: 680,346 last month
Affected Version Ranges: >= 4.2.4, < 4.4.1
Fixed in: 4.4.1
All affected versions: 4.2.4, 4.3.0, 4.4.0
All unaffected 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, 4.4.1, 4.4.2, 4.5.0, 4.6.0, 4.6.1, 4.7.0