CVE-2022-21223 is a high-severity (CVSS 8.1) CWE-88 vulnerability in cocoapods-downloader. A fix is available for cocoapods-downloader — see the affected versions and patch details below.
Command Injection
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
Where this sits among everything scored
Real-World Exposure
cocoapods-downloaderReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects RubyGems packages — download data is not available via public APIs for these ecosystems.
Description
The package cocoapods-downloader before 1.6.2 are vulnerable to Command Injection via hg argument injection. When calling the download function (when using hg), the url (and/or revision, tag, branch) is passed to the hg clone command in a way that additional flags can be set. The additional flags can be used to perform a command injection.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 💎RubyGems | cocoapods-downloader | all versions | 1.6.2bundle update cocoapods-downloader --conservative |
Affected Products
cocoapods-downloadercocoapodsDetection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for cocoapods-downloader, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update cocoapods-downloader to 1.6.2 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2022-21223 is resolved across your whole dependency graph.
Workarounds
Stop passing untrusted input into the interpreter or shell: call the affected binary with an argument array rather than a composed command string, reject anything outside a strict allowlist of expected values, and run the component under an account that cannot reach beyond the work it legitimately does.
Frequently Asked Questions
Is CVE-2022-21223 in your dependencies?
Find it across RubyGems, including transitive dependencies.