{"answers":{"affected":"It affects 1 product.","exploited":"There is no known exploitation of CVE-2022-3918 in the wild and no public exploit code.","fix":"No fix has been published for CVE-2022-3918 yet. Limit exposure of the affected software until one is available.","what":"CVE-2022-3918 is a high-severity vulnerability in Swift Foundation, published on 20 Jan 2023. Any signed-in user can exploit it over the network, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2022-3918 and fix it if it is affected.\n\nWhat it is: CVE-2022-3918 is a high-severity vulnerability in Swift Foundation, published on 20 Jan 2023. Any signed-in user can exploit it over the network, with no action from the victim.\nExploitation: There is no known exploitation of CVE-2022-3918 in the wild and no public exploit code.\n\nAffected product: Swift Foundation. No package-level version data is available, so check the vendor advisory linked from the reference page.\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-3918/ (Markdown: https://insights.sbomify.com/CVE-2022-3918/index.md)","id":"CVE-2022-3918","markdown":"https://insights.sbomify.com/CVE-2022-3918/index.md","name":"CVE-2022-3918","record":{"aliases":["GHSA-4pp3-mpf2-rj63"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["data_modify","security_bypass"],"network_reachable":"yes","non_default_config":false,"product_category":"Swift Foundation library","requires_auth":"low_privilege","summary":"Attackers can inject CRLF sequences into HTTP headers via swift-corelibs-foundation, potentially crafting extra requests or headers if user input is unsanitized.","user_interaction":"not_required","vuln_class":"other"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"Swift","cpe":[{"product":"swift_foundation","vendor":"apple"}],"cvss":{"score":8.8,"severity":"high","source":"cisa-adp","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","version":"3.1"},"cwes":[{"id":"CWE-74","name":"Improper Neutralization of Special Elements in Output Used by a Downstream Component"}],"description":"A program using FoundationNetworking in swift-corelibs-foundation is potentially vulnerable to CRLF ( ) injection in URLRequest headers. In this vulnerability, a client can insert one or several CRLF sequences into a URLRequest header value. When that request is sent via URLSession to an HTTP server, the server may interpret the content after the CRLF as extra headers, or even a second request. For example, consider a URLRequest to http://example.com/ with the GET method. Suppose we set the URLRequest header \"Foo\" to the value \"Bar Extra-Header: Added GET /other HTTP/1.1\". When this request is sent, it will appear to the server as two requests: GET / HTTP/1.1 Foo: Bar Extra-Header: Added GET /other HTTP/1.1 In this manner, the client is able to inject extra headers and craft an entirely new request to a separate path, despite only making one API call in URLSession. If a developer has total control over the request and its headers, this vulnerability may not pose a threat. However, this vulnerability escalates if un-sanitized user input is placed in header values. If so, a malicious user could inject new headers or requests to an intermediary or backend server. Developers should be especially careful to sanitize user input in this case, or upgrade their version of swift-corelibs-foundation to include the patch below.","ecosystems":[],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"none_known"},"has_fix":false,"headline":"Other in Swift Foundation","id":"CVE-2022-3918","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":null,"product":null,"products":[],"type":"other","year":"2022"},"n_packages":0,"n_references":1,"next":{"headline":"Jetpack CRM \u003c 5.4.3 - Admin+ Cross-Site Scripting","id":"CVE-2022-3919"},"packages":[],"prev":{"headline":"Information disclosure in Moto e20","id":"CVE-2022-3917"},"products":["Swift Foundation"],"published":"2023-01-20","related":[],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"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":"no","exploitation":"none","technical_impact":"total"},"state":"PUBLISHED","updated":"2025-04-02","vendors":["Swift Project"]},"summary":"Attackers can inject CRLF sequences into HTTP headers via swift-corelibs-foundation, potentially crafting extra requests or headers if user input is unsanitized.","url":"https://insights.sbomify.com/CVE-2022-3918/"}