CVE-2022-25856: Github.com/argoproj/argo events Remote Code Execution Vulnerability
HIGHCVE-2022-25856 is a HIGH (CVSS 7.5) remote code execution vulnerability (CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')) affecting Github.com/argoproj/argo events libraries in the Go ecosystem. The issue involves insecure path traversal in git trigger source can lead to arbitrary file read. Remediation is available by upgrading affected packages to version 1.7.1.
CVE-2022-25856 at a Glance
Security Impact
CVSS: 7.5
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N).
How to Fix CVE-2022-25856
To remediate this vulnerability, upgrade all affected Github.com/argoproj/argo events 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-events to 1.7.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-events
How to Check if You Are Affected
To determine whether your application is affected by CVE-2022-25856, inspect your project dependencies for Github.com/argoproj/argo events:
inspect dependencies for github.com/argoproj/argo-events
Analyze the terminal output to locate any version of Github.com/argoproj/argo events in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.7.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-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'), where the product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory. In Github.com/argoproj/argo events, 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-25856 Affected Github.com/argoproj/argo events Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
github.com/argoproj/argo-events
|
Go |
< 1.7.1
|
1.7.1
|
References
Frequently Asked Questions
What is CVE-2022-25856?
Which Github.com/argoproj/argo events versions are affected?
What version fixes CVE-2022-25856?
Is github.com/argoproj/argo-events affected?
What is the CVSS score of CVE-2022-25856?
What CWE is associated with CVE-2022-25856?
How can I check Go dependencies for CVE-2022-25856?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-qpgx-64h2-gc3c",
"modified" : "2024-05-20T21:27:26Z",
"published" : "2022-06-17T01:03:47Z",
"aliases" : [ "CVE-2022-25856" ],
"summary" : "Insecure path traversal in Git Trigger Source can lead to arbitrary file read",
"details" : "### Impact\nA path traversal issue was found in the `(g *GitArtifactReader).Read() API. Read()` calls into `(g *GitArtifactReader).readFromRepository()` that opens and reads the file that contains the trigger resource definition:\n\n```go\nfunc (g *GitArtifactReader) readFromRepository(r *git.Repository, dir string)\n```\n\nNo checks are made on this file at read time, which could lead an attacker to read files anywhere on the system. This could be achieved by either using symbolic links, or putting `../` in the path.\n\n### Patches\nA patch for this vulnerability has been released in the following Argo Events version:\n\nv1.7.1\n\n### Credits\nDisclosed by [Ada Logics](https://adalogics.com/) in a security audit sponsored by CNCF and facilitated by OSTIF.\n\n### For more information\nOpen an issue in the [Argo Events issue tracker](https://github.com/argoproj/argo-events/issues) or [discussions](https://github.com/argoproj/argo-events/discussions)\nJoin us on [Slack](https://argoproj.github.io/community/join-slack) in channel #argo-events\n",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/argoproj/argo-events"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.7.1"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/argoproj/argo-events/security/advisories/GHSA-qpgx-64h2-gc3c"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2022-25856"
}, {
"type" : "WEB",
"url" : "https://github.com/argoproj/argo-events/issues/1947"
}, {
"type" : "WEB",
"url" : "https://github.com/argoproj/argo-events/pull/1965"
}, {
"type" : "WEB",
"url" : "https://github.com/argoproj/argo-events/commit/d0f66dbce78bc31923ca057b20fc722aa24ca961"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/argoproj/argo-events"
}, {
"type" : "WEB",
"url" : "https://pkg.go.dev/vuln/GO-2022-0492"
}, {
"type" : "WEB",
"url" : "https://snyk.io/vuln/SNYK-GOLANG-GITHUBCOMARGOPROJARGOEVENTSSENSORSARTIFACTS-2864522"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-22" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2022-06-17T01:03:47Z",
"nvd_published_at" : "2022-06-17T20:15:00Z"
}
}