CVE-2023-22736: Github.com/argoproj/argo cd/v2 Controller Reconciles Apps Outside Configured Vulnerability

HIGH
Advisory Identifier: GHSA-6p4m-hw2h-6gmw
CVSS 8.5
CWE-862
Published
Advisory Summary

CVE-2023-22736 is a HIGH (CVSS 8.5) controller reconciles apps outside configured vulnerability (CWE-862: Missing Authorization) affecting Github.com/argoproj/argo cd/v2 libraries in the Go ecosystem. The issue involves controller reconciles apps outside configured namespaces when sharding is enabled. Remediation is available by upgrading affected packages to version 2.5.8, 2.6.0-rc5.

CVE-2023-22736 at a Glance

CVE Identifier CVE-2023-22736
GHSA Identifier GHSA-6p4m-hw2h-6gmw
Severity HIGH
CVSS v3.1 Base Score 8.5
CWE Classification CWE-862: Missing Authorization
Affected Product Github.com/argoproj/argo cd/v2
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 8.5

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

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

How to Fix CVE-2023-22736

To remediate this vulnerability, upgrade all affected Github.com/argoproj/argo cd/v2 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/v2 fixed: 2.5.8
Upgrade github.com/argoproj/argo-cd/v2 to 2.5.8
github.com/argoproj/argo-cd/v2 fixed: 2.6.0-rc5
Upgrade github.com/argoproj/argo-cd/v2 to 2.6.0-rc5
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/v2

How to Check if You Are Affected

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

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

Analyze the terminal output to locate any version of Github.com/argoproj/argo cd/v2 in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.5.8), 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-862: Missing Authorization, where the product does not perform an authorization check when an actor attempts to access a resource or perform an action. In Github.com/argoproj/argo cd/v2, 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 Argo CD versions starting with 2.5.0-rc1 are vulnerable to an authorization bypass bug which allows a malicious Argo CD user to deploy Applications outside the configured allowed namespaces. #### Description of exploit Reconciled Application namespaces are specified as a comma-delimited list of glob patterns. When sharding is enabled on the Application controller, it does not enforce that list of patterns when reconciling Applications. For example, if Application namespaces are configured to be `argocd-*`, the Application controller may reconcile an Application installed in a namespace called `other`, even though it does not start with `argocd-`. Reconciliation of the out-of-bounds Application is only triggered when the Application is updated, so the attacker must be able to cause an update operation on the Application resource. #### Limitations This bug only applies to users who have explicitly enabled the "apps-in-any-namespace" feature by setting `application.namespaces` in the argocd-cmd-params-cm ConfigMap or otherwise setting the `--application-namespaces` flags on the Application controller and API server components. The apps-in-any-namespace feature is in beta as of this Security Advisory's publish date. The bug is also limited to Argo CD instances where sharding is enabled by increasing the `replicas` count for the Application controller. Finally, the AppProjects' `sourceNamespaces` field acts as a secondary check against this exploit. To cause reconciliation of an Application in an out-of-bounds namespace, an AppProject must be available which permits Applications in the out-of-bounds namespace. ### Patches A patch for this vulnerability has been released in the following Argo CD versions: * v2.5.8 * v2.6.0-rc5 ### Workarounds Running only one replica of the Application controller will prevent exploitation of this bug. Making sure all AppProjects' `sourceNamespaces` are restricted within the confines of the configured Application namespaces will also prevent exploitation of this bug. ### Credits Thanks to ChangZhuo Chen (@czchen) for finding the issue and for contributing the fix! ### References * [Documentation for apps-in-any-namespace](https://argo-cd--10678.org.readthedocs.build/en/10678/operator-manual/app-any-namespace/) ### 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-2023-22736 Affected Github.com/argoproj/argo cd/v2 Versions

2 component(s)
Fixed Versions:
2.5.82.6.0-rc5
Product / Package Ecosystem Affected Versions Fixed Version
github.com/argoproj/argo-cd/v2
Go
≥ 2.5.0-rc1
< 2.5.8
2.5.8
github.com/argoproj/argo-cd/v2
Go
≥ 2.6.0-rc4
< 2.6.0-rc5
All 1 versions
2.6.0-rc4
2.6.0-rc5

References

Frequently Asked Questions

What is CVE-2023-22736?
CVE-2023-22736 is a security vulnerability in Github.com/argoproj/argo cd/v2 involving Controller reconciles apps outside configured namespaces when sharding is enabled under CWE-862: Missing Authorization.
Which Github.com/argoproj/argo cd/v2 versions are affected?
Affected versions include releases prior to 2.5.8, 2.6.0-rc5 across affected packages: github.com/argoproj/argo-cd/v2.
What version fixes CVE-2023-22736?
Upgrading to 2.5.8, 2.6.0-rc5 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/argoproj/argo-cd/v2 affected?
Yes, github.com/argoproj/argo-cd/v2 is affected in releases prior to 2.5.8, 2.6.0-rc5. Upgrade your dependency to 2.5.8, 2.6.0-rc5 or later.
What is the CVSS score of CVE-2023-22736?
CVE-2023-22736 has a CVSS v3.1 base score of 8.5 (HIGH) with vector string CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:H.
What CWE is associated with CVE-2023-22736?
CVE-2023-22736 is classified under CWE-862: Missing Authorization (The product does not perform an authorization check when an actor attempts to access a resource or perform an action.).
How can I check Go dependencies for CVE-2023-22736?
Run the dependency tree command: 'inspect dependencies for github.com/argoproj/argo-cd/v2'. 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-6p4m-hw2h-6gmw",
  "modified" : "2025-05-13T20:56:19Z",
  "published" : "2023-01-25T19:39:03Z",
  "aliases" : [ "CVE-2023-22736" ],
  "summary" : "Controller reconciles apps outside configured namespaces when sharding is enabled",
  "details" : "### Impact\n\nAll Argo CD versions starting with 2.5.0-rc1 are vulnerable to an authorization bypass bug which allows a malicious Argo CD user to deploy Applications outside the configured allowed namespaces. \n\n#### Description of exploit\n\nReconciled Application namespaces are specified as a comma-delimited list of glob patterns. When sharding is enabled on the Application controller, it does not enforce that list of patterns when reconciling Applications. For example, if Application namespaces are configured to be `argocd-*`, the Application controller may reconcile an Application installed in a namespace called `other`, even though it does not start with `argocd-`.\n\nReconciliation of the out-of-bounds Application is only triggered when the Application is updated, so the attacker must be able to cause an update operation on the Application resource.\n\n#### Limitations\n\nThis bug only applies to users who have explicitly enabled the \"apps-in-any-namespace\" feature by setting `application.namespaces` in the argocd-cmd-params-cm ConfigMap or otherwise setting the `--application-namespaces` flags on the Application controller and API server components. The apps-in-any-namespace feature is in beta as of this Security Advisory's publish date.\n\nThe bug is also limited to Argo CD instances where sharding is enabled by increasing the `replicas` count for the Application controller.\n\nFinally, the AppProjects' `sourceNamespaces` field acts as a secondary check against this exploit. To cause reconciliation of an Application in an out-of-bounds namespace, an AppProject must be available which permits Applications in the out-of-bounds namespace.\n\n### Patches\n\nA patch for this vulnerability has been released in the following Argo CD versions:\n\n* v2.5.8\n* v2.6.0-rc5\n\n### Workarounds\n\nRunning only one replica of the Application controller will prevent exploitation of this bug.\n\nMaking sure all AppProjects' `sourceNamespaces` are restricted within the confines of the configured Application namespaces will also prevent exploitation of this bug.\n\n### Credits\n\nThanks to ChangZhuo Chen (@czchen) for finding the issue and for contributing the fix!\n\n### References\n\n* [Documentation for apps-in-any-namespace](https://argo-cd--10678.org.readthedocs.build/en/10678/operator-manual/app-any-namespace/)\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",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/argoproj/argo-cd/v2"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.5.0-rc1"
      }, {
        "fixed" : "2.5.8"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/argoproj/argo-cd/v2"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.6.0-rc4"
      }, {
        "fixed" : "2.6.0-rc5"
      } ]
    } ],
    "versions" : [ "2.6.0-rc4" ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/argoproj/argo-cd/security/advisories/GHSA-6p4m-hw2h-6gmw"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-22736"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/argoproj/argo-cd"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-862" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2023-01-25T19:39:03Z",
    "nvd_published_at" : "2023-01-26T21:18:00Z"
  }
}