ghsa-gcj9-jj38-hwmc
CVSS 5.3 osv_swift### Impact This is a DoS attack against anyone who Bootstraps a metrics backend for their Vapor app with the following 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 ### 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: * Open an issue in [Vapor](https://github.com/vapor/vapor) * Ask in [Discord](http://vapor.team)
- Published
- unknown
- Last Modified
- unknown
CVSS details not available.
No product information available.
No linked vulnerabilities found.
{
"affected": [
{
"database_specific": {
"last_known_affected_version_range": "<= 4.40.0",
"source": "https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2023/06/GHSA-gcj9-jj38-hwmc/GHSA-gcj9-jj38-hwmc.json"
},
"package": {
"ecosystem": "SwiftURL",
"name": "github.com/vapor/vapor",
"purl": "pkg:swift/github.com/vapor/vapor"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "4.40.1"
}
],
"type": "SEMVER"
}
]
}
],
"aliases": [
"CVE-2021-21328"
],
"database_specific": {
"cwe_ids": [
"CWE-400"
],
"github_reviewed": true,
"github_reviewed_at": "2023-06-09T19:31:47Z",
"nvd_published_at": "2021-02-26T02:15:00Z",
"severity": "MODERATE"
},
"details": "### 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)",
"id": "GHSA-gcj9-jj38-hwmc",
"modified": "2026-07-08T06:29:57.342242743Z",
"published": "2023-06-09T19:31:47Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/vapor/vapor/security/advisories/GHSA-gcj9-jj38-hwmc"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2021-21328"
},
{
"type": "WEB",
"url": "https://github.com/vapor/vapor/commit/e3aa712508db2854ac0ab905696c65fd88fa7e23"
},
{
"type": "WEB",
"url": "https://github.com/vapor/vapor"
},
{
"type": "WEB",
"url": "https://github.com/vapor/vapor/releases/tag/4.40.1"
},
{
"type": "WEB",
"url": "https://vapor.codes"
}
],
"schema_version": "1.9.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L",
"type": "CVSS_V3"
}
],
"summary": "Vapor's Metrics integration could cause a system drain"
}