CVE-2024-22424: Github.com/argoproj/argo cd Github.com/argoproj/argo-cd Cross-Site Request Forgery Vulnerability Vulnerability

HIGH
Advisory Identifier: GHSA-92mw-q256-5vwg
CVSS 8.3
CWE-352
Published
Advisory Summary

CVE-2024-22424 is a HIGH (CVSS 8.3) github.com/argoproj/argo-cd cross-site request forgery vulnerability vulnerability (CWE-352: Cross-Site Request Forgery (CSRF)) affecting Github.com/argoproj/argo cd libraries in the Go ecosystem. The issue involves github.com/argoproj/argo-cd cross-site request forgery vulnerability. Remediation is available by upgrading affected packages to version 2.7.16, 2.8.8, 2.9.4, 2.10-rc2.

CVE-2024-22424 at a Glance

CVE Identifier CVE-2024-22424
GHSA Identifier GHSA-92mw-q256-5vwg
Severity HIGH
CVSS v3.1 Base Score 8.3
CWE Classification CWE-352: Cross-Site Request Forgery (CSRF)
Affected Product Github.com/argoproj/argo cd
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 8.3

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

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

How to Fix CVE-2024-22424

To remediate this vulnerability, upgrade all affected Github.com/argoproj/argo cd 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 fixed: Latest secure release
Upgrade github.com/argoproj/argo-cd to Latest secure release
github.com/argoproj/argo-cd/v2 fixed: 2.7.16
Upgrade github.com/argoproj/argo-cd/v2 to 2.7.16
github.com/argoproj/argo-cd/v2 fixed: 2.8.8
Upgrade github.com/argoproj/argo-cd/v2 to 2.8.8
github.com/argoproj/argo-cd/v2 fixed: 2.9.4
Upgrade github.com/argoproj/argo-cd/v2 to 2.9.4
github.com/argoproj/argo-cd/v2 fixed: 2.10-rc2
Upgrade github.com/argoproj/argo-cd/v2 to 2.10-rc2
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

How to Check if You Are Affected

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

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

Analyze the terminal output to locate any version of Github.com/argoproj/argo cd in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.7.16), 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-352: Cross-Site Request Forgery (CSRF), where the web application does not, or cannot, sufficiently verify whether a request was intentionally provided by the user who sent the request, which could have originated from an unauthorized actor. In Github.com/argoproj/argo cd, 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 The Argo CD API prior to versions 2.10-rc2, 2.9.4, 2.8.8, and 2.7.16 are vulnerable to a cross-server request forgery (CSRF) attack when the attacker has the ability to write HTML to a page on the same parent domain as Argo CD. A CSRF attack works by tricking an authenticated Argo CD user into loading a web page which contains code to call Argo CD API endpoints on the victim’s behalf. For example, an attacker could send an Argo CD user a link to a page which looks harmless but in the background calls an Argo CD API endpoint to create an application running malicious code. Argo CD uses the “Lax” SameSite cookie policy to prevent CSRF attacks where the attacker controls an external domain. The malicious external website can attempt to call the Argo CD API, but the web browser will refuse to send the Argo CD auth token with the request. Many companies host Argo CD on an internal subdomain, such as [https://argo-cd.internal.example.com](https://argo-cd.example.com/). If an attacker can place malicious code on, for example, https://test.internal.example.com/, they can still perform a CSRF attack. In this case, the “Lax” SameSite cookie does not prevent the browser from sending the auth cookie, because the destination is a parent domain of the Argo CD API. Browsers generally block such attacks by applying CORS policies to sensitive requests with sensitive content types. Specifically, browsers will send a “preflight request” for POSTs with content type “application/json” asking the destination API “are you allowed to accept requests from my domain?” If the destination API does not answer “yes,” the browser will block the request. Before the patched versions, Argo CD did not validate that requests contained the correct content type header. So an attacker could bypass the browser’s CORS check by setting the content type to something which is considered “not sensitive” such as “text/plain.” The browser wouldn’t send the preflight request, and Argo CD would happily accept the contents (which are actually still JSON) and perform the requested action (such as running malicious code). ### Patches A patch for this vulnerability has been released in the following Argo CD versions: * 2.10-rc2 * 2.9.4 * 2.8.8 * 2.7.16 🚨 **The patch contains a breaking API change.** 🚨 The Argo CD API will no longer accept non-GET requests which do not specify application/json as their Content-Type. The accepted content types list is configurable, and it is possible (but discouraged) to disable the content type check completely. ### Workarounds The only way to completely resolve the issue is to upgrade. ### Credits The Argo CD team would like to express their gratitude to An Trinh of [Calif](https://calif.io/) who reported the issue confidentially according to our [guidelines](https://github.com/argoproj/argo-cd/blob/master/SECURITY.md#reporting-a-vulnerability) and published a helpful [blog post](https://blog.calif.io/p/argo-cd-csrf) to describe the issue. We would also like to thank them for actively participating in the review for the patch. ### References * The problem was originally reported in a [GitHub issue](https://github.com/argoproj/argo-cd/issues/2496)

CVE-2024-22424 Affected Github.com/argoproj/argo cd Versions

5 component(s)
Fixed Versions:
2.7.162.8.82.9.42.10-rc2
Product / Package Ecosystem Affected Versions Fixed Version
github.com/argoproj/argo-cd
Go
≥ 0.1.0
≤ 1.8.7
github.com/argoproj/argo-cd/v2
Go
< 2.7.16
2.7.16
github.com/argoproj/argo-cd/v2
Go
≥ 2.8.0-rc1
< 2.8.8
2.8.8
github.com/argoproj/argo-cd/v2
Go
≥ 2.9.0-rc1
< 2.9.4
2.9.4
github.com/argoproj/argo-cd/v2
Go
≥ 2.10.0-rc1
< 2.10-rc2
All 1 versions
2.10.0-rc1
2.10-rc2

References

Frequently Asked Questions

What is CVE-2024-22424?
CVE-2024-22424 is a security vulnerability in Github.com/argoproj/argo cd involving github.com/argoproj/argo-cd Cross-Site Request Forgery vulnerability under CWE-352: Cross-Site Request Forgery (CSRF).
Which Github.com/argoproj/argo cd versions are affected?
Affected versions include releases prior to 2.7.16, 2.8.8, 2.9.4, 2.10-rc2 across affected packages: github.com/argoproj/argo-cd, github.com/argoproj/argo-cd/v2.
What version fixes CVE-2024-22424?
Upgrading to 2.7.16, 2.8.8, 2.9.4, 2.10-rc2 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/argoproj/argo-cd affected?
Yes, github.com/argoproj/argo-cd is affected in releases prior to Latest secure release. Upgrade your dependency to Latest secure release or later.
Is github.com/argoproj/argo-cd/v2 affected?
Yes, github.com/argoproj/argo-cd/v2 is affected in releases prior to 2.7.16, 2.8.8, 2.9.4, 2.10-rc2. Upgrade your dependency to 2.7.16, 2.8.8, 2.9.4, 2.10-rc2 or later.
What is the CVSS score of CVE-2024-22424?
CVE-2024-22424 has a CVSS v3.1 base score of 8.3 (HIGH) with vector string CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:H/I:H/A:H.
What CWE is associated with CVE-2024-22424?
CVE-2024-22424 is classified under CWE-352: Cross-Site Request Forgery (CSRF) (The web application does not, or cannot, sufficiently verify whether a request was intentionally provided by the user who sent the request, which could have originated from an unauthorized actor.).
How can I check Go dependencies for CVE-2024-22424?
Run the dependency tree command: 'inspect dependencies for github.com/argoproj/argo-cd'. 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-92mw-q256-5vwg",
  "modified" : "2024-01-19T20:37:53Z",
  "published" : "2024-01-19T20:37:53Z",
  "aliases" : [ "CVE-2024-22424" ],
  "summary" : "github.com/argoproj/argo-cd Cross-Site Request Forgery vulnerability",
  "details" : "### Impact\n\nThe Argo CD API prior to versions 2.10-rc2, 2.9.4, 2.8.8, and 2.7.16 are vulnerable to a cross-server request forgery (CSRF) attack when the attacker has the ability to write HTML to a page on the same parent domain as Argo CD.\n\nA CSRF attack works by tricking an authenticated Argo CD user into loading a web page which contains code to call Argo CD API endpoints on the victim’s behalf. For example, an attacker could send an Argo CD user a link to a page which looks harmless but in the background calls an Argo CD API endpoint to create an application running malicious code.\n\nArgo CD uses the “Lax” SameSite cookie policy to prevent CSRF attacks where the attacker controls an external domain. The malicious external website can attempt to call the Argo CD API, but the web browser will refuse to send the Argo CD auth token with the request.\n\nMany companies host Argo CD on an internal subdomain, such as [https://argo-cd.internal.example.com](https://argo-cd.example.com/). If an attacker can place malicious code on, for example, https://test.internal.example.com/, they can still perform a CSRF attack. In this case, the “Lax” SameSite cookie does not prevent the browser from sending the auth cookie, because the destination is a parent domain of the Argo CD API.\n\nBrowsers generally block such attacks by applying CORS policies to sensitive requests with sensitive content types. Specifically, browsers will send a “preflight request” for POSTs with content type “application/json” asking the destination API “are you allowed to accept requests from my domain?” If the destination API does not answer “yes,” the browser will block the request.\n\nBefore the patched versions, Argo CD did not validate that requests contained the correct content type header. So an attacker could bypass the browser’s CORS check by setting the content type to something which is considered “not sensitive” such as “text/plain.” The browser wouldn’t send the preflight request, and Argo CD would happily accept the contents (which are actually still JSON) and perform the requested action (such as running malicious code).\n\n### Patches\n\nA patch for this vulnerability has been released in the following Argo CD versions:\n\n* 2.10-rc2\n* 2.9.4\n* 2.8.8\n* 2.7.16\n\n🚨 **The patch contains a breaking API change.** 🚨 The Argo CD API will no longer accept non-GET requests which do not specify application/json as their Content-Type. The accepted content types list is configurable, and it is possible (but discouraged) to disable the content type check completely.\n\n### Workarounds\n\nThe only way to completely resolve the issue is to upgrade.\n\n### Credits\n\nThe Argo CD team would like to express their gratitude to An Trinh of [Calif](https://calif.io/) who reported the issue confidentially according to our [guidelines](https://github.com/argoproj/argo-cd/blob/master/SECURITY.md#reporting-a-vulnerability) and published a helpful [blog post](https://blog.calif.io/p/argo-cd-csrf) to describe the issue. We would also like to thank them for actively participating in the review for the patch.\n\n### References\n\n* The problem was originally reported in a [GitHub issue](https://github.com/argoproj/argo-cd/issues/2496)",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:H/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/argoproj/argo-cd"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0.1.0"
      }, {
        "last_affected" : "1.8.7"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/argoproj/argo-cd/v2"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2.7.16"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/argoproj/argo-cd/v2"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.8.0-rc1"
      }, {
        "fixed" : "2.8.8"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/argoproj/argo-cd/v2"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.9.0-rc1"
      }, {
        "fixed" : "2.9.4"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/argoproj/argo-cd/v2"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.10.0-rc1"
      }, {
        "fixed" : "2.10-rc2"
      } ]
    } ],
    "versions" : [ "2.10.0-rc1" ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/argoproj/argo-cd/security/advisories/GHSA-92mw-q256-5vwg"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-22424"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/argoproj/argo-cd/issues/2496"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/argoproj/argo-cd/pull/16860"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/argoproj/argo-cd/commit/0b459f224b3186707809be8240dfc3a6028f42a0"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/argoproj/argo-cd/commit/13fe3ca589f6f2ded6001ce114e354602ed058b3"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/argoproj/argo-cd/commit/3c5878ecf41581942281e9c95745f073bdfbf9c3"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/argoproj/argo-cd/commit/f569aa105e0fe5940bc736c68e2fc90ee4a6ed94"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/argoproj/argo-cd"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-352" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-01-19T20:37:53Z",
    "nvd_published_at" : "2024-01-19T01:15:09Z"
  }
}