CVE-2023-25163: Github.com/argoproj/argo cd/v2 Argo CD Leaks Repository Credentials Vulnerability
MODERATECVE-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
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).
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.
Upgrade github.com/argoproj/argo-cd/v2 to 2.6.1
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
CVE-2023-25163 Affected Github.com/argoproj/argo cd/v2 Versions
1 component(s)| 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?
Which Github.com/argoproj/argo cd/v2 versions are affected?
What version fixes CVE-2023-25163?
Is github.com/argoproj/argo-cd/v2 affected?
What is the CVSS score of CVE-2023-25163?
What CWE is associated with CVE-2023-25163?
How can I check Go dependencies for CVE-2023-25163?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"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"
}
}