July 1st, 2024

Apple CocoaPods Bugs Expose Apps to Code Injection

Millions of Apple apps face code injection risks from critical vulnerabilities in CocoaPods. E.V.A Information Security discovered three major flaws, including remote code execution. Developers are urged to address vulnerabilities promptly.

Read original articleLink Icon
Apple CocoaPods Bugs Expose Apps to Code Injection

Millions of Apple apps are at risk of code injection due to critical vulnerabilities in CocoaPods, a popular dependency manager used by developers in Apple's ecosystem. The platform, with over 100,000 libraries and three million apps, including popular ones like Instagram and Uber, has been exposed to serious bugs for years. E.V.A Information Security discovered three major vulnerabilities, with the most severe one allowing remote code execution. CocoaPods mishandled APIs since its 2014 migration, leaving thousands of pods orphaned and vulnerable to exploitation. An open-source component introduced in 2014 also posed a severe risk, allowing attackers to inject malicious code into pods. While there is no evidence of exploitation yet, the sheer number of at-risk pods over the past decade presents a significant supply chain risk. Developers are advised to take remediation steps, including checking for orphaned pods and reviewing dependencies thoroughly. Apple has been contacted for comment on the situation.

Link Icon 2 comments
By @isodev - 5 months
That's concerning of course and I'm also happy the vulnerabilities have been discovered and resolved.

Love them or hate them, CocoaPods are still essential when building apps for Apple platforms. There are entire ecosystems like Kotlin Multiplatform, Flutter and others that depend on cocoapods. Many good (but old) libraries are only available as pods (some still in objective-c or even c++).

CocoaPods also offer features which are difficult or even impossible with Swift Packages especially for distributing more complex binaries and frameworks. And not to mention the britle tooling around Swift Packages, slower build times etc. SPM is not bad but it needs more time and attention to mature before it's ready to fully take over.