{"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-31019 exists.","fix":"Upgrade github.com/vapor/vapor to 4.61.1 or later.","what":"CVE-2022-31019 is a high-severity denial of service vulnerability in vapor, published on 6 Jun 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-31019 and fix it if it is affected.\n\nWhat it is: CVE-2022-31019 is a high-severity denial of service vulnerability in vapor, published on 6 Jun 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-31019 exists.\n\nAffected packages and fixed versions:\n- github.com/vapor/vapor (SwiftURL): affected all versions; fixed in 4.61.1\n- github.com/vapor/vapor (SwiftURL): affected all versions; fixed in 4.61.1\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-31019/ (Markdown: https://insights.sbomify.com/CVE-2022-31019/index.md)","id":"CVE-2022-31019","markdown":"https://insights.sbomify.com/CVE-2022-31019/index.md","name":"CVE-2022-31019","record":{"aliases":["GHSA-qvxg-wjxc-r4gg"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["denial_of_service"],"network_reachable":"yes","non_default_config":false,"product_category":"Swift web framework","requires_auth":"none","summary":"An attacker can crash the Vapor server by sending a crafted request with deeply nested array structures, causing a stack overflow.","user_interaction":"not_required","vuln_class":"denial_of_service"},"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-674","name":"Uncontrolled Recursion"},{"id":"CWE-120","name":"Buffer Copy without Checking Size of Input"}],"description":"Vapor is a server-side Swift HTTP web framework. When using automatic content decoding an attacker can craft a request body that can make the server crash with the following request: `curl -d \"array[_0][0][array][_0][0][array]$(for f in $(seq 1100); do echo -n '[_0][0][array]'; done)[string][_0]=hello%20world\" http://localhost:8080/foo`. The issue is unbounded, attacker controlled stack growth which will at some point lead to a stack overflow and a process crash. This issue has been fixed in version 4.61.1.","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":"DoS Vulnerability in URLEncodedFormDecoder in Vapor","id":"CVE-2022-31019","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"SwiftURL","product":null,"products":[],"type":"denial_of_service","year":"2022"},"n_packages":2,"n_references":2,"next":{"headline":"Remote code execution in Indy's NODE_UPGRADE transaction","id":"CVE-2022-31020"},"packages":[{"ecosystem":"SwiftURL","fixed":["4.61.1"],"introduced":["0"],"last_affected":[],"package":"github.com/vapor/vapor","purl":null,"source":"GHSA-qvxg-wjxc-r4gg"},{"ecosystem":"SwiftURL","fixed":["4.61.1"],"introduced":["0"],"last_affected":[],"package":"github.com/vapor/vapor","purl":"pkg:swift/github.com/vapor/vapor","source":"GHSA-qvxg-wjxc-r4gg"}],"prev":{"headline":"Denial of service binding form from JSON in Play Framework","id":"CVE-2022-31018"},"products":["vapor"],"published":"2022-06-06","related":[{"cvss_score":7.5,"headline":"Integer Overflow in Vapor's HTTP Range Request","id":"CVE-2022-31005","kev_date_added":null,"published":"2022-05-31"},{"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 attacker can crash the Vapor server by sending a crafted request with deeply nested array structures, causing a stack overflow.","url":"https://insights.sbomify.com/CVE-2022-31019/"}