Skip to content

Argo CD leaks repository credentials in user-facing error messages and in logs

Moderate severity GitHub Reviewed Published Feb 8, 2023 in argoproj/argo-cd • Updated Sep 12, 2024

Package

gomod github.com/argoproj/argo-cd/v2 (Go)

Affected versions

>= 2.6.0-rc1, < 2.6.1

Patched versions

2.6.1

Description

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. 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

For more information

References

@crenshaw-dev crenshaw-dev published to argoproj/argo-cd Feb 8, 2023
Published by the National Vulnerability Database Feb 8, 2023
Published to the GitHub Advisory Database Feb 8, 2023
Reviewed Feb 8, 2023
Last updated Sep 12, 2024

Severity

Moderate

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Network
Attack complexity
High
Privileges required
Low
User interaction
None
Scope
Changed
Confidentiality
High
Integrity
None
Availability
None

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:N/A:N

EPSS score

0.173%
(55th percentile)

Weaknesses

CVE ID

CVE-2023-25163

GHSA ID

GHSA-mv6w-j4xc-qpfw

Source code

Credits

Loading Checking history
See something to contribute? Suggest improvements for this vulnerability.