CVE-2024-21631
Vapor URI Type Integer Overflow Spoofing
Description
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.
INFO
Published Date :
Jan. 3, 2024, 5:15 p.m.
Last Modified :
Jan. 10, 2024, 6:40 p.m.
Source :
[email protected]
Remotely Exploitable :
Yes !
Impact Score :
3.6
Exploitability Score :
2.8
References to Advisories, Solutions, and Tools
Here, you will find a curated list of external links that provide in-depth
information, practical solutions, and valuable tools related to
CVE-2024-21631
.
URL | Resource |
---|---|
https://github.com/vapor/vapor/commit/6db3d917b5ce5024a84eb265ef65691383305d70 | Patch |
https://github.com/vapor/vapor/security/advisories/GHSA-r6r4-5pr8-gjcp | Vendor Advisory |
We scan GitHub repositories to detect new proof-of-concept exploits. Following list is a collection of public exploits and proof-of-concepts, which have been published on GitHub (sorted by the most recently updated).
Results are limited to the first 15 repositories due to potential performance issues.
The following list is the news that have been mention
CVE-2024-21631
vulnerability anywhere in the article.
The following table lists the changes that have been made to the
CVE-2024-21631
vulnerability over time.
Vulnerability history details can be useful for understanding the evolution of a vulnerability, and for identifying the most recent changes that may impact the vulnerability's severity, exploitability, or other characteristics.
-
CVE Modified by [email protected]
May. 14, 2024
Action Type Old Value New Value -
Initial Analysis by [email protected]
Jan. 10, 2024
Action Type Old Value New Value Added CVSS V3.1 NIST AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N Changed Reference Type https://github.com/vapor/vapor/commit/6db3d917b5ce5024a84eb265ef65691383305d70 No Types Assigned https://github.com/vapor/vapor/commit/6db3d917b5ce5024a84eb265ef65691383305d70 Patch Changed Reference Type https://github.com/vapor/vapor/security/advisories/GHSA-r6r4-5pr8-gjcp No Types Assigned https://github.com/vapor/vapor/security/advisories/GHSA-r6r4-5pr8-gjcp Vendor Advisory Added CWE NIST CWE-190 Added CPE Configuration OR *cpe:2.3:a:vapor:vapor:*:*:*:*:*:*:*:* versions up to (excluding) 4.90.0 -
CVE Received by [email protected]
Jan. 03, 2024
Action Type Old Value New Value Added Description 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. Added Reference GitHub, Inc. https://github.com/vapor/vapor/security/advisories/GHSA-r6r4-5pr8-gjcp [No types assigned] Added Reference GitHub, Inc. https://github.com/vapor/vapor/commit/6db3d917b5ce5024a84eb265ef65691383305d70 [No types assigned] Added CWE GitHub, Inc. CWE-190 Added CWE GitHub, Inc. CWE-1104 Added CWE GitHub, Inc. CWE-20 Added CVSS V3.1 GitHub, Inc. AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N
CWE - Common Weakness Enumeration
While CVE identifies
specific instances of vulnerabilities, CWE categorizes the common flaws or
weaknesses that can lead to vulnerabilities. CVE-2024-21631
is
associated with the following CWEs:
Common Attack Pattern Enumeration and Classification (CAPEC)
Common Attack Pattern Enumeration and Classification
(CAPEC)
stores attack patterns, which are descriptions of the common attributes and
approaches employed by adversaries to exploit the CVE-2024-21631
weaknesses.
Exploit Prediction
EPSS is a daily estimate of the probability of exploitation activity being observed over the next 30 days.
0.04 }} 0.00%
score
0.10443
percentile