CVE-2022-24731 Path traversal allows leaking out-of-bound files from Argo CD repo-server

Medium 6.8 Published Updated

A malicious user with application update access can leak sensitive files from the Argo CD repo-server via path traversal in Helm charts.

Exploited in the wild
Not known
Login needed
An administrator
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2022-24731?

CVE-2022-24731 is a medium-severity path traversal vulnerability in Argoproj Argo Cd, published on 23 Mar 2022. An attacker needs administrator access to exploit it, with no action from the victim.

Official description

Argo CD is a declarative, GitOps continuous delivery tool for Kubernetes. Argo CD starting with version 1.5.0 but before versions 2.1.11, 2.2.6, and 2.3.0 is vulnerable to a path traversal vulnerability, allowing a malicious user with read/write access to leak sensitive files from Argo CD's repo-server. A malicious Argo CD user who has been granted `create` or `update` access to Applications can leak the contents of any text file on the repo-server. By crafting a malicious Helm chart and using it in an Application, the attacker can retrieve the sensitive file's contents either as part of the generated manifests or in an error message. The attacker would have to know or guess the location of the target file. Sensitive files which could be leaked include files from another Application's source repositories or any secrets which have been mounted as files on the repo-server. This vulnerability is patched in Argo CD versions 2.1.11, 2.2.6, and 2.3.0. The problem can be mitigated by avoiding storing secrets in git, avoiding mounting secrets as files on the repo-server, avoiding decrypting secrets into files on the repo-server, and carefully limiting who can `create` or `update` Applications.

Weakness: CWE-209, CWE-284, CWE-22

Which versions are affected by CVE-2022-24731?

8 open source packages ship an affected version, including github.com/argoproj/argo-cd and github.com/argoproj/argo-cd/v2. It affects 1 product.

PackageAffectedFixed in
github.com/argoproj/argo-cd GoFrom 1.5.0None
github.com/argoproj/argo-cd GoFrom 1.5.02.1.11
github.com/argoproj/argo-cd GoFrom 1.5.02.1.11
github.com/argoproj/argo-cd GoFrom 2.2.02.2.6
github.com/argoproj/argo-cd GoFrom 2.2.02.2.6
github.com/argoproj/argo-cd GoFrom 2.3.0-rc12.3.0
2 more packages
github.com/argoproj/argo-cd GoFrom 2.3.0-rc12.3.0
github.com/argoproj/argo-cd/v2 GoAll versions2.1.11, 2.2.6, 2.3.0

Products include Argoproj Argo Cd.

How do I fix CVE-2022-24731?

Upgrade github.com/argoproj/argo-cd to a fixed version for your release line: 2.1.11, 2.2.6 or 2.3.0.

Upgrade, and resolve every user-supplied path against an allowed base folder before opening it. More about Path traversal.

Is CVE-2022-24731 being exploited?

There is no known exploitation of CVE-2022-24731 in the wild and no public exploit code.

All Argoproj Argo Cd vulnerabilities

Sources

Also known as GHSA-h6h5-6fmq-rh28, GO-2022-0358.

Is CVE-2022-24731 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free