Skip to content

Path traversal and improper access control allows leaking out-of-bound files from Argo CD repo-server

High severity GitHub Reviewed Published Mar 23, 2022 in argoproj/argo-cd • Updated Jan 27, 2023

Package

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

Affected versions

>= 1.3.0, < 2.1.11
>= 2.2.0, < 2.2.6
>= 2.3.0-rc1, < 2.3.0

Patched versions

2.1.11
2.2.6
2.3.0

Description

Impact

All unpatched versions of Argo CD starting with v1.3.0 are vulnerable to a path traversal bug, compounded by an improper access control bug, allowing a malicious user with read-only repository access to leak sensitive files from Argo CD's repo-server.

A malicious Argo CD user who has been granted get access for a repository containing a Helm chart can craft an API request to the /api/v1/repositories/{repo_url}/appdetails endpoint to leak the contents of out-of-bounds files from the repo-server.

The malicious payload would reference an out-of-bounds file, and the contents of that file would be returned as part of the response. Contents from a non-YAML file may be returned as part of an error message. The attacker would have to know or guess the location of the target file.

Sensitive files which could be leaked include files from other Applications' source repositories (potentially decrypted files, if you are using a decryption plugin) or any secrets which have been mounted as files on the repo-server.

Patches

A patch for this vulnerability has been released in the following Argo CD versions:

  • v2.3.0
  • v2.2.6
  • v2.1.11

The patches do two things:

  1. prevent path traversal
  2. limit /api/v1/repositories/{repo_url}/appdetails access to users who either A) have been granted Application create privileges or B) have been granted Application get privileges and are requesting details for a repo_url that has already been used for the given Application

Workarounds

The only certain way to avoid the vulnerability is to upgrade.

To mitigate the problem, you can

References

For more information

Open an issue in the Argo CD issue tracker or discussions
Join us on Slack in channel #argo-cd

References

@jannfis jannfis published to argoproj/argo-cd Mar 23, 2022
Published by the National Vulnerability Database Mar 23, 2022
Published to the GitHub Advisory Database Mar 24, 2022
Reviewed Mar 24, 2022
Last updated Jan 27, 2023

Severity

High

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
Low
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:L/PR:L/UI:N/S:C/C:H/I:N/A:N

EPSS score

0.093%
(41st percentile)

CVE ID

CVE-2022-24730

GHSA ID

GHSA-r9cr-hvjj-496v

Source code

Credits

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