CVE-2023-40026: Github.com/argoproj/argo cd Path Traversal Vulnerability

MODERATE
Advisory Identifier: GHSA-6jqw-jwf5-rp8h
CVSS 5.0
CWE-23 CWE-22
Published
Advisory Summary

CVE-2023-40026 is a MODERATE (CVSS 5.0) path traversal vulnerability (CWE-23: Relative Path Traversal) affecting Github.com/argoproj/argo cd libraries in the Go ecosystem. The issue involves path traversal allows leaking out-of-bound helm charts from argo cd repo-server. Remediation is available by upgrading affected packages to version 2.3.0.

CVE-2023-40026 at a Glance

CVE Identifier CVE-2023-40026
GHSA Identifier GHSA-6jqw-jwf5-rp8h
Severity MODERATE
CVSS v3.1 Base Score 5.0
CWE Classification CWE-23: Relative Path Traversal
Affected Product Github.com/argoproj/argo cd
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 5.0

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:N/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required Low (PR:L)
User Interaction None (UI:N)
Scope Changed (S:C)
Confidentiality Low (C:L)
Integrity None (I:N)
Availability None (A:N)

How to Fix CVE-2023-40026

To remediate this vulnerability, upgrade all affected Github.com/argoproj/argo cd dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

github.com/argoproj/argo-cd fixed: Latest secure release
Upgrade github.com/argoproj/argo-cd to Latest secure release
github.com/argoproj/argo-cd/v2 fixed: 2.3.0
Upgrade github.com/argoproj/argo-cd/v2 to 2.3.0
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for github.com/argoproj/argo-cd

How to Check if You Are Affected

To determine whether your application is affected by CVE-2023-40026, inspect your project dependencies for Github.com/argoproj/argo cd:

inspect dependencies for github.com/argoproj/argo-cd

Analyze the terminal output to locate any version of Github.com/argoproj/argo cd in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.3.0), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-23: Relative Path Traversal, where the product uses external input to construct a pathname that should be within a restricted directory, but it does not properly neutralize sequences such as ".." that can resolve to a location that is outside of that directory. In Github.com/argoproj/argo cd, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### Impact In Argo CD versions prior to 2.3 (starting at least in v0.1.0, but likely in any version using Helm before 2.3), using a specifically-crafted Helm file could reference external Helm charts handled by the same repo-server to leak values, or files from the referenced Helm Chart. This was possible because Helm paths were predictable. The vulnerability worked by adding a Helm chart that referenced Helm resources from predictable paths. Because the paths of Helm charts were predictable and available on an instance of repo-server, it was possible to reference and then render the values and resources from other existing Helm charts regardless of permissions. While generally, secrets are not stored in these files, it was nevertheless possible to reference any values from these charts. ### Patches This issue was fixed in Argo CD 2.3 and subsequent versions by randomizing Helm paths. ### Workarounds User's still using Argo CD 2.3 or below are advised to update to a [supported version](https://argo-cd.readthedocs.io/en/stable/operator-manual/installation/#supported-versions). If this is not possible, disabling Helm chart rendering, or using an additional repo-server for each Helm chart would prevent possible exploitation. ### References https://github.com/argoproj/argo-cd/security/advisories/GHSA-63qx-x74g-jcr7 ### For more information If you have any questions or comments about this advisory: * Open an issue in [example link to repo](http://example.com) * Email us at [example email address](mailto:example@example.com)

CVE-2023-40026 Affected Github.com/argoproj/argo cd Versions

2 component(s)
Fixed Versions:
2.3.0
Product / Package Ecosystem Affected Versions Fixed Version
github.com/argoproj/argo-cd
Go
≤ 1.8.7
github.com/argoproj/argo-cd/v2
Go
< 2.3.0
2.3.0

References

Frequently Asked Questions

What is CVE-2023-40026?
CVE-2023-40026 is a security vulnerability in Github.com/argoproj/argo cd involving Path traversal allows leaking out-of-bound Helm charts from Argo CD repo-server under CWE-23: Relative Path Traversal.
Which Github.com/argoproj/argo cd versions are affected?
Affected versions include releases prior to 2.3.0 across affected packages: github.com/argoproj/argo-cd, github.com/argoproj/argo-cd/v2.
What version fixes CVE-2023-40026?
Upgrading to 2.3.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/argoproj/argo-cd affected?
Yes, github.com/argoproj/argo-cd is affected in releases prior to Latest secure release. Upgrade your dependency to Latest secure release or later.
Is github.com/argoproj/argo-cd/v2 affected?
Yes, github.com/argoproj/argo-cd/v2 is affected in releases prior to 2.3.0. Upgrade your dependency to 2.3.0 or later.
What is the CVSS score of CVE-2023-40026?
CVE-2023-40026 has a CVSS v3.1 base score of 5.0 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:N/A:N.
What CWE is associated with CVE-2023-40026?
CVE-2023-40026 is classified under CWE-23: Relative Path Traversal (The product uses external input to construct a pathname that should be within a restricted directory, but it does not properly neutralize sequences such as ".." that can resolve to a location that is outside of that directory.).
How can I check Go dependencies for CVE-2023-40026?
Run the dependency tree command: 'inspect dependencies for github.com/argoproj/argo-cd'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-6jqw-jwf5-rp8h",
  "modified" : "2023-09-27T20:14:44Z",
  "published" : "2023-09-27T20:14:44Z",
  "aliases" : [ "CVE-2023-40026" ],
  "summary" : "Path traversal allows leaking out-of-bound Helm charts from Argo CD repo-server",
  "details" : "### Impact\nIn Argo CD versions prior to 2.3 (starting at least in v0.1.0, but likely in any version using Helm before 2.3), using a specifically-crafted Helm file could reference external Helm charts handled by the same repo-server to leak values, or files from the referenced Helm Chart. This was possible because Helm paths were predictable. \n\nThe vulnerability worked by adding a Helm chart that referenced Helm resources from predictable paths. Because the paths of Helm charts were predictable and available on an instance of repo-server, it was possible to reference and then render the values and resources from other existing Helm charts regardless of permissions. While generally, secrets are not stored in these files, it was nevertheless possible to reference any values from these charts. \n\n### Patches\nThis issue was fixed in Argo CD 2.3 and subsequent versions by randomizing Helm paths.\n\n### Workarounds\nUser's still using Argo CD 2.3 or below are advised to update to a [supported version](https://argo-cd.readthedocs.io/en/stable/operator-manual/installation/#supported-versions). If this is not possible, disabling Helm chart rendering, or using an additional repo-server for each Helm chart would prevent possible exploitation.  \n\n### References\nhttps://github.com/argoproj/argo-cd/security/advisories/GHSA-63qx-x74g-jcr7\n\n### For more information\nIf you have any questions or comments about this advisory:\n* Open an issue in [example link to repo](http://example.com)\n* Email us at [example email address](mailto:example@example.com)\n",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:N/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/argoproj/argo-cd"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "last_affected" : "1.8.7"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/argoproj/argo-cd/v2"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2.3.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/argoproj/argo-cd/security/advisories/GHSA-63qx-x74g-jcr7"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/argoproj/argo-cd/security/advisories/GHSA-6jqw-jwf5-rp8h"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-40026"
  }, {
    "type" : "WEB",
    "url" : "https://argo-cd.readthedocs.io/en/stable/operator-manual/installation/#supported-versions"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/argoproj/argo-cd"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-22", "CWE-23" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2023-09-27T20:14:44Z",
    "nvd_published_at" : "2023-09-27T21:15:09Z"
  }
}