CVE-2022-31105: Github.com/argoproj/argo cd Argo CD Certificate Verification Is Vulnerability
HIGHCVE-2022-31105 is a HIGH (CVSS 8.3) argo cd certificate verification is vulnerability (CWE-295: Improper Certificate Validation) affecting Github.com/argoproj/argo cd libraries in the Go ecosystem. The issue involves argo cd certificate verification is skipped for connections to oidc providers. Remediation is available by upgrading affected packages to version 2.2.11, 2.3.6, 2.4.5.
CVE-2022-31105 at a Glance
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).
How to Fix CVE-2022-31105
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.
Upgrade github.com/argoproj/argo-cd to 2.2.11
Upgrade github.com/argoproj/argo-cd to 2.3.6
Upgrade github.com/argoproj/argo-cd to 2.4.5
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-2022-31105, 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.2.11), 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-295: Improper Certificate Validation, where the product does not validate, or incorrectly validates, a certificate. 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
CVE-2022-31105 Affected Github.com/argoproj/argo cd Versions
3 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
github.com/argoproj/argo-cd
|
Go |
≥ 0.4.0
< 2.2.11
|
2.2.11
|
|
github.com/argoproj/argo-cd
|
Go |
≥ 2.3.0
< 2.3.6
|
2.3.6
|
|
github.com/argoproj/argo-cd
|
Go |
≥ 2.4.0
< 2.4.5
|
2.4.5
|
References
Frequently Asked Questions
What is CVE-2022-31105?
Which Github.com/argoproj/argo cd versions are affected?
What version fixes CVE-2022-31105?
Is github.com/argoproj/argo-cd affected?
What is the CVSS score of CVE-2022-31105?
What CWE is associated with CVE-2022-31105?
How can I check Go dependencies for CVE-2022-31105?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-7943-82jg-wmw5",
"modified" : "2022-07-21T15:54:19Z",
"published" : "2022-07-12T22:05:11Z",
"aliases" : [ "CVE-2022-31105" ],
"summary" : "Argo CD certificate verification is skipped for connections to OIDC providers",
"details" : "### Impact\n\nAll versions of Argo CD starting with v0.4.0 are vulnerable to an improper certificate validation bug which could cause Argo CD to trust a malicious (or otherwise untrustworthy) OIDC provider.\n\n(Note: external OIDC provider support was added in v0.11.0. Before that version, the notes below apply only to the bundled Dex instance.)\n\nYou are impacted if 1) have SSO enabled and 2) insecure mode is _not_ enabled on the API server. In this case, certificate verification is skipped when connecting to your OIDC provider for the following tasks: verifying auth tokens on API requests and handling SSO login flows. If you are using the bundled Dex instance but have _not_ set the `--dex-server` flag on the API server to an HTTPS address, then certificate verification is not being skipped (because [TLS is not enabled by default for the bundled Dex instance](https://github.com/argoproj/argo-cd/issues/9424)).\n\nArgo CD sends requests to the configured OIDC provider (either the bundled Dex instance or an external provider) to 1) retrieve the [OpenID configuration](https://openid.net/specs/openid-connect-discovery-1_0.html#ProviderConfig), 2) to retrieve the OIDC provider's key set (at the location determined by the [OIDC provider's configured `jwks_uri`](https://openid.net/specs/openid-connect-discovery-1_0.html#ProviderMetadata)), and 3) (during an SSO login) to exchange an authorization code for a token.\n\n(Note: Starting with v2.3.0, certificate verification is _not_ skipped when handling an SSO login flow if 1) you are not using the bundled Dex OIDC provider and 2) you have set `oidc.config.rootCA` in the `argocd-cm` ConfigMap. Certificate verification is still skipped when verifying tokens on API calls.)\n\nSkipping certificate verification when communicating with the OIDC provider opens Argo CD to a variety of risks. For example, if an attacker can successfully intercept, decrypt, and respond to requests bound for the configured OIDC provider (a machine-in-the-middle attack), they could theoretically issue a \"valid\" admin token. Verifying the OIDC provider's certificate provides an extra layer of protection against such an attack.\n\n### Patches\n\nA patch for this vulnerability has been released in the following Argo CD versions:\n\n* v2.4.5\n* v2.3.6\n* v2.2.11\n\n**Note:**\n\nTo preserve backwards compatibility, this patch adds a `oidc.tls.insecure.skip.verify` option to the `argocd-cm` ConfigMap. The default is `\"false\"`. Before resorting to setting this, you should try to get certificate verification to work. If you are using the bundled Dex instance, user your Argo CD API server's [TLS configuration](https://argo-cd.readthedocs.io/en/stable/operator-manual/tls/) since the API server acts as a reverse proxy to Dex. If you are using an external OIDC provider, [set the `rootCA` config](https://argo-cd.readthedocs.io/en/stable/operator-manual/user-management/#configuring-a-custom-root-ca-certificate-for-communicating-with-the-oidc-provider).\n\nIf these fail, be sure you are aware of the risks before setting `oidc.tls.insecure.skip.verify: \"true\"`.\n\n### Workarounds\n\nThere is no complete workaround besides upgrading.\n\n#### Partial mitigation when using an external OIDC provider\n\nIf you are using an external OIDC provider (not the bundled Dex instance), then you can mitigate the issue by setting the `oidc.config.rootCA` field in the `argocd-cm` ConfigMap. If your OIDC provider's certificate is self-signed or otherwise invalid, you must set the rootCA to a certificate that enables verification. If the OIDC provider's certificate passes _without_ an additional root CA, then you can set `oidc.config.rootCA` to a bogus non-empty string such as `\"force cert verification\"`. The API server will log a warning, but otherwise things should work fine.\n\nExample:\n\n```yaml\nmetadata:\n name: argocd-cm\ndata:\n oidc.config: |\n ...\n rootCA: |\n force cert verification\n```\n\nThis mitigation _only_ forces certificate validation when the API server handles login flows. It does not force certificate verification when verifying tokens on API calls. To fully resolve the vulnerability, you must upgrade.\n\n### References\n\n* [Argo CD SSO configuration documentation](https://argo-cd.readthedocs.io/en/stable/operator-manual/user-management/#sso)\n\n### Credits\n\n@jannfis and @crenshaw-dev discovered the vulnerability when reviewing notes from ADA Logics' security audit of the Argo project sponsored by CNCF and facilitated by OSTIF. Thanks to Adam Korczynski and David Korczynski for their work on the audit.\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: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.4.0"
}, {
"fixed" : "2.2.11"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/argoproj/argo-cd"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "2.3.0"
}, {
"fixed" : "2.3.6"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/argoproj/argo-cd"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "2.4.0"
}, {
"fixed" : "2.4.5"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/argoproj/argo-cd/security/advisories/GHSA-7943-82jg-wmw5"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2022-31105"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/argoproj/argo-cd"
}, {
"type" : "WEB",
"url" : "https://github.com/argoproj/argo-cd/releases/tag/v2.3.6"
}, {
"type" : "WEB",
"url" : "https://github.com/argoproj/argo-cd/releases/tag/v2.4.5"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-295" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2022-07-12T22:05:11Z",
"nvd_published_at" : "2022-07-12T22:15:00Z"
}
}