{"id":"CVE-2021-22964","aliases":["CVE-2021-22964","GHSA-pgh6-m65r-2rhq"],"related":[],"kind":"vulnerability","state":"published","title":"DOS and Open Redirect with user input","summary":"A redirect vulnerability in the `fastify-static` module version >= 4.2.4 and < 4.4.1 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`.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"A redirect vulnerability in the `fastify-static` module version >= 4.2.4 and < 4.4.1 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`.","source":"cvelist"},{"lang":"en","text":"### Impact\n\nA 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`.\n\nA DOS vulnerability is possible if the URL contains invalid characters `curl --path-as-is \"http://localhost:3000//^/..\"`\n\nThe issue shows up on all the `fastify-static` applications that set `redirect: true` option. By default, it is `false`.\n\n### Patches\nThe issue has been patched in `fastify-static@4.4.1`\n\n### Workarounds\nIf updating is not an option, you can sanitize the input URLs using the [`rewriteUrl`](https://www.fastify.io/docs/latest/Server/#rewriteurl) server option.\n\n### References\n\n+ Bug founder: drstrnegth\n+ [hackerone Report](https://hackerone.com/reports/1361804)\n\n### For more information\nIf you have any questions or comments about this advisory:\n* Open an issue in [fastify-static](https://github.com/fastify/fastify-static)\n* Contact the [security team](https://github.com/fastify/fastify/blob/main/SECURITY.md#the-fastify-security-team)","format":"markdown","source":"ghsa"},{"lang":"es","text":"Una vulnerabilidad de redirección en el módulo \"fastify-static\" versiones posteriores a 4.2.4 incluyéndola, y anteriores a 4.4.1, permite a atacantes remotos redirigir a usuarios de Mozilla Firefox a sitios web arbitrarios por medio de una doble barra \"//\" seguida de un dominio: \"http://localhost:3000//a//youtube.com/%2e%2e%2f%2e%2e\". Es posible una vulnerabilidad de DOS si la URL contiene caracteres no válidos \"curl --path-as-is \"http://localhost:3000//^/..\" El problema se presenta en todas las aplicaciones \"fastify-static\" que establecen la opción \"redirect: true\". Por defecto, es \"false\"","source":"nvd"}],"published":"2021-10-12T16:04:17.000Z","modified":"2026-06-17T03:38:07.180Z","severity":{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:H","score":8.8,"rating":"HIGH"},"severities":[{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:H","score":8.8,"rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:H","score":8.8,"rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:2.0","vector":"AV:N/AC:M/Au:N/C:P/I:P/A:P","score":6.8,"rating":"MEDIUM"}],"cwes":["CWE-248","CWE-400","CWE-601"],"affected":[{"ranges":[{"version":"Affected >= v4.2.4, Fixed v4.4.1","status":"affected"}],"product":"https://github.com/fastify/fastify-static","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"4.2.4","status":"affected","fixed":"4.4.1"}],"ecosystem":"npm","package":"fastify-static","purl":"pkg:npm/fastify-static","source":"ghsa"},{"ranges":[{"status":"affected","introduced":"4.2.4","fixed":"4.4.1"}],"vendor":"fastify","product":"fastify-static","cpe":"cpe:2.3:a:fastify:fastify-static:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://hackerone.com/reports/1361804","tags":["exploit","issue-tracking","patch","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/fastify/fastify-static/security/advisories/GHSA-pgh6-m65r-2rhq","tags":["web"],"sources":["ghsa"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-22964","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/fastify/fastify-static/commit/c31f17d107cb19a0e96733c80a9abf16c56166d4","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/fastify/fastify-static","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"hackerone","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2021-22964","url":"https://www.cve.org/CVERecord?id=CVE-2021-22964","licence":"CVE Terms of Use","modified":"2024-08-03T18:58:26.128Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-pgh6-m65r-2rhq","url":"https://github.com/advisories/GHSA-pgh6-m65r-2rhq","licence":"CC-BY-4.0","modified":"2023-11-08T04:05:02.248Z"},{"source":"nvd","name":"NVD","id":"CVE-2021-22964","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-22964","licence":"Public domain","modified":"2026-06-17T03:38:07.180Z"}],"updatedAt":"2026-11-25T22:58:04.493Z","epss":{"score":0.01021,"percentile":0.62593,"date":"2026-11-30T12:00:22.000Z"}}