CVE-2023-25163: Github.com/argoproj/argo cd/v2 Argo CD Leaks Repository Credentials Vulnerability

MODERATE
Advisory Identifier: GHSA-mv6w-j4xc-qpfw
CVSS 6.3
CWE-532
Published
Advisory Summary

CVE-2023-25163 is a MODERATE (CVSS 6.3) argo cd leaks repository credentials vulnerability (CWE-532: Insertion of Sensitive Information into Log File) affecting Github.com/argoproj/argo cd/v2 libraries in the Go ecosystem. The issue involves argo cd leaks repository credentials in user-facing error messages and in logs. Remediation is available by upgrading affected packages to version 2.6.1.

CVE-2023-25163 at a Glance

CVE Identifier CVE-2023-25163
GHSA Identifier GHSA-mv6w-j4xc-qpfw
Severity MODERATE
CVSS v3.1 Base Score 6.3
CWE Classification CWE-532: Insertion of Sensitive Information into Log File
Affected Product Github.com/argoproj/argo cd/v2
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 6.3

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:N/A:N).

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 None (I:N)
Availability None (A:N)

How to Fix CVE-2023-25163

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.6.1
Upgrade github.com/argoproj/argo-cd/v2 to 2.6.1
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-25163, 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.6.1), 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-532: Insertion of Sensitive Information into Log File, where the product writes sensitive information to a log file. 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 versions of Argo CD starting with v2.6.0-rc1 have an output sanitization bug which leaks repository access credentials in error messages. These error messages are visible to the user, and they are logged. The error message is visible when a user attempts to create or update an Application via the Argo CD API (and therefor the UI or CLI). The user must have `applications, create` or `applications, update` RBAC access to reach the code which may produce the error. The user is not guaranteed to be able to trigger the error message. They may attempt to spam the API with requests to trigger a rate limit error from the upstream repository. If the user has `repositories, update` access, they may edit an existing repository to introduce a URL typo or otherwise force an error message. But if they have that level of access, they are probably intended to have access to the credentials anyway. ### Patches A patch for this vulnerability has been released in the following Argo CD version: * v2.6.1 ### Workarounds The only way to completely resolve the issue is to upgrade. #### Mitigations To mitigate the issue, make sure that your repo credentials have only least necessary privileges. For example, the credentials should not have push access, and they should not have access to more resources than what Argo CD actually needs (for example, a whole GitHub org when only one repo is needed). To further mitigate the impact of a leaked write-capable repo credential, you could [enable commit signature verification](https://argo-cd.readthedocs.io/en/stable/user-guide/gpg-verification/#enforcing-signature-verification). Even if someone could push a malicious commit, the commit would not by synced. You should also enforce least privileges in Argo CD RBAC. Make sure users only have `repositories, update`, `applications, update`, or `applications, create` access if they absolutely need it. ### References * The problem was initially reported in a [GitHub issue](https://github.com/argoproj/argo-cd/issues/12309) * [Argo CD RBAC configuration documentation](https://argo-cd.readthedocs.io/en/stable/operator-manual/rbac/) ### 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-25163 Affected Github.com/argoproj/argo cd/v2 Versions

1 component(s)
Fixed Versions:
2.6.1
Product / Package Ecosystem Affected Versions Fixed Version
github.com/argoproj/argo-cd/v2
Go
≥ 2.6.0-rc1
< 2.6.1
2.6.1

References

Frequently Asked Questions

What is CVE-2023-25163?
CVE-2023-25163 is a security vulnerability in Github.com/argoproj/argo cd/v2 involving Argo CD leaks repository credentials in user-facing error messages and in logs under CWE-532: Insertion of Sensitive Information into Log File.
Which Github.com/argoproj/argo cd/v2 versions are affected?
Affected versions include releases prior to 2.6.1 across affected packages: github.com/argoproj/argo-cd/v2.
What version fixes CVE-2023-25163?
Upgrading to 2.6.1 (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.6.1. Upgrade your dependency to 2.6.1 or later.
What is the CVSS score of CVE-2023-25163?
CVE-2023-25163 has a CVSS v3.1 base score of 6.3 (MODERATE) with vector string CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:N/A:N.
What CWE is associated with CVE-2023-25163?
CVE-2023-25163 is classified under CWE-532: Insertion of Sensitive Information into Log File (The product writes sensitive information to a log file.).
How can I check Go dependencies for CVE-2023-25163?
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-mv6w-j4xc-qpfw",
  "modified" : "2024-09-12T17:51:53Z",
  "published" : "2023-02-08T22:37:10Z",
  "aliases" : [ "CVE-2023-25163" ],
  "summary" : "Argo CD leaks repository credentials in user-facing error messages and in logs",
  "details" : "### Impact\nAll versions of Argo CD starting with v2.6.0-rc1 have an output sanitization bug which leaks repository access credentials in error messages. These error messages are visible to the user, and they are logged. The error message is visible when a user attempts to create or update an Application via the Argo CD API (and therefor the UI or CLI). The user must have `applications, create` or `applications, update` RBAC access to reach the code which may produce the error.\n\nThe user is not guaranteed to be able to trigger the error message. They may attempt to spam the API with requests to trigger a rate limit error from the upstream repository. \n\nIf the user has `repositories, update` access, they may edit an existing repository to introduce a URL typo or otherwise force an error message. But if they have that level of access, they are probably intended to have access to the credentials anyway.\n\n### Patches\n\nA patch for this vulnerability has been released in the following Argo CD version:\n\n* v2.6.1\n\n### Workarounds\n\nThe only way to completely resolve the issue is to upgrade.\n\n#### Mitigations\n\nTo mitigate the issue, make sure that your repo credentials have only least necessary privileges. For example, the credentials should not have push access, and they should not have access to more resources than what Argo CD actually needs (for example, a whole GitHub org when only one repo is needed).\n\nTo further mitigate the impact of a leaked write-capable repo credential, you could [enable commit signature verification](https://argo-cd.readthedocs.io/en/stable/user-guide/gpg-verification/#enforcing-signature-verification). Even if someone could push a malicious commit, the commit would not by synced.\n\nYou should also enforce least privileges in Argo CD RBAC. Make sure users only have `repositories, update`, `applications, update`, or `applications, create` access if they absolutely need it.\n\n### References\n\n* The problem was initially reported in a [GitHub issue](https://github.com/argoproj/argo-cd/issues/12309)\n* [Argo CD RBAC configuration documentation](https://argo-cd.readthedocs.io/en/stable/operator-manual/rbac/)\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:H/PR:L/UI:N/S:C/C:H/I:N/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/argoproj/argo-cd/v2"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.6.0-rc1"
      }, {
        "fixed" : "2.6.1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/argoproj/argo-cd/security/advisories/GHSA-mv6w-j4xc-qpfw"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-25163"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/argoproj/argo-cd/issues/12309"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/argoproj/argo-cd/pull/12320"
  }, {
    "type" : "WEB",
    "url" : "https://argo-cd.readthedocs.io/en/stable/operator-manual/rbac"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/argoproj/argo-cd"
  }, {
    "type" : "WEB",
    "url" : "https://pkg.go.dev/vuln/GO-2023-1548"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-532" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2023-02-08T22:37:10Z",
    "nvd_published_at" : "2023-02-08T21:15:00Z"
  }
}