CVE-2022-31005 Integer Overflow in Vapor's HTTP Range Request
An integer overflow in Vapor's FileMiddleware allows attackers to crash the application, requiring an upgrade or disabling the middleware.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2022-31005?
CVE-2022-31005 is a high-severity vulnerability in vapor, published on 31 May 2022. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
Vapor is an HTTP web framework for Swift. Users of Vapor prior to version 4.60.3 with FileMiddleware enabled are vulnerable to an integer overflow vulnerability that can crash the application. Version 4.60.3 contains a patch for this issue. As a workaround, disable FileMiddleware and serve via a Content Delivery Network.
Weakness: CWE-190
Which versions are affected by CVE-2022-31005?
2 open source packages ship an affected version, including github.com/vapor/vapor. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
github.com/vapor/vapor SwiftURL | All versions | 4.60.3 |
github.com/vapor/vapor SwiftURL | All versions | 4.60.3 |
Products include Vapor Vapor.
How do I fix CVE-2022-31005?
Upgrade github.com/vapor/vapor to 4.60.3 or later.
Is CVE-2022-31005 being exploited?
It is not confirmed as exploited in the wild, but public exploit code for CVE-2022-31005 exists.
Other vulnerabilities in vapor
Sources
Also known as GHSA-vj2m-9f5j-mpr5.