{"id":"CVE-2021-22963","aliases":["CVE-2021-22963","GHSA-p6vg-p826-qp3v"],"related":[],"kind":"vulnerability","state":"published","title":"URL Redirection to Untrusted Site ('Open Redirect') in fastify-static","summary":"A redirect vulnerability in the fastify-static module version < 4.2.4 allows remote attackers to redirect 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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"A redirect vulnerability in the fastify-static module version < 4.2.4 allows remote attackers to redirect 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.","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//google.com/%2e%2e`.\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.2.4`\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/1354255)\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 anteriores a 4.2.4, permite a atacantes remotos redirigir a usuarios a sitios web arbitrarios por medio de una doble barra // seguida de un dominio: http://localhost:3000//google.com/%2e%2e. El problema aparece en todas las aplicaciones fastify-static que establecen la opción redirect: true. Por defecto, es false","source":"nvd"}],"published":"2021-10-05T20:24:49.000Z","modified":"2026-06-17T03:38:07.070Z","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:N","score":6.1,"rating":"MEDIUM"},"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:N","score":6.1,"rating":"MEDIUM"},{"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:N","score":6.1,"rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:2.0","vector":"AV:N/AC:M/Au:N/C:P/I:P/A:N","score":5.8,"rating":"MEDIUM"}],"cwes":["CWE-601"],"affected":[{"ranges":[{"version":"Affects < v4.2.4. Fixed in >= v4.2.4","status":"affected"}],"product":"https://github.com/fastify/fastify-static","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"4.2.4"}],"ecosystem":"npm","package":"fastify-static","purl":"pkg:npm/fastify-static","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"4.2.4"}],"vendor":"fastify","product":"fastify-static","cpe":"cpe:2.3:a:fastify:fastify-static:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://hackerone.com/reports/1354255","tags":["exploit","issue-tracking","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/fastify/fastify-static/security/advisories/GHSA-p6vg-p826-qp3v","tags":["web"],"sources":["ghsa"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-22963","tags":["advisory"],"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-22963","url":"https://www.cve.org/CVERecord?id=CVE-2021-22963","licence":"CVE Terms of Use","modified":"2024-08-03T18:58:26.158Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-p6vg-p826-qp3v","url":"https://github.com/advisories/GHSA-p6vg-p826-qp3v","licence":"CC-BY-4.0","modified":"2023-11-08T04:05:02.185Z"},{"source":"nvd","name":"NVD","id":"CVE-2021-22963","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-22963","licence":"Public domain","modified":"2026-06-17T03:38:07.070Z"}],"updatedAt":"2026-11-25T22:58:04.493Z","epss":{"score":0.01169,"percentile":0.68295,"date":"2026-12-01T12:00:22.000Z"}}