5.3medium
Denial of Service
- Severity
- 5.3medium CVSS:3.1 by GitHub_M
- Exploit likelihood
- 1.86% (higher than 79% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-gcj9-jj38-hwmc
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.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| vapor vapor | <= 4.40.0 | CVE List |
| github.com/vapor/vapor (SwiftURL) | before 4.40.1 | GitHub Advisory Database |
| vapor_project vapor | before 4.40.1 | NVD |
All scores
| GitHub_M | 5.3medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L |
| GitHub | 5.3medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L |
| NVD | 5.3medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L |
| NVD | 5.0medium CVSS:2.0 | AV:N/AC:L/Au:N/C:N/I:N/A:P |
Classification
What each source says
CVE List
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.
GitHub Advisory Database
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:
NVD (es)
Vapor es un framework para Swift. En Vapor versiones anteriores a 4.40.1, se presenta un ataque DoS contra cualquiera que inicie un backend de métricas para su aplicación Vapor. El siguiente es el vector de ataque: 1. Enviar peticiones ilimitadas contra una instancia de vapor con diferentes rutas, esto creará contadores y temporizadores ilimitados, que eventualmente agotarán el sistema. 2. Los servicios aguas abajo también pueden sufrir este ataque al recibir spam con rutas de error. Esto ha sido parcheado en versión 4.40.1. El "DefaultResponder" reescribirá cualquier ruta de rutas no definida para "vapor_route_undefined" para evitar contadores ilimitados
References
| https://github.com/vapor/vapor/security/advisories/GHSA-gcj9-jj38-hwmc | third-party-advisory, web | |
| https://github.com/vapor/vapor/commit/e3aa712508db2854ac0ab905696c65fd88fa7e23 | patch, third-party-advisory, web | |
| https://github.com/vapor/vapor/releases/tag/4.40.1 | release-notes, third-party-advisory, web | |
| https://vapor.codes/ | product | |
| https://nvd.nist.gov/vuln/detail/CVE-2021-21328 | advisory | |
| https://github.com/vapor/vapor | web | |
| https://vapor.codes | web | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2021-21328 changed 2024-08-03 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-gcj9-jj38-hwmc changed 2026-07-08 | CC-BY-4.0 |
| NVD | CVE-2021-21328 changed 2026-06-17 | Public domain |