CVEMETERBack to radar
OFFICIAL RECORD · Swift packages

CVE-2024-21631

PUBLISHEDOfficial status check: verifiedCVSS 3.1: 6.5 · medium

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_M
CVSS: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

FieldStatusChecked at (UTC)Source
kevverified2026-11-19T17:59:58.648ZCISA KEV
cvssverified2026-11-19T13:01:34.906ZCVE Program
epssverified2026-11-19T16:04:37.769ZFIRST EPSS
patchesverified2026-11-19T12:59:43.997ZOSV
affectedverified2026-11-19T13:01:34.906ZCVE Program
lifecycleverified2026-11-19T13:01:34.906ZCVE 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 JSON
OSV · 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 JSON

Correction 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 typeDistribution / releasePackageChannelVersion or source noteSource
ecosystem-boundarySwiftURL / packagegithub.com/vapor/vaporNot a distribution channel4.90.0Official record

Vendor notices and operational guidance

No connected vendor notice is available for this record.

Original sources and dates

Official status history