CVE-2022-31005
JSON

7.5high

Integer Overflow in Vapor's HTTP Range Request

Severity
7.5high CVSS:3.1 by GitHub_M
Exploit likelihood
2.11% (higher than 82% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-vj2m-9f5j-mpr5

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.

Affected

Product or packageVersionsReported by
vapor vapor< 4.60.3, before 4.60.3CVE List, NVD
github.com/vapor/vapor (SwiftURL)before 4.60.3GitHub Advisory Database

All scores

GitHub_M7.5high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
GitHub7.5high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
NVD7.5high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
NVD5.0medium CVSS:2.0AV:N/AC:L/Au:N/C:N/I:N/A:P

Classification

CWE-190

SSVC (CISA-ADP): exploitation poc, automatable yes, technical impact partial.

What each source says

CVE List

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.

GitHub Advisory Database

Vapor is an HTTP web framework for Swift and middleware is a logic chain between the client and a Vapor route handler. FileMiddleware enables the serving of assets from the Public folder of a project to the client.

Vapor before 4.60.3 is vulnerable to denial of service due to an integer overflow when given invalid range headers while using FileMiddleware. This is patched in 4.60.3.

NVD (es)

Vapor es un framework web HTTP para Swift. Los usuarios de Vapor anteriores a la versión 4.60.3 con FileMiddleware activado son vulnerables a una vulnerabilidad de desbordamiento de enteros que puede bloquear la aplicación. La versión 4.60.3 contiene un parche para este problema. Como solución, desactive FileMiddleware y sirva a través de una red de distribución de contenidos

References

Sources

SourceRecordLicence
CVE ListCVE-2022-31005 changed 2025-04-22CVE Terms of Use
GitHub Advisory DatabaseGHSA-vj2m-9f5j-mpr5 changed 2023-11-08CC-BY-4.0
NVDCVE-2022-31005 changed 2026-06-17Public domain