CVE-2021-21328
Denial of Service
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.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- Low
- Privileges needed
- None
- User interaction
- None
What an attacker can affect
- Confidentiality
- None
- Integrity
- None
- Availability
- Low
Exploit likelihood
What each source reports
CVE List Score used
5.3
Denial of Service
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.
- Record
CVE-2021-21328- CVSS 3.1
- 5.3 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L - Weakness
- CWE-400
- Updated
- 2026-11-02
EUVDEUVD-2023-1801
5.3
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.
- Record
EUVD-2023-1801- CVSS 3.1
- 5.3 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L - Updated
- 2026-11-03
GitHub AdvisoriesGHSA-gcj9-jj38-hwmc
5.3
Vapor's Metrics integration could cause a system drain
Impact
This is a DoS attack against anyone who Bootstraps a metrics backend for their Vapor app with the following attack vector:
- send unlimited requests against a vapor instance with different paths. this will create “unlimited” counters and timers, which will eventually drain the system.
- downstream services might suffer from this attack as well by being spammed with error paths
Patches
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.
Workarounds
Don't bootstrap a metrics system or upgrade to 4.40.1
For more information
If you have any questions or comments about this advisory:
- Record
GHSA-gcj9-jj38-hwmc- CVSS 3.1
- 5.3 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L - Weakness
- CWE-400
- Updated
- 2026-11-02
NVD
5.3
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.
- Record
CVE-2021-21328- CVSS 3.1
- 5.3 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L - CVSS 2.0
- 5.0 Medium
AV:N/AC:L/Au:N/C:N/I:N/A:P - Weakness
- CWE-400
- Updated
- 2026-11-02
OSV
5.3
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.
- Record
CVE-2021-21328- CVSS 3.1
- 5.3 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L - Updated
- 2026-11-02
OSVGHSA-gcj9-jj38-hwmc
5.3
Vapor's Metrics integration could cause a system drain
Impact
This is a DoS attack against anyone who Bootstraps a metrics backend for their Vapor app with the following attack vector:
- send unlimited requests against a vapor instance with different paths. this will create “unlimited” counters and timers, which will eventually drain the system.
- downstream services might suffer from this attack as well by being spammed with error paths
Patches
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.
Workarounds
Don't bootstrap a metrics system or upgrade to 4.40.1
For more information
If you have any questions or comments about this advisory:
- Record
GHSA-gcj9-jj38-hwmc- CVSS 3.1
- 5.3 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L - Weakness
- CWE-400
- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
github.com/vapor/vaporSwiftURL |
through 4.40.0 | 4.40.1 |
github.com/vapor/vaporSwiftURL |
before 4.40.1 | 4.40.1 |
History
| Recorded | Changed | Sources |
|---|---|---|
| aliases | EUVD | |
| first indexed | CVE List, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2021-21328 is a medium vulnerability (CVSS 5.3) in Vapor, published February 26, 2021. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 1.84%, the 79th percentile. Fixed in github.com/vapor/vapor 4.40.1.