{"id":"CVE-2021-21328","aliases":["EUVD-2023-1801","GHSA-gcj9-jj38-hwmc"],"status":"published","title":"Denial of Service","description":"Vapor is a web framework for Swift. In Vapor before version 4.40.1, there is a DoS attack against anyone who Bootstraps a metrics backend for their Vapor app. The following is the attack vector: 1. send unlimited requests against a vapor instance with different paths. this will create unlimited counters and timers, which will eventually drain the system. 2. downstream services might suffer from this attack as well by being spammed with error paths. This has been patched in 4.40.1. The `DefaultResponder` will rewrite any undefined route paths for to `vapor_route_undefined` to avoid unlimited counters.","severity":{"version":"3.1","score":5.3,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L","level":"medium","assessor":"cna","from":"cve"},"epss":{"day":"2026-11-11","score":0.01837,"percentile":0.7923,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-400"],"published":"2021-02-26T01:45:23Z","modified":"2026-10-20T10:53:33Z","fixes":[{"ecosystem":"SwiftURL","package":"github.com/vapor/vapor","fixed_in":["4.40.1"],"sources":["ghsa","osv"]}],"affected":[{"source":"ghsa","ecosystem":"SwiftURL","package":"github.com/vapor/vapor","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"last_affected":"4.40.0"},{"fixed":"4.40.1"}]}]},{"source":"osv","ecosystem":"SwiftURL","package":"github.com/vapor/vapor","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"4.40.1"}]}]}],"products":[{"vendor":"vapor","product":"vapor"},{"vendor":"vapor_project","product":"vapor"}],"references":[{"url":"https://github.com/vapor/vapor/security/advisories/GHSA-gcj9-jj38-hwmc","tags":["x_refsource_CONFIRM","x_transferred","Third Party Advisory","advisory","web"]},{"url":"https://github.com/vapor/vapor/commit/e3aa712508db2854ac0ab905696c65fd88fa7e23","tags":["x_refsource_MISC","x_transferred","Patch","Third Party Advisory","fix","web"]},{"url":"https://github.com/vapor/vapor/releases/tag/4.40.1","tags":["x_refsource_MISC","x_transferred","Release Notes","Third Party Advisory","advisory","web"]},{"url":"https://vapor.codes/","tags":["x_refsource_MISC","x_transferred","Product","web"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-21328","tags":["advisory"]},{"url":"https://github.com/advisories/GHSA-gcj9-jj38-hwmc"},{"url":"https://github.com/vapor/vapor","tags":["web"]},{"url":"https://vapor.codes","tags":["web"]}],"sources":{"cve":[{"id":"CVE-2021-21328","title":"Denial of Service","description":"Vapor is a web framework for Swift. In Vapor before version 4.40.1, there is a DoS attack against anyone who Bootstraps a metrics backend for their Vapor app. The following is the attack vector: 1. send unlimited requests against a vapor instance with different paths. this will create unlimited counters and timers, which will eventually drain the system. 2. downstream services might suffer from this attack as well by being spammed with error paths. This has been patched in 4.40.1. The `DefaultResponder` will rewrite any undefined route paths for to `vapor_route_undefined` to avoid unlimited counters.","status":"published","published":"2021-02-26T01:45:23Z","modified":"2024-08-03T18:09:15.396Z","cvss":[{"version":"3.1","score":5.3,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L","level":"medium","assessor":"cna"}],"cwes":["CWE-400"],"updated_at":"2026-11-02T14:33:00.488332Z"}],"euvd":[{"id":"EUVD-2023-1801","description":"Vapor is a web framework for Swift. In Vapor before version 4.40.1, there is a DoS attack against anyone who Bootstraps a metrics backend for their Vapor app. The following is the attack vector: 1. send unlimited requests against a vapor instance with different paths. this will create unlimited counters and timers, which will eventually drain the system. 2. downstream services might suffer from this attack as well by being spammed with error paths. This has been patched in 4.40.1. The `DefaultResponder` will rewrite any undefined route paths for to `vapor_route_undefined` to avoid unlimited counters.","status":"published","published":"2021-02-26T01:45:23Z","modified":"2024-08-03T18:09:15Z","cvss":[{"version":"3.1","score":5.3,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L","level":"medium"}],"updated_at":"2026-11-03T03:25:06.347262Z"}],"ghsa":[{"id":"GHSA-gcj9-jj38-hwmc","title":"Vapor's Metrics integration could cause a system drain","description":"### Impact\nThis is a DoS attack against anyone who Bootstraps a metrics backend for their Vapor app with the following attack vector:\n\n1. send unlimited requests against a vapor instance with different paths. this will create “unlimited” counters and timers, which will eventually drain the system.\n2. downstream services might suffer from this attack as well by being spammed with error paths\n\n### Patches\nThis has been patched in 4.40.1. The `DefaultResponder` will rewrite any undefined route paths for to `vapor_route_undefined` to avoid unlimited counters.\n\n### Workarounds\nDon't bootstrap a metrics system or upgrade to 4.40.1\n\n### For more information\nIf you have any questions or comments about this advisory:\n* Open an issue in [Vapor](https://github.com/vapor/vapor)\n* Ask in [Discord](http://vapor.team)","status":"published","published":"2023-06-09T19:31:47Z","modified":"2023-06-19T16:45:07Z","cvss":[{"version":"3.1","score":5.3,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L","level":"medium"}],"cwes":["CWE-400"],"updated_at":"2026-11-02T14:36:55.184601Z"}],"nvd":[{"id":"CVE-2021-21328","description":"Vapor is a web framework for Swift. In Vapor before version 4.40.1, there is a DoS attack against anyone who Bootstraps a metrics backend for their Vapor app. The following is the attack vector: 1. send unlimited requests against a vapor instance with different paths. this will create unlimited counters and timers, which will eventually drain the system. 2. downstream services might suffer from this attack as well by being spammed with error paths. This has been patched in 4.40.1. The `DefaultResponder` will rewrite any undefined route paths for to `vapor_route_undefined` to avoid unlimited counters.","status":"published","published":"2021-02-26T02:15:12.713Z","modified":"2026-06-17T03:35:18.397Z","cvss":[{"version":"3.1","score":5.3,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L","level":"medium","assessor":"secondary"},{"version":"3.1","score":5.3,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L","level":"medium","assessor":"primary"},{"version":"2.0","score":5,"vector":"AV:N/AC:L/Au:N/C:N/I:N/A:P","level":"medium","assessor":"primary"}],"cwes":["CWE-400"],"updated_at":"2026-11-02T14:06:50.399901Z"}],"osv":[{"id":"CVE-2021-21328","description":"Vapor is a web framework for Swift. In Vapor before version 4.40.1, there is a DoS attack against anyone who Bootstraps a metrics backend for their Vapor app. The following is the attack vector: 1. send unlimited requests against a vapor instance with different paths. this will create unlimited counters and timers, which will eventually drain the system. 2. downstream services might suffer from this attack as well by being spammed with error paths. This has been patched in 4.40.1. The `DefaultResponder` will rewrite any undefined route paths for to `vapor_route_undefined` to avoid unlimited counters.","status":"published","published":"2021-02-26T02:15:12.713Z","modified":"2026-10-20T10:53:33.64562618Z","cvss":[{"version":"3.1","score":5.3,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L","level":"medium"}],"updated_at":"2026-11-02T15:44:18.004149Z"},{"id":"GHSA-gcj9-jj38-hwmc","title":"Vapor's Metrics integration could cause a system drain","description":"### Impact\nThis is a DoS attack against anyone who Bootstraps a metrics backend for their Vapor app with the following attack vector:\n\n1. send unlimited requests against a vapor instance with different paths. this will create “unlimited” counters and timers, which will eventually drain the system.\n2. downstream services might suffer from this attack as well by being spammed with error paths\n\n### Patches\nThis has been patched in 4.40.1. The `DefaultResponder` will rewrite any undefined route paths for to `vapor_route_undefined` to avoid unlimited counters.\n\n### Workarounds\nDon't bootstrap a metrics system or upgrade to 4.40.1\n\n### For more information\nIf you have any questions or comments about this advisory:\n* Open an issue in [Vapor](https://github.com/vapor/vapor)\n* Ask in [Discord](http://vapor.team)","status":"published","published":"2023-06-09T19:31:47Z","modified":"2026-07-08T06:29:57.342242743Z","cvss":[{"version":"3.1","score":5.3,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L","level":"medium"}],"cwes":["CWE-400"],"updated_at":"2026-11-02T15:46:47.822182Z"}]}}
