{"id":"CVE-2022-31005","aliases":["EUVD-2023-1891","GHSA-vj2m-9f5j-mpr5"],"status":"published","title":"Integer Overflow in Vapor's HTTP Range Request","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.","severity":{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high","assessor":"cna","from":"cve"},"epss":{"day":"2026-11-10","score":0.02108,"percentile":0.81923,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-190"],"published":"2022-05-31T19:35:11Z","modified":"2026-10-28T02:31:02Z","fixes":[{"ecosystem":"SwiftURL","package":"github.com/vapor/vapor","fixed_in":["4.60.3"],"sources":["ghsa","osv"]}],"affected":[{"source":"ghsa","ecosystem":"SwiftURL","package":"github.com/vapor/vapor","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"4.60.3"}]}]},{"source":"osv","ecosystem":"SwiftURL","package":"github.com/vapor/vapor","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"4.60.3"}]}]}],"products":[{"vendor":"vapor","product":"vapor"}],"references":[{"url":"https://github.com/vapor/vapor/security/advisories/GHSA-vj2m-9f5j-mpr5","tags":["x_refsource_CONFIRM","x_transferred","Exploit","Third Party Advisory","advisory","web"]},{"url":"https://github.com/vapor/vapor/commit/953a349b539b3e0d3653585c8ffb50c427986df1","tags":["x_refsource_MISC","x_transferred","Patch","Third Party Advisory","fix","web"]},{"url":"https://github.com/vapor/vapor/releases/tag/4.60.3","tags":["x_refsource_MISC","x_transferred","Release Notes","Third Party Advisory","web"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2022-31005","tags":["advisory"]},{"url":"https://github.com/advisories/GHSA-vj2m-9f5j-mpr5"},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/31xxx/CVE-2022-31005.json","tags":["advisory"]},{"url":"https://github.com/vapor/vapor","tags":["package"]}],"sources":{"cve":[{"id":"CVE-2022-31005","title":"Integer Overflow in Vapor's HTTP Range Request","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.","status":"published","published":"2022-05-31T19:35:11Z","modified":"2025-04-22T17:55:35.387Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high","assessor":"cna"}],"cwes":["CWE-190"],"updated_at":"2026-11-02T14:34:35.279735Z"}],"euvd":[{"id":"EUVD-2023-1891","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.","status":"published","published":"2022-05-31T19:35:11Z","modified":"2025-04-22T17:55:35Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high"}],"updated_at":"2026-11-02T20:52:15.540112Z"}],"ghsa":[{"id":"GHSA-vj2m-9f5j-mpr5","title":"Vapor vulnerable to denial of service in HTTP Range Request of FileMiddleware","description":"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.","status":"published","published":"2023-06-07T16:26:25Z","modified":"2023-06-19T16:45:07Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high"}],"cwes":["CWE-190"],"updated_at":"2026-11-02T14:36:55.184601Z"}],"nvd":[{"id":"CVE-2022-31005","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.","status":"published","published":"2022-05-31T20:15:07.973Z","modified":"2026-06-17T04:44:35.423Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high","assessor":"secondary"},{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high","assessor":"primary"},{"version":"2.0","score":5,"vector":"AV:N/AC:L/Au:N/C:N/I:N/A:P","level":"medium","assessor":"primary"}],"cwes":["CWE-190"],"updated_at":"2026-11-02T14:07:21.261605Z"}],"osv":[{"id":"CVE-2022-31005","title":"Integer Overflow in Vapor's HTTP Range Request","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.","status":"published","published":"2022-05-31T19:35:11Z","modified":"2026-10-28T02:31:02.32796352Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high"}],"cwes":["CWE-190"],"updated_at":"2026-11-02T15:44:25.516981Z"},{"id":"GHSA-vj2m-9f5j-mpr5","title":"Vapor vulnerable to denial of service in HTTP Range Request of FileMiddleware","description":"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.","status":"published","published":"2023-06-07T16:26:25Z","modified":"2023-11-08T04:09:22.23181Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high"}],"cwes":["CWE-190"],"updated_at":"2026-11-02T15:46:57.348035Z"}]}}
