What’s Vulnerable › Vulnerabilities
CVE-2024-38366: CoacoaPods trunk RCE in email verification system rfc-822
- Severity: critical (CVSS 10.0 v3.1)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 17.8% probability of exploitation in the next 30 days
- Public exploit or detection template: yes
- Published: 2024-07-01 · updated 2026-06-17
- Weakness: CWE-74
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.
Affected products
- CocoaPods: before 2023-09-22 — fixed in 2023-09-22
How to fix
Upgrade to a fixed version: CocoaPods 2023-09-22. Check the vendor advisory for mitigations.
References
- https://blog.cocoapods.org/CocoaPods-Trunk-RCEs-2023
- https://evasec.webflow.io/blog/eva-discovered-supply-chain-vulnerabities-in-cocoapods#2-remote-code-execution-on-the-cocoapods-trunk-server
- https://github.com/CocoaPods/CocoaPods/security/advisories/GHSA-x2x4-g675-qg7c
- https://blog.cocoapods.org/CocoaPods-Trunk-RCEs-2023
- https://evasec.webflow.io/blog/eva-discovered-supply-chain-vulnerabities-in-cocoapods#2-remote-code-execution-on-the-cocoapods-trunk-server
- https://github.com/CocoaPods/CocoaPods/security/advisories/GHSA-x2x4-g675-qg7c
Get alerted when CVE-2024-38366 or the next vulnerability affects your stack