argo-cd: Argo CD: A Kustomize remote ref can run commands in the repo-server
What fixes it
- 3.3.15github.com/argoproj/argo-cd/v3, GoOSV
go get github.com/argoproj/argo-cd/v3@v3.3.15 - 3.4.10github.com/argoproj/argo-cd/v3, GoOSV
go get github.com/argoproj/argo-cd/v3@v3.4.10 - 3.5.4github.com/argoproj/argo-cd/v3, GoOSV
go get github.com/argoproj/argo-cd/v3@v3.5.4 - 3.6.0-rc2github.com/argoproj/argo-cd/v3, GoOSV
go get github.com/argoproj/argo-cd/v3@v3.6.0-rc2
A fixed version on one release line is not the upgrade target for every line. Check your exact version and any vendor backports.
Description
Argo CD is a declarative, GitOps continuous delivery tool for Kubernetes. From 2.7.0 until 3.3.15, 3.4.10, 3.5.4, and 3.6.0-rc2, Kustomize passes ref or version query values from remote resource, base, or component URLs to git fetch without an end-of-options separator. A leading-hyphen value can be parsed as --upload-pack and execute a command inside argocd-repo-server when the remote uses a local transport such as file://. Git does not run the supplied command for an https:// remote. The local transport does not leave the pod, so blocking repo-server egress does not prevent the execution. The command runs as the repo-server user, can read repository credentials and other process-accessible data, and can return output through manifest-generation errors. An attacker can commit a Kustomization to a Git repository that an Application builds or upload files through POST /api/v1/applications/manifestsWithFiles, also exposed by argocd app diff --local --server-side-generate. The upload path requires only Application get permission on an existing Application, without Application update or sync permission or repository write access. Kustomize 5.0.0 introduced acceptance of file://, whereas 4.5.7 rejects that transport; replacing the affected Kustomize with a newer version alone does not correct the missing option separator. This issue is fixed in versions 3.3.15, 3.4.10, 3.5.4, and 3.6.0-rc2.
Text from CVE List
Affected versions 10
- argo-cdaffected: >= 2.7.0, < 3.3.15CVE List
- argo-cdaffected: >= 3.4.0-rc1, < 3.4.10CVE List
- argo-cdaffected: >= 3.5.0-rc1, < 3.5.4CVE List
- argo-cdaffected: >= 3.6.0-rc1, < 3.6.0-rc2CVE List
- github.com/argoproj/argo-cd/v2, Gofrom 2.11.0, through 2.14.21OSV
- github.com/argoproj/argo-cd/v3, Gofrom 3.0.0, fixed in 3.3.15OSV
- github.com/argoproj/argo-cd/v3, Gofrom 3.4.0, fixed in 3.4.10OSV
- github.com/argoproj/argo-cd/v3, Gofrom 3.5.0, fixed in 3.5.4OSV
- github.com/argoproj/argo-cd/v3, Gofrom 3.6.0-rc1, fixed in 3.6.0-rc2OSV
- github.com/argoproj/argo-cd/v3, Go3.6.0-rc1OSV
References 9
- github.com/argoproj/argo-cd/commit/25badeb7a1e154805340bb7237e0ce671f3772ddFixvia CVE List
- github.com/argoproj/argo-cd/releases/tag/v3.3.15Fixvia CVE List
- github.com/argoproj/argo-cd/releases/tag/v3.4.10Fixvia CVE List
- github.com/argoproj/argo-cd/releases/tag/v3.5.4Fixvia CVE List
- github.com/argoproj/argo-cd/releases/tag/v3.6.0-rc2Fixvia CVE List
- github.com/argoproj/argo-cd/security/advisories/GHSA-9v9p-x54c-58gcAdvisoryvia CVE List
- github.com/argoproj/argo-cd/security/advisories/GHSA-j6cw-g6p4-7hchAdvisoryvia CVE List
- github.com/argoproj/argo-cd/pull/12299Referencevia CVE List
- argo-cd.readthedocs.io/en/stable/user-guide/kustomize/#custom-kustomize-versionsReferencevia CVE List