CVE-2022-41354: Github.com/argoproj/argo cd Argo CD Authenticated But Unauthorized Vulnerability

MODERATE
Advisory Identifier: GHSA-2q5c-qw9c-fmvq
CVSS 5.3
CWE-203
Published
Advisory Summary

CVE-2022-41354 is a MODERATE (CVSS 5.3) argo cd authenticated but unauthorized vulnerability (CWE-203: Observable Discrepancy) affecting Github.com/argoproj/argo cd libraries in the Go ecosystem. The issue involves argo cd authenticated but unauthorized users may enumerate application names via the api. Remediation is available by upgrading affected packages to version 2.5.16, 2.6.7, 2.4.28.

CVE-2022-41354 at a Glance

CVE Identifier CVE-2022-41354
GHSA Identifier GHSA-2q5c-qw9c-fmvq
Severity MODERATE
CVSS v3.1 Base Score 5.3
CWE Classification CWE-203: Observable Discrepancy
Affected Product Github.com/argoproj/argo cd
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 5.3

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

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

How to Fix CVE-2022-41354

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.5.16
Upgrade github.com/argoproj/argo-cd/v2 to 2.5.16
github.com/argoproj/argo-cd/v2 fixed: 2.6.7
Upgrade github.com/argoproj/argo-cd/v2 to 2.6.7
github.com/argoproj/argo-cd/v2 fixed: 2.4.28
Upgrade github.com/argoproj/argo-cd/v2 to 2.4.28
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-2022-41354, 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.5.16), 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-203: Observable Discrepancy, where the product behaves differently or sends different responses under different circumstances in a way that is observable to an unauthorized actor. 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 All versions of Argo CD starting with v0.5.0 are vulnerable to an information disclosure bug allowing unauthorized users to enumerate application names by inspecting API error messages. An attacker could use the discovered application names as the starting point of another attack. For example, the attacker might use their knowledge of an application name to convince an administrator to grant higher privileges (social engineering). Many Argo CD API endpoints accept an application name as the only parameter. Since Argo CD RBAC requires both the application name and its configured project name (and, if apps-in-any-namespace is enabled, the application's namespace), Argo CD fetches the requested application before performing the RBAC check. If the application does not exist, the API returns a "not found". If the application does exist, and the user does not have access, the API returns an "unauthorized" error. By trial and error, an attacker can infer which applications exist and which do not. Note that application resources are not fetched for API calls from _unauthenticated_ users. If your Argo CD instance is accessible from the public internet, unauthenticated users will not be able to cause Argo CD to make Kubernetes API calls. The patch changes API behavior to return "unauthorized" both when the application is missing and when the user is not authorized to access it. **This change in API behavior may impact API clients.** Check your code to make sure it will handle the new API behavior properly. ### Patches A patch for this vulnerability has been released in the following Argo CD versions: * v2.6.7 * v2.5.16 * v2.4.28 ### Workarounds There are no workarounds besides upgrading. ### Credits Thank you to bean.zhang of HIT-IDS ChunkL Team who discovered the issue and reported it confidentially according to our [guidelines](https://github.com/argoproj/argo-cd/blob/master/SECURITY.md#reporting-a-vulnerability). ### For more information * Open an issue in [the Argo CD issue tracker](https://github.com/argoproj/argo-cd/issues) or [discussions](https://github.com/argoproj/argo-cd/discussions) * Join us on [Slack](https://argoproj.github.io/community/join-slack) in channel #argo-cd

CVE-2022-41354 Affected Github.com/argoproj/argo cd Versions

4 component(s)
Fixed Versions:
2.5.162.6.72.4.28
Product / Package Ecosystem Affected Versions Fixed Version
github.com/argoproj/argo-cd
Go
≥ 0.5.0
≤ 1.8.7
github.com/argoproj/argo-cd/v2
Go
≥ 2.5.0
< 2.5.16
2.5.16
github.com/argoproj/argo-cd/v2
Go
≥ 2.6.0
< 2.6.7
2.6.7
github.com/argoproj/argo-cd/v2
Go
< 2.4.28
2.4.28

References

Frequently Asked Questions

What is CVE-2022-41354?
CVE-2022-41354 is a security vulnerability in Github.com/argoproj/argo cd involving Argo CD authenticated but unauthorized users may enumerate Application names via the API under CWE-203: Observable Discrepancy.
Which Github.com/argoproj/argo cd versions are affected?
Affected versions include releases prior to 2.5.16, 2.6.7, 2.4.28 across affected packages: github.com/argoproj/argo-cd, github.com/argoproj/argo-cd/v2.
What version fixes CVE-2022-41354?
Upgrading to 2.5.16, 2.6.7, 2.4.28 (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.5.16, 2.6.7, 2.4.28. Upgrade your dependency to 2.5.16, 2.6.7, 2.4.28 or later.
What is the CVSS score of CVE-2022-41354?
CVE-2022-41354 has a CVSS v3.1 base score of 5.3 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N.
What CWE is associated with CVE-2022-41354?
CVE-2022-41354 is classified under CWE-203: Observable Discrepancy (The product behaves differently or sends different responses under different circumstances in a way that is observable to an unauthorized actor.).
How can I check Go dependencies for CVE-2022-41354?
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-2q5c-qw9c-fmvq",
  "modified" : "2023-03-27T22:11:08Z",
  "published" : "2023-03-23T19:49:11Z",
  "aliases" : [ "CVE-2022-41354" ],
  "summary" : "Argo CD authenticated but unauthorized users may enumerate Application names via the API",
  "details" : "### Impact\n\nAll versions of Argo CD starting with v0.5.0 are vulnerable to an information disclosure bug allowing unauthorized users to enumerate application names by inspecting API error messages. An attacker could use the discovered application names as the starting point of another attack. For example, the attacker might use their knowledge of an application name to convince an administrator to grant higher privileges (social engineering).\n\nMany Argo CD API endpoints accept an application name as the only parameter. Since Argo CD RBAC requires both the application name and its configured project name (and, if apps-in-any-namespace is enabled, the application's namespace), Argo CD fetches the requested application before performing the RBAC check. If the application does not exist, the API returns a \"not found\". If the application does exist, and the user does not have access, the API returns an \"unauthorized\" error. By trial and error, an attacker can infer which applications exist and which do not.\n\nNote that application resources are not fetched for API calls from _unauthenticated_ users. If your Argo CD instance is accessible from the public internet, unauthenticated users will not be able to cause Argo CD to make Kubernetes API calls.\n\nThe patch changes API behavior to return \"unauthorized\" both when the application is missing and when the user is not authorized to access it. **This change in API behavior may impact API clients.** Check your code to make sure it will handle the new API behavior properly.\n\n### Patches\n\nA patch for this vulnerability has been released in the following Argo CD versions:\n\n* v2.6.7\n* v2.5.16\n* v2.4.28\n\n### Workarounds\n\nThere are no workarounds besides upgrading.\n\n### Credits\n\nThank you to bean.zhang of HIT-IDS ChunkL Team who discovered the issue and reported it confidentially according to our [guidelines](https://github.com/argoproj/argo-cd/blob/master/SECURITY.md#reporting-a-vulnerability).\n\n### For more information\n\n* Open an issue in [the Argo CD issue tracker](https://github.com/argoproj/argo-cd/issues) or [discussions](https://github.com/argoproj/argo-cd/discussions)\n* Join us on [Slack](https://argoproj.github.io/community/join-slack) in channel #argo-cd\n",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/argoproj/argo-cd"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0.5.0"
      }, {
        "last_affected" : "1.8.7"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/argoproj/argo-cd/v2"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.5.0"
      }, {
        "fixed" : "2.5.16"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/argoproj/argo-cd/v2"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.6.0"
      }, {
        "fixed" : "2.6.7"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/argoproj/argo-cd/v2"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2.4.28"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/argoproj/argo-cd/security/advisories/GHSA-2q5c-qw9c-fmvq"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2022-41354"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/argoproj/argo-cd/commit/3a28c8a18cc2aa84fe81492625545d25c7a90bc3"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/argoproj/argo-cd"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/argoproj/argo-cd/releases/tag/v2.4.28"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/argoproj/argo-cd/releases/tag/v2.5.16"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/argoproj/argo-cd/releases/tag/v2.6.7"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/chunklhit/cve/blob/master/argo/argo-cd/application_enumeration.md"
  }, {
    "type" : "WEB",
    "url" : "http://argo.com"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-203" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2023-03-23T19:49:11Z",
    "nvd_published_at" : "2023-03-27T14:15:00Z"
  }
}