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 fastify-static@4.4.1
Workarounds
If updating is not an option, you can sanitize the input URLs using the rewriteUrl server option.
References
- Bug founder: drstrnegth
- hackerone Report
For more information
If you have any questions or comments about this advisory:
- Open an issue in fastify-static
- Contact the security team
Affected software
Click a technology to see all vulnerabilities affecting it.
| Platform | Package | Vulnerable versions | Fixed in |
|---|---|---|---|
| npm package | fastify-static | >= 4.2.4, < 4.4.1 | 4.4.1 |
References
- CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:H- Weakness (CWE)
CWE-248, CWE-601- Platform
- npm
- Package
fastify-static- Disclosed
- 12.10.2021
- Updated
- 11.10.2026 10:22
Sources and licenses
OSV / GitHub Advisory Database - GHSA-pgh6-m65r-2rhq - CC BY 4.0
Vulnerability history: fastify-static
All published vulnerabilities of this package (npm package), newest first. Shows whether this is a one-off slip or a package that needs watching.
- Total entries
- 2
- First → latest
- 10.2021 10.2021
- Without a fix
- 0
- Exploited in attacks
- 0
Severity breakdown
- High 1
- Medium 1
Disclosures per year
- 2021: 2
- 2022: 0
- 2023: 0
- 2024: 0
- 2025: 0
- 2026: 0
-
DOS and Open Redirect with user input this entry
Know which vulnerabilities affect your application
With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.