# CVE-2022-21223: Command Injection

- Severity: High 8.1 (CVSS:3.1, scored by snyk) `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 1.69%, higher than 77% of CVEs (2026-12-01)
- Published: 2022-04-01T17:35:21.022Z
- Modified: 2026-07-08T06:50:01.938Z
- Also known as: GHSA-g397-v4w5-4m79, SNYK-RUBY-COCOAPODSDOWNLOADER-2414280
- Weaknesses: CWE-74, CWE-88
- Assigned by: snyk

## 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.

(As written by CVE List.)

## Affected

- cocoapods-downloader: from unspecified before 1.6.2
- cocoapods-downloader (RubyGems): before 1.6.2
- cocoapods cocoapods-downloader: before 1.6.2

## Every score

- snyk: CVSS:3.1 8.1 High `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H`
- GitHub: CVSS:3.1 8.1 High `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H`
- NVD: CVSS:3.1 9.8 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- NVD: CVSS:2.0 7.5 High `AV:N/AC:L/Au:N/C:P/I:P/A:P`

## References

- <https://snyk.io/vuln/SNYK-RUBY-COCOAPODSDOWNLOADER-2414280> (third-party-advisory, web)
- <https://github.com/CocoaPods/cocoapods-downloader/pull/127> (patch, third-party-advisory, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2022-21223> (advisory)
- <https://github.com/CocoaPods/cocoapods-downloader> (package)
- <https://github.com/rubysec/ruby-advisory-db/blob/master/gems/cocoapods-downloader/CVE-2022-21223.yml> (web)

## Sources

- CVE List: [CVE-2022-21223](https://www.cve.org/CVERecord?id=CVE-2022-21223), CVE Terms of Use, modified 2024-09-17
- GitHub Advisory Database: [GHSA-g397-v4w5-4m79](https://github.com/advisories/GHSA-g397-v4w5-4m79), CC-BY-4.0, modified 2026-07-08
- NVD: [CVE-2022-21223](https://nvd.nist.gov/vuln/detail/CVE-2022-21223), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2022-21223 · Whole record: https://cve.day/CVE-2022-21223.json · Rebuilt by cve.day 2026-11-25T22:58:10.361Z
