{"id":"CVE-2022-31005","aliases":["CVE-2022-31005","GHSA-vj2m-9f5j-mpr5"],"related":[],"kind":"vulnerability","state":"published","title":"Integer Overflow in Vapor's HTTP Range Request","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"Vapor is an HTTP web framework for Swift and [middleware](https://docs.vapor.codes/advanced/middleware/) is a logic chain between the client and a Vapor route handler. [FileMiddleware](https://docs.vapor.codes/advanced/middleware/#file-middleware) enables the serving of assets from the Public folder of a project to the client. \n\nVapor 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.","format":"markdown","source":"ghsa"},{"lang":"es","text":"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","source":"nvd"}],"published":"2022-05-31T19:35:11.000Z","modified":"2026-06-17T04:44:35.423Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5,"rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5,"rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:2.0","vector":"AV:N/AC:L/Au:N/C:N/I:N/A:P","score":5,"rating":"MEDIUM"}],"cwes":["CWE-190"],"affected":[{"ranges":[{"version":"< 4.60.3","status":"affected"}],"vendor":"vapor","product":"vapor","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"4.60.3"}],"ecosystem":"SwiftURL","package":"github.com/vapor/vapor","purl":"pkg:swift/github.com/vapor/vapor","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"4.60.3"}],"vendor":"vapor","product":"vapor","cpe":"cpe:2.3:a:vapor:vapor:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://github.com/vapor/vapor/security/advisories/GHSA-vj2m-9f5j-mpr5","tags":["exploit","third-party-advisory","web","x-refsource-confirm","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/vapor/vapor/commit/953a349b539b3e0d3653585c8ffb50c427986df1","tags":["patch","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/vapor/vapor/releases/tag/4.60.3","tags":["release-notes","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2022-31005","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/vapor/vapor","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"yes","technicalImpact":"partial","date":"2025-04-22T15:41:04.527Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2022-31005","url":"https://www.cve.org/CVERecord?id=CVE-2022-31005","licence":"CVE Terms of Use","modified":"2025-04-22T17:55:35.387Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-vj2m-9f5j-mpr5","url":"https://github.com/advisories/GHSA-vj2m-9f5j-mpr5","licence":"CC-BY-4.0","modified":"2023-11-08T04:09:22.231Z"},{"source":"nvd","name":"NVD","id":"CVE-2022-31005","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-31005","licence":"Public domain","modified":"2026-06-17T04:44:35.423Z"}],"updatedAt":"2026-11-25T22:58:12.014Z","epss":{"score":0.02108,"percentile":0.82302,"date":"2026-12-01T12:00:22.000Z"}}