CVE-2024-21631
Integer overflow in URI leading to potential host spoofing
Vapor is an HTTP web framework for Swift. Prior to version 4.90.0, Vapor's `vapor_urlparser_parse` function uses `uint16_t` indexes when parsing a URI's components, which may cause integer overflows when parsing untrusted inputs. This vulnerability does not affect Vapor directly but could impact applications relying on the URI type for validating user input. The URI type is used in several places in Vapor. A developer may decide to use URI to represent a URL in their application (especially if that URL is then passed to the HTTP Client) and rely on its public properties and methods. However, URI may fail to properly parse a valid (albeit abnormally long) URL, due to string ranges being converted to 16-bit integers. An attacker may use this behavior to trick the application into accepting a URL to an untrusted destination. By padding the port number with zeros, an attacker can cause an integer overflow to occur when the URL authority is parsed and, as a result, spoof the host. Version 4.90.0 contains a patch for this issue. As a workaround, validate user input before parsing as a URI or, if possible, use Foundation's `URL` and `URLComponents` utilities.
Exposure status: unknown. This page does not establish whether an installed system is affected or corrected.
Severity and exploitation evidence
EPSS: 0.601% · score date 2026-11-19. EPSS is an estimated probability over the next 30 days, not proof of exploitation.
CISA KEV: not included in the checked catalog; exploitation may still occur. Last checked: 2026-11-19T17:59:58.648Z. Public exploit availability is not used to set this status.
CVSS 3.1 · 6.5 · published by GitHub_MCVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N
Assessment source · checked 2026-11-19T13:01:34.906Z
Verification by field
| Field | Status | Checked at (UTC) | Source |
|---|---|---|---|
| kev | verified | 2026-11-19T17:59:58.648Z | CISA KEV |
| cvss | verified | 2026-11-19T13:01:34.906Z | CVE Program |
| epss | verified | 2026-11-19T16:04:37.769Z | FIRST EPSS |
| patches | verified | 2026-11-19T12:59:43.997Z | OSV |
| affected | verified | 2026-11-19T13:01:34.906Z | CVE Program |
| lifecycle | verified | 2026-11-19T13:01:34.906Z | CVE Program |
Affected versions and configuration
vapor vapor; default status: unknown: < 4.90.0 [affected; scheme: unspecified]
Defaults, conditional configuration, package status and version schemes are retained below. A version range alone is not an exposure verdict.
CVE Program · cve-json · full conditions
{
"affected": [
{
"vendor": "vapor",
"product": "vapor",
"versions": [
{
"status": "affected",
"version": "< 4.90.0"
}
]
}
],
"additionalContainers": [
{
"title": "CVE Program Container",
"references": [
{
"url": "https://github.com/vapor/vapor/security/advisories/GHSA-r6r4-5pr8-gjcp",
"name": "https://github.com/vapor/vapor/security/advisories/GHSA-r6r4-5pr8-gjcp",
"tags": [
"x_refsource_CONFIRM",
"x_transferred"
]
},
{
"url": "https://github.com/vapor/vapor/commit/6db3d917b5ce5024a84eb265ef65691383305d70",
"name": "https://github.com/vapor/vapor/commit/6db3d917b5ce5024a84eb265ef65691383305d70",
"tags": [
"x_refsource_MISC",
"x_transferred"
]
}
],
"providerMetadata": {
"orgId": "af854a3a-2127-422b-91ae-364da2661108",
"shortName": "CVE",
"dateUpdated": "2024-08-01T22:27:35.780Z"
}
},
{
"title": "CISA ADP Vulnrichment",
"metrics": [
{
"other": {
"type": "ssvc",
"content": {
"id": "CVE-2024-21631",
"role": "CISA Coordinator",
"options": [
{
"Exploitation": "none"
},
{
"Automatable": "yes"
},
{
"Technical Impact": "partial"
}
],
"version": "2.0.3",
"timestamp": "2024-01-03T19:21:44.394603Z"
}
}
}
],
"affected": [
{
"cpes": [
"cpe:2.3:a:vapor:vapor:*:*:*:*:*:*:*:*"
],
"vendor": "vapor",
"product": "vapor",
"versions": [
{
"status": "affected",
"version": "0",
"lessThan": "4.90.0",
"versionType": "custom"
}
],
"defaultStatus": "unknown"
},
{
"cpes": [
"cpe:2.3:a:vapor:vapor:*:*:*:*:*:*:*:*"
],
"vendor": "vapor",
"product": "vapor",
"versions": [
{
"status": "affected",
"version": "pkg:swift/github.com/vapor/vapor@0",
"lessThan": "pkg:swift/github.com/vapor/[email protected]",
"versionType": "custom"
}
],
"defaultStatus": "unknown"
}
],
"providerMetadata": {
"orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
"shortName": "CISA-ADP",
"dateUpdated": "2024-09-18T17:28:33.910Z"
}
}
]
}Archived source JSONOSV · osv · full conditions
{
"id": "GHSA-r6r4-5pr8-gjcp",
"aliases": [
"CVE-2024-21631"
],
"affected": [
{
"ranges": [
{
"type": "SEMVER",
"events": [
{
"introduced": "0"
},
{
"fixed": "4.90.0"
}
]
}
],
"package": {
"name": "github.com/vapor/vapor",
"purl": "pkg:swift/github.com/vapor/vapor",
"ecosystem": "SwiftURL"
},
"versions": [],
"database_specific": {
"source": "https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2024/01/GHSA-r6r4-5pr8-gjcp/GHSA-r6r4-5pr8-gjcp.json",
"last_known_affected_version_range": "<= 4.89.3"
}
}
],
"severity": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N"
}
],
"upstream": [],
"withdrawn": null,
"references": [
{
"url": "https://github.com/vapor/vapor/security/advisories/GHSA-r6r4-5pr8-gjcp",
"type": "WEB"
},
{
"url": "https://nvd.nist.gov/vuln/detail/CVE-2024-21631",
"type": "ADVISORY"
},
{
"url": "https://github.com/vapor/vapor/commit/6db3d917b5ce5024a84eb265ef65691383305d70",
"type": "WEB"
},
{
"url": "https://github.com/vapor/vapor",
"type": "PACKAGE"
}
],
"relatedGitRanges": [],
"database_specific": {
"cwe_ids": [
"CWE-1104",
"CWE-190"
],
"severity": "MODERATE",
"github_reviewed": true,
"nvd_published_at": "2024-01-03T17:15:12Z",
"github_reviewed_at": "2024-01-03T21:44:35Z"
}
}Archived source JSONCorrection evidence
Distribution packages and upstream releases are distinct. ESM channels may require the corresponding Ubuntu entitlement. Notes and branch ranges are not installable package versions. OSV fixed boundaries are ecosystem-specific version thresholds, not proof that a package is currently available or installed.
| Evidence type | Distribution / release | Package | Channel | Version or source note | Source |
|---|---|---|---|---|---|
| ecosystem-boundary | SwiftURL / package | github.com/vapor/vapor | Not a distribution channel | 4.90.0 | Official record |
Vendor notices and operational guidance
No connected vendor notice is available for this record.
Original sources and dates
- CVE ProgramConsulted: 2026-11-19T13:01:34.906ZArchived source JSON
Source publication: 2024-01-03T16:55:02.356Z
Source modification: 2024-09-18T17:28:33.910ZDocument fingerprint
1c9cba134ab97554d518d6c8ca42bdebc255bb1ebf664e9d47f1a1d92c3ce34a - OSVConsulted: 2026-11-19T12:59:43.997ZArchived source JSON
Source publication: 2024-01-03T21:44:35.000Z
Source modification: 2026-09-10T03:50:05.126ZDocument fingerprint
c0f05e3d3c9e87345a9d225bd6180420dd43f32f8abcddafd01864ddbad15b44 - CISA KEVConsulted: 2026-11-19T17:59:58.648ZArchived source JSON
Source publication: not supplied
Source modification: 2026-11-18T19:17:41.0354ZDocument fingerprint
a35fdc67c7d9802988dcfc1d3ff1198da327948d1db122ab7692ac201055ac56 - FIRST EPSSConsulted: 2026-11-19T16:04:37.769ZArchived source JSON
Source publication: not supplied
Source modification: not suppliedDocument fingerprint
eeab810781addaf3718bffbbfbd9069ab904b94a362008ceb3a8de1b19f5ac77
Official status history
- UNKNOWN → PUBLISHED · · evidence