Security Resilience

CVE-2024-21631

Memory Safety in Vapor ≤ 4.90.0

Published
03 January 2024
Modified
17 June 2026
Patch / advisory
CVSS Score v3.1 6.5
Click a component to see what it means
Raw vectorCVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N
EPSS Score 0.0060 50th percentile
Risk Priority 51 floored blend · peak EPSS

CVSS and EPSS are reproduced from their sources (NVD, FIRST EPSS). EPSS, Forum of Incident Response and Security Teams (FIRST), epss.first.org. Risk Priority is our own derived reading, not an NVD score.

Summary

CVE-2024-21631 is a medium-severity Improper Input Validation (CWE-20) vulnerability in Vapor. Its CVSS base score is 6.5 (Medium).

Operationally, exploitation aligns with the MITRE ATT&CK technique Endpoint Denial of Service (T1499); ranked at the 50th percentile by exploit likelihood (below the median); it is not currently listed in the CISA KEV catalog.

The strongest mitigations our analysis identified map to SA-11 (Developer Testing and Evaluation) and SA-22 (Unsupported System Components) — see the control section below for these in your framework.

OWASP Top 10 for Web (2025)

EU & UK References

Vulnerability Data

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…

more

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.

CWE(s)

Related Threats

MITRE ATT&CK Enterprise Techniques

MITRE ATT&CK v20.0

T1499 Endpoint Denial of Service Impact
Adversaries may perform Endpoint Denial of Service (DoS) attacks to degrade or block the availability of services to users.
T1499.004 Application or System Exploitation Impact
Adversaries may exploit software vulnerabilities that can cause an application or system to crash and deny availability to users.
T1068 Exploitation for Privilege Escalation Privilege Escalation
Adversaries may exploit software vulnerabilities in an attempt to elevate privileges.
T1189 Drive-by Compromise Initial Access
Adversaries may gain access to a system through a user visiting a website over the normal course of browsing.
T1190 Exploit Public-Facing Application Initial Access
Adversaries may attempt to exploit a weakness in an Internet-facing host or system to initially access a network.
T1195 Supply Chain Compromise Initial Access
Adversaries may manipulate products or product delivery mechanisms prior to receipt by a final consumer for the purpose of data or system compromise.
Derived from this CVE’s CWE(s) via the direct CWE→ATT&CK cross-walk.

CVEs Like This One

CVE-2023-2914Shared CWE-190, CWE-20
CVE-2026-24403Shared CWE-190, CWE-20
CVE-2026-69934Shared CWE-190, CWE-20
CVE-2026-35433Shared CWE-190, CWE-20
CVE-2024-5171Shared CWE-190, CWE-20
CVE-2026-70581Shared CWE-190, CWE-20
CVE-2025-40906Shared CWE-1104, CWE-190
CVE-2026-21688Shared CWE-190, CWE-20
CVE-2023-0615Shared CWE-190, CWE-20
CVE-2023-35372Shared CWE-190

Affected Assets

vapor
vapor
≤ 4.90.0

Mitigating Controls

Control response

Prevent
Stop it (NIST 800-53)

—

Detect
Catch it (NIST detect / respond)

—

Harden
Shrink the surface (DISA STIG)
  • 1 hardening rule · 1 OS baseline
Validate
Prove the fix (OWASP ASVS)
  • V15.1.2
  • V5.2.6

Mitigating Controls (NIST 800-53 r5)

Our mappings, made for this CVE.

SA-22 directly requires replacing components once vendor support ends, structurally preventing reliance on unmaintained third-party code.

Developer testing and evaluation can discover missing input validation through analysis or test cases.

SI-10 directly requires validity checks on information inputs, structurally preventing improper or missing validation.

Requiring documented development standards and tools can embed input-validation practices into the engineering process.

Secure engineering principles require use of safe arithmetic constructs or language features that structurally eliminate integer overflow during calculation.

Mitigating Controls (NIST CSF 2.0)

Our mappings, derived directly from the weakness types (CWEs) cited in the NVD entry via our CWE→CSF cross-walk — links open the control.

PR.PS-06 mostly match
blocks

Secure SDLC practices directly require use of safe arithmetic, bounds checks, and testing that prevent integer overflows.

GV.RM-04 partial match
blocks

GV.RM-04's high-level risk-response criteria can indirectly discourage unmaintained third-party use via policy, but alone removes none of the concrete supply-chain or maintenance decisions that produce CWE-1104.

Mitigating Controls (ISO/IEC 27001:2022 Annex A)

Our mappings, derived directly from the weakness types (CWEs) cited in the NVD entry via our CWE→ISO cross-walk — links open the control.

finds

A.5.21's supply chain programme requires suppliers to disclose component information (item d), tracks component lifecycle and end-of-availability risks (item m), and identifies critical components requiring scrutiny (item g) — a well-implemented programme builds a component inventory with maintenance status that surfaces most unmaintained third-party components, with a bounded remainder (sub-components the prime supplier does not track, status changes the supplier fails to notify).

finds

Testing against a defined set of requirements and using code review plus vulnerability scanning forces validation of inputs and handling of unanticipated conditions, reducing the chance that malformed data will be accepted.

prevents

A.5.19's supplier evaluation and selection processes (b, c, e, f) can require maintenance status as a criterion, keeping some unmaintained components out at procurement; but the clause governs the supplier relationship framework, not the technical decision to use a specific component, so an organization under it can still acquire unmaintained components within an otherwise-approved supplier's offerings or through channels the relationship processes don't reach.

finds

A.5.22's monitoring of supplier relationships can surface unmaintained components through supplier disclosures (end-of-life announcements, change notifications under items b/c), audits (item e), and review of supplier reports (item d), but its reach is disclosure-based and bounded by what the supplier relationship surfaces — it has no source-level or runtime reach into the supplier's components, so unmaintained components that are not formally announced or caught in audit remain invisible, leaving a large unnamed remainder.

prevents

Requiring language-specific secure coding standards, peer review, SAST and documented mitigation of common programming errors forces validation of all inputs before they are trusted.

Hardening callouts derived

Configuration rules from DISA STIG baselines that bear on weaknesses of the type cited by this CVE. Each rule is shown with the relationship its mapping actually records, against the CWE it was authored against. Derived via CVE→CWE over our cross-walk; rows rated `none` are excluded, and each rule says how its mapping was checked.

Definition changed on 29 October 2026. Until then this section listed every rule rated above none, partial included. From that date it lists rules whose mapping is rated full or mostly and checked at llm_unverified or higher; partial mappings show when you ask.

No rule maps to these weaknesses at full or mostly. Tick the option above to see the partial mappings.

Oracle Linux 8 (1 partial rule)
  • V-248521 OL 8 must be a vendor-supported release. blocks CWE-1104

References