{"answers":{"affected":"It affects 1 product.","exploited":"It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-38366 exists.","fix":"No fix has been published for CVE-2024-38366 yet. Limit exposure of the affected software until one is available.","what":"CVE-2024-38366 is a critical command injection vulnerability in CocoaPods, published on 1 Jul 2024. An attacker can exploit it over the internet without logging in, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2024-38366 and fix it if it is affected.\n\nWhat it is: CVE-2024-38366 is a critical command injection vulnerability in CocoaPods, published on 1 Jul 2024. 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-2024-38366 exists.\n\nAffected product: CocoaPods. 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-2024-38366/ (Markdown: https://insights.sbomify.com/CVE-2024-38366/index.md)","id":"CVE-2024-38366","markdown":"https://insights.sbomify.com/CVE-2024-38366/index.md","name":"CVE-2024-38366","record":{"aliases":["GHSA-x2x4-g675-qg7c"],"analysis":{"component_type":"server_software","fix_type":"patch","impacts":["code_execution","privilege_escalation"],"network_reachable":"yes","non_default_config":false,"product_category":"CocoaPods authentication server","requires_auth":"none","summary":"Attackers can execute arbitrary commands on the CocoaPods trunk server via email verification, gaining root access and modifying podspecs.","user_interaction":"not_required","vuln_class":"command_injection"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"trunk.cocoapods.org","vendor":"cocoapods"}],"cvss":{"score":10,"severity":"critical","source":"cna","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/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":"trunk.cocoapods.org is the authentication server for the CoacoaPods dependency manager. The part of trunk which verifies whether a user has a real email address on signup used a rfc-822 library which executes a shell command to validate the email domain MX records validity. It works via an DNS MX. This lookup could be manipulated to also execute a command on the trunk server, effectively giving root access to the server and the infrastructure. This issue was patched server-side with commit 001cc3a430e75a16307f5fd6cdff1363ad2f40f3 in September 2023. This RCE triggered a full user-session reset, as an attacker could have used this method to write to any Podspec in trunk.","ecosystems":[],"exploits":{"exploitdb":0,"first_seen":"2024-06-28","github_poc":1,"max_poc_stars":1,"metasploit":0,"nuclei":0,"refs":[{"date":"2024-06-28T13:11:28Z","kind":"github_poc","ref":"https://github.com/ReeFSpeK/CocoaPods-RCE_CVE-2024-38366","stars":1,"title":"CocoaPods RCE Vulnerability CVE-2024-38366"}],"tier":"weaponised"},"has_fix":false,"headline":"CoacoaPods trunk RCE in email verification system rfc-822","id":"CVE-2024-38366","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":null,"product":null,"products":[],"type":"command_injection","year":"2024"},"n_packages":0,"n_references":3,"next":{"headline":"CoacoaPods trunk sessions verification step could be manipulated for owner session hijacking","id":"CVE-2024-38367"},"packages":[],"prev":{"headline":"btcd did not correctly re-implement Bitcoin Core's \"FindAndDelete()\" functionality","id":"CVE-2024-38365"},"products":["CocoaPods"],"published":"2024-07-01","related":[{"cvss_score":9.3,"headline":"Trunk's 'Claim your pod' could be used to obtain un-used pods","id":"CVE-2024-38368","kev_date_added":null,"published":"2024-07-01"},{"cvss_score":8.2,"headline":"CoacoaPods trunk sessions verification step could be manipulated for owner session hijacking","id":"CVE-2024-38367","kev_date_added":null,"published":"2024-07-01"}],"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)"},{"class":"open","licence":"CC0","name":"PoC-in-GitHub"}],"ssvc":{"automatable":"no","exploitation":"poc","technical_impact":"total"},"state":"PUBLISHED","updated":"2024-08-02","vendors":["CocoaPods"]},"summary":"Attackers can execute arbitrary commands on the CocoaPods trunk server via email verification, gaining root access and modifying podspecs.","url":"https://insights.sbomify.com/CVE-2024-38366/"}