Path traversal and dereference of symlinks in Argo CD
Date: 2022-02
Affected: go/github.com/argoproj/argo-cd, go/github.com/argoproj/argo-cd/v2, go/github.com/argoproj/argo-cd/v2
Attack vector: path-traversal
Category: vulnerability-disclosure
Severity: High
CVE: CVE-2022-24348
CWE: CWE-200
CWE-22
CVSS: 7.7 (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N)

### Impact All versions of Argo CD are vulnerable to a path traversal bug that allows to pass arbitrary values files to be consumed by Helm charts. Additionally, it is possible to craft special Helm chart packages containing value files that are actually symbolic links, pointing to arbitrary files outside the repository's root directory. If an attacker with permissions to create or update Applications knows or can guess the full path to a file containing valid YAML, they can create a malicious Helm chart to consume that YAML as values files, thereby gaining access to data they would otherwise have no access to. The impact can especially become critical in environments that make use of encrypted value files (e.g. using plugins with git-crypt or SOPS) containing sensitive or confidential data, and decrypt these secrets to disk before rendering the Helm chart. Also, because any error message from `helm template` is passed back to the user, and these error messages are quite verbose, enumeration of files on the repository server's file system is possible. ### Patches A patch for this vulnerability has been released in the following Argo CD versions: * v2.3.0 * v2.2.4 * v2.1.9 We urge users of Argo CD to update their installation to one of the fixed versions as listed above. ### Workarounds No workaround for this issue. ### References * https://apiiro.com/blog/malicious-kubernetes-helm-charts-can-be-used-to-steal-sensitive-information-from-argo-cd-deployments * http


Mitigations:

Architectural layers (MAESTRO):