CVE-2022-25856: Github.com/argoproj/argo events Remote Code Execution Vulnerability

HIGH
Advisory Identifier: GHSA-qpgx-64h2-gc3c
CVSS 7.5
CWE-22
Published
Advisory Summary

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

CVE Identifier CVE-2022-25856
GHSA Identifier GHSA-qpgx-64h2-gc3c
Severity HIGH
CVSS v3.1 Base Score 7.5
CWE Classification CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
Affected Product Github.com/argoproj/argo events
Package Ecosystem Go
Published Date
Last Updated

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

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity None (I:N)
Availability None (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.

github.com/argoproj/argo-events fixed: 1.7.1
Upgrade github.com/argoproj/argo-events to 1.7.1
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-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

### Impact A 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: ```go func (g *GitArtifactReader) readFromRepository(r *git.Repository, dir string) ``` No 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. ### Patches A patch for this vulnerability has been released in the following Argo Events version: v1.7.1 ### Credits Disclosed by [Ada Logics](https://adalogics.com/) in a security audit sponsored by CNCF and facilitated by OSTIF. ### For more information Open an issue in the [Argo Events issue tracker](https://github.com/argoproj/argo-events/issues) or [discussions](https://github.com/argoproj/argo-events/discussions) Join us on [Slack](https://argoproj.github.io/community/join-slack) in channel #argo-events

CVE-2022-25856 Affected Github.com/argoproj/argo events Versions

1 component(s)
Fixed Versions:
1.7.1
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?
CVE-2022-25856 is a security vulnerability in Github.com/argoproj/argo events involving Insecure path traversal in Git Trigger Source can lead to arbitrary file read under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal').
Which Github.com/argoproj/argo events versions are affected?
Affected versions include releases prior to 1.7.1 across affected packages: github.com/argoproj/argo-events.
What version fixes CVE-2022-25856?
Upgrading to 1.7.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/argoproj/argo-events affected?
Yes, github.com/argoproj/argo-events is affected in releases prior to 1.7.1. Upgrade your dependency to 1.7.1 or later.
What is the CVSS score of CVE-2022-25856?
CVE-2022-25856 has a CVSS v3.1 base score of 7.5 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N.
What CWE is associated with CVE-2022-25856?
CVE-2022-25856 is classified under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') (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.).
How can I check Go dependencies for CVE-2022-25856?
Run the dependency tree command: 'inspect dependencies for github.com/argoproj/argo-events'. 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-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"
  }
}