{"answers":{"affected":"2 open source packages ship an affected version, including github.com/vapor/vapor. It affects 1 product.","exploited":"It is not confirmed as exploited in the wild, but public exploit code for CVE-2022-31005 exists.","fix":"Upgrade github.com/vapor/vapor to 4.60.3 or later.","what":"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."},"fix_prompt":"Check this codebase for CVE-2022-31005 and fix it if it is affected.\n\nWhat it is: 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.\nExploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2022-31005 exists.\n\nAffected packages and fixed versions:\n- github.com/vapor/vapor (SwiftURL): affected all versions; fixed in 4.60.3\n- github.com/vapor/vapor (SwiftURL): affected all versions; fixed in 4.60.3\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2022-31005/ (Markdown: https://insights.sbomify.com/CVE-2022-31005/index.md)","id":"CVE-2022-31005","markdown":"https://insights.sbomify.com/CVE-2022-31005/index.md","name":"CVE-2022-31005","record":{"aliases":["GHSA-vj2m-9f5j-mpr5"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["denial_of_service"],"network_reachable":"yes","non_default_config":true,"product_category":"Swift web framework","requires_auth":"none","summary":"An integer overflow in Vapor's FileMiddleware allows attackers to crash the application, requiring an upgrade or disabling the middleware.","user_interaction":"not_required","vuln_class":"integer_overflow"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"vapor","vendor":"vapor"}],"cvss":{"score":7.5,"severity":"high","source":"cna","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","version":"3.1"},"cwes":[{"id":"CWE-190","name":"Integer Overflow or Wraparound"}],"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.","ecosystems":["SwiftURL"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"weaponised"},"has_fix":true,"headline":"Integer Overflow in Vapor's HTTP Range Request","id":"CVE-2022-31005","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"SwiftURL","product":null,"products":[],"type":"integer_overflow","year":"2022"},"n_packages":2,"n_references":3,"next":{"headline":"Hyperledger Indy DOS vulnerability","id":"CVE-2022-31006"},"packages":[{"ecosystem":"SwiftURL","fixed":["4.60.3"],"introduced":["0"],"last_affected":[],"package":"github.com/vapor/vapor","purl":null,"source":"GHSA-vj2m-9f5j-mpr5"},{"ecosystem":"SwiftURL","fixed":["4.60.3"],"introduced":["0"],"last_affected":[],"package":"github.com/vapor/vapor","purl":"pkg:swift/github.com/vapor/vapor","source":"GHSA-vj2m-9f5j-mpr5"}],"prev":{"headline":"Potential secrets being logged to disk in CVE Services","id":"CVE-2022-31004"},"products":["vapor"],"published":"2022-05-31","related":[{"cvss_score":7.5,"headline":"DoS Vulnerability in URLEncodedFormDecoder in Vapor","id":"CVE-2022-31019","kev_date_added":null,"published":"2022-06-06"},{"cvss_score":6.5,"headline":"Integer overflow in URI leading to potential host spoofing","id":"CVE-2024-21631","kev_date_added":null,"published":"2024-01-03"},{"cvss_score":5.3,"headline":"Incorrect request error handling triggers server crash in Vapor","id":"CVE-2023-44386","kev_date_added":null,"published":"2023-10-05"}],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"yes","exploitation":"poc","technical_impact":"partial"},"state":"PUBLISHED","updated":"2025-04-22","vendors":["vapor"]},"summary":"An integer overflow in Vapor's FileMiddleware allows attackers to crash the application, requiring an upgrade or disabling the middleware.","url":"https://insights.sbomify.com/CVE-2022-31005/"}