
Cloud Vulnerability DB
A community-led vulnerabilities database
CVE-2024-21631 affects Vapor, an HTTP web framework for Swift, in versions prior to 4.90.0. The vulnerability exists in the vapor_urlparser_parse function which uses uint16_t indexes when parsing URI components, potentially causing integer overflows when processing untrusted inputs (Vendor Advisory).
The vulnerability stems from the use of 16-bit integers (uint16_t) for string range indexing in URI parsing. When parsing abnormally long URLs, particularly in the port number section, the integer overflow can occur during URL authority parsing. The vulnerability has been assigned a CVSS v3.1 base score of 6.5 (Medium) with the vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N (NVD).
While this vulnerability doesn't directly affect Vapor's core functionality, it can impact applications that rely on the URI type for validating user input. An attacker could potentially exploit this vulnerability to trick an application into accepting URLs to untrusted destinations through host spoofing. This is achieved by manipulating port numbers with padding zeros to trigger integer overflow during URL authority parsing (Vendor Advisory).
The vulnerability has been patched in Vapor version 4.90.0. For users unable to update immediately, two workarounds are recommended: 1) Validate user input before parsing as a URI, or 2) Use Foundation's URL and URLComponents utilities instead of Vapor's URI parser (Vendor Advisory).
Source: This report was generated using AI
Free Vulnerability Assessment
Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.
Get a personalized demo
"Best User Experience I have ever seen, provides full visibility to cloud workloads."
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
"We know that if Wiz identifies something as critical, it actually is."