{"id":"CVE-2021-22964","aliases":["GHSA-pgh6-m65r-2rhq"],"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...","published_at":"2021-10-06T00:00:00Z","modified_at":"2026-02-02T07:28:09.888563Z","products":[],"rating":{"severity":"high","score":8.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:H","attack_path":"internet_unauthenticated","user_interaction":true,"malicious":false,"red_hat":"Moderate","vendor_ratings":[{"source":"Red Hat","rating":"Moderate"}]},"fix_available":false,"kev":{"listed":false,"ransomware":false},"public_exploit":false,"exploits":[],"epss":{"score":0.010209999978542328,"percentile":0.6414200067520142,"date":"2026-11-19T00:00:00Z"},"priority":10.3,"details":"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`.","affected_stack":[],"affected_other":[{"ecosystem":"NVD","package":"fastify:fastify-static","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"4.2.4"},{"fixed":"4.4.1"}]}],"fixed":["4.4.1"],"provider":"nvd","source":"CVE-2021-22964","relation":"self"},{"ecosystem":"npm","package":"fastify-static","purl":"pkg:npm/fastify-static","ranges":[{"type":"SEMVER","events":[{"introduced":"4.2.4"},{"fixed":"4.4.1"}]}],"fixed":["4.4.1"],"provider":"osv","source":"GHSA-pgh6-m65r-2rhq","relation":"self"}],"product_status":[{"vendor":"Red Hat","product":"Red Hat Advanced Cluster Management for Kubernetes 2","cpe":"cpe:/a:redhat:acm:2","status":"not_affected","packages":["rhacm2/search-ui-rhel8"],"package_count":1,"fixed":[],"advisories":[],"note":"vulnerable_code_not_present","provider":"redhat-vex","source":"CVE-2021-22964"}],"records":[{"provider":"cvelistv5","source_id":"CVE-2021-22964","relation":"self","url":"https://www.cve.org/CVERecord?id=CVE-2021-22964","license":"CC-BY-4.0","published_at":"2021-10-14T14:50:07Z","modified_at":"2024-08-03T18:58:26.128Z","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...","details":"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`.","severity":[],"affected":[],"product_status":[],"references":[{"type":"WEB","url":"https://hackerone.com/reports/1361804"}]},{"provider":"nvd","source_id":"CVE-2021-22964","relation":"self","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-22964","severity":[],"affected":[{"ecosystem":"NVD","package":"fastify:fastify-static","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"4.2.4"},{"fixed":"4.4.1"}]}],"fixed":["4.4.1"],"provider":"nvd","source":"CVE-2021-22964","relation":"self"}],"product_status":[],"references":[]},{"provider":"osv","source_id":"GHSA-pgh6-m65r-2rhq","relation":"self","url":"https://osv.dev/vulnerability/GHSA-pgh6-m65r-2rhq","license":"CC-BY-4.0","published_at":"2021-10-12T16:04:17Z","modified_at":"2023-11-08T04:05:02.248197Z","summary":"DOS and Open Redirect with user input","details":"### 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)","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:H","source":"GHSA-pgh6-m65r-2rhq"}],"affected":[{"ecosystem":"npm","package":"fastify-static","purl":"pkg:npm/fastify-static","ranges":[{"type":"SEMVER","events":[{"introduced":"4.2.4"},{"fixed":"4.4.1"}]}],"fixed":["4.4.1"],"provider":"osv","source":"GHSA-pgh6-m65r-2rhq","relation":"self"}],"product_status":[],"references":[{"type":"WEB","url":"https://github.com/fastify/fastify-static/security/advisories/GHSA-pgh6-m65r-2rhq"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-22964"},{"type":"WEB","url":"https://github.com/fastify/fastify-static/commit/c31f17d107cb19a0e96733c80a9abf16c56166d4"},{"type":"WEB","url":"https://hackerone.com/reports/1361804"},{"type":"PACKAGE","url":"https://github.com/fastify/fastify-static"}]},{"provider":"redhat-vex","source_id":"CVE-2021-22964","relation":"self","url":"https://access.redhat.com/security/cve/CVE-2021-22964","license":"CC-BY-4.0","published_at":"2021-10-06T00:00:00Z","modified_at":"2026-02-02T07:28:09.888563Z","summary":"fastify-static: open redirect and DoS via an URL with double slash followed by a domain and with invalid characters","details":"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`.","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H","source":"CVE-2021-22964"},{"type":"Red Hat","score":"Moderate","source":"CVE-2021-22964"}],"affected":[],"product_status":[{"vendor":"Red Hat","product":"Red Hat Advanced Cluster Management for Kubernetes 2","cpe":"cpe:/a:redhat:acm:2","status":"not_affected","packages":["rhacm2/search-ui-rhel8"],"package_count":1,"fixed":[],"advisories":[],"note":"vulnerable_code_not_present","provider":"redhat-vex","source":"CVE-2021-22964"}],"references":[{"type":"WEB","url":"https://security.access.redhat.com/data/csaf/v2/vex/2021/cve-2021-22964.json"},{"type":"WEB","url":"https://access.redhat.com/security/cve/CVE-2021-22964"},{"type":"WEB","url":"https://bugzilla.redhat.com/show_bug.cgi?id=2015156"},{"type":"WEB","url":"https://www.cve.org/CVERecord?id=CVE-2021-22964"},{"type":"WEB","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-22964"}]}],"references":[{"type":"WEB","url":"https://hackerone.com/reports/1361804"},{"type":"WEB","url":"https://github.com/fastify/fastify-static/security/advisories/GHSA-pgh6-m65r-2rhq"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-22964"},{"type":"WEB","url":"https://github.com/fastify/fastify-static/commit/c31f17d107cb19a0e96733c80a9abf16c56166d4"},{"type":"PACKAGE","url":"https://github.com/fastify/fastify-static"},{"type":"WEB","url":"https://security.access.redhat.com/data/csaf/v2/vex/2021/cve-2021-22964.json"},{"type":"WEB","url":"https://access.redhat.com/security/cve/CVE-2021-22964"},{"type":"WEB","url":"https://bugzilla.redhat.com/show_bug.cgi?id=2015156"},{"type":"WEB","url":"https://www.cve.org/CVERecord?id=CVE-2021-22964"}],"sources":[{"provider":"cvelistv5","source_id":"CVE-2021-22964","url":"https://www.cve.org/CVERecord?id=CVE-2021-22964","license":"CC-BY-4.0","modified_at":"2024-08-03T18:58:26.128Z","relation":"self"},{"provider":"nvd","source_id":"CVE-2021-22964","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-22964","relation":"self"},{"provider":"osv","source_id":"GHSA-pgh6-m65r-2rhq","url":"https://osv.dev/vulnerability/GHSA-pgh6-m65r-2rhq","license":"CC-BY-4.0","modified_at":"2023-11-08T04:05:02.248197Z","relation":"self"},{"provider":"redhat-vex","source_id":"CVE-2021-22964","url":"https://access.redhat.com/security/cve/CVE-2021-22964","license":"CC-BY-4.0","modified_at":"2026-02-02T07:28:09.888563Z","relation":"self"}]}
