CVE-2024-21631
No exploitation reported by the sources we read.
- Published2024-01-03
- Fixed inpkg:swift/github.com/vapor/vapor@4.90.0 · 4.90.0
- WeaknessCWE-1104 · CWE-190 · CWE-20
Am I affected?
Debian, Ubuntu or Red Hat sometimes backport a fix without changing the upstream version number: such a version reads « to verify », never « affected ».With a domain, we read the version its public headers and pages expose. A distribution build can carry the fix under an older number.
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.
Timeline
dates in UTC- 2024-01-0317:15CVE publishedNVD
Versions per branch
CISA-ADP · NVD · OSV| Branch | Affected | Fixed in | Source |
|---|---|---|---|
| — | ≥ pkg:swift/github.com/vapor/vapor@0, < pkg:swift/github.com/vapor/vapor@4.90.0 | pkg:swift/github.com/vapor/vapor@4.90.0 | CISA-ADP |
| 4.90 | < 4.90.0 | 4.90.0 | NVD · CISA-ADP · OSV |
as publishedRanges as NVD and OSV publish them; a distribution’s build can be fixed under an older number.
Products declared by the CNA1 product
As GitHub_M, the CNA that assigned this CVE, declared them in the CVE record; versions as written.
- vaporAffected
- = < 4.90.0no fix stated
Source: the CNA record (CVE Program), © The MITRE Corporation,CVE Terms of UseCVE recordupdated 2024-01-03
Fix
- Update Vapor to pkg:swift/github.com/vapor/vapor@4.90.0 · 4.90.0
Advisories and patches
- github.comPatch
- github.comVendor Advisory
Detection
- Nuclei template
- none so far ProjectDiscovery
- Exploit-DB
- no entry Exploit-DB
- Proof of concept
- PoC-in-GitHubno public repository identifiedread 2026-11-08
- Metasploit modules
- none listed Metasploit Framework
Sources
- CISA-ADPSSVC decisionnone2024-01-03
- CNACVSS 3.16.5known since 2026-10-23
- NVDCVSS 3.16.5read 2026-10-23
- CNAweakness (CWE)CWE-1104, CWE-190, CWE-20known since 2026-10-23
- NVDweakness (CWE)CWE-190read 2026-10-23
- FIRST EPSSEPSS score0.6 %2026-11-08
- OSVaffected packages—
- GitHub AdvisoriesadvisoryMODERATE2024-01-03
Identifiers
- EUVD-2024-0412same flawENISA EUVD · LicenseRef-ENISA-legal-notice
- GHSA-r6r4-5pr8-gjcpsame flawGitHub Advisory Database · CC-BY-4.0
Technical details
- CVSS v3 Vector
- CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N
- Published
- 2024-01-03
- Last Modified
- 2026-06-17
- NVD status
- Modified
- GitHub Advisory
- GHSA-r6r4-5pr8-gjcp
Frequently asked questions
What is CVE-2024-21631?
Is CVE-2024-21631 actively exploited?
What is the CVSS score for CVE-2024-21631?
Running github.com/vapor/vapor? Hear about its next vulnerability
Surveillance reads the versions in your stack — a domain, a lockfile or a list — checks each CVE against the ranges its sources publish, and alerts you when one you run is exploited or enters CISA KEV. A version it cannot read stays « version not verified ».
No credit card required · No monthly cap on website lookups · 250 API requests/month
Go further
- Following what attackers exploit right now? The CISA KEV additions of the month, with their patch deadlines.
- Running this software? Vulnerability monitoring alerts you to new vulnerabilities in your products.
Related vulnerabilities
Same product first, then the same vendor advisory and the same publication week.
Sources for this record
- CVE Program · CVE Program Terms of Use
- ENISA EU Vulnerability Database · ENISA legal notice §1.2 (reproduction authorised, provided the source is acknowledged)
- FIRST EPSS · EPSS terms of use (free use, attribution requested)
- GitHub Advisory Database · CC-BY-4.0 · GHSA-r6r4-5pr8-gjcp
- NVD · Public domain (17 U.S.C. § 105) for NVD-authored data; third-party content under its own terms
- OSV.dev · Per record, as its publisher states it: each row carries the label in sourceLicense when one is served
- CISA Vulnrichment · CC0-1.0