Vulnerabilities in pkg:golang/github.com/go-vela/compiler

PACKAGE
Advisory Identifier: GHSA-gv2h-gf8m-r68j
Advisory Summary

CVE-2020-26294 is a HIGH (CVSS 7.4) exposure of server configuration vulnerability (CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')) affecting Github.com/go vela/compiler libraries in the Go ecosystem. The issue involves exposure of server configuration in github.com/go-vela/server. Remediation is available by upgrading affected packages to version 0.6.1.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:golang/github.com/go-vela/compiler

1 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:golang/github.com/go-vela/compiler. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-gv2h-gf8m-r68j CVE-2020-26294 HIGH Exposure of server configuration in github.com/go-vela/server

CVE-2020-26294 at a Glance

CVE Identifier CVE-2020-26294
GHSA Identifier GHSA-gv2h-gf8m-r68j
Severity HIGH
CVSS v3.1 Base Score 7.4
CWE Classification CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')
Affected Product Github.com/go vela/compiler
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 7.4

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:R/S:C/C:H/I:N/A:N).

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

How to Fix CVE-2020-26294

To remediate this vulnerability, upgrade all affected Github.com/go vela/compiler 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/go-vela/compiler fixed: 0.6.1
Upgrade github.com/go-vela/compiler to 0.6.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/go-vela/compiler

How to Check if You Are Affected

To determine whether your application is affected by CVE-2020-26294, inspect your project dependencies for Github.com/go vela/compiler:

inspect dependencies for github.com/go-vela/compiler

Analyze the terminal output to locate any version of Github.com/go vela/compiler in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.6.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-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection'), where the product constructs all or part of an os command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended os command when it is sent to a downstream component. In Github.com/go vela/compiler, 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 _What kind of vulnerability is it? Who is impacted?_ * The ability to expose configuration set in the [Vela server](https://github.com/go-vela/server) via [pipeline template functionality](https://go-vela.github.io/docs/templates/overview/). * It impacts all users of Vela. Sample of template exposing server configuration [using Sprig's `env` function](http://masterminds.github.io/sprig/os.html): ```yaml metadata: template: true steps: - name: sample image: alpine:latest commands: # OAuth client ID for Vela <-> GitHub communication - echo {{ env "VELA_SOURCE_CLIENT" }} # secret used for server <-> worker communication - echo {{ env "VELA_SECRET" }} ``` ### Patches _Has the problem been patched? What versions should users upgrade to?_ * Upgrade to `0.6.1` #### Additional Recommended Action(s) * Rotate all secrets ### Workarounds _Is there a way for users to fix or remediate the vulnerability without upgrading?_ * No ### For more information If you have any questions or comments about this advisory: * Email us at [vela@target.com](mailto:vela@target.com)

CVE-2020-26294 Affected Github.com/go vela/compiler Versions

1 component(s)
Fixed Versions:
0.6.1
Product / Package Ecosystem Affected Versions Fixed Version
github.com/go-vela/compiler
Go
< 0.6.1
0.6.1

References

Frequently Asked Questions

What is CVE-2020-26294?
CVE-2020-26294 is a security vulnerability in Github.com/go vela/compiler involving Exposure of server configuration in github.com/go-vela/server under CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection').
Which Github.com/go vela/compiler versions are affected?
Affected versions include releases prior to 0.6.1 across affected packages: github.com/go-vela/compiler.
What version fixes CVE-2020-26294?
Upgrading to 0.6.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/go-vela/compiler affected?
Yes, github.com/go-vela/compiler is affected in releases prior to 0.6.1. Upgrade your dependency to 0.6.1 or later.
What is the CVSS score of CVE-2020-26294?
CVE-2020-26294 has a CVSS v3.1 base score of 7.4 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:N/A:N.
What CWE is associated with CVE-2020-26294?
CVE-2020-26294 is classified under CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') (The product constructs all or part of an OS command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended OS command when it is sent to a downstream component.).
How can I check Go dependencies for CVE-2020-26294?
Run the dependency tree command: 'inspect dependencies for github.com/go-vela/compiler'. 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-gv2h-gf8m-r68j",
  "modified" : "2022-02-15T00:19:57Z",
  "published" : "2022-02-15T00:19:57Z",
  "aliases" : [ "CVE-2020-26294" ],
  "summary" : "Exposure of server configuration in github.com/go-vela/server",
  "details" : "### Impact\n_What kind of vulnerability is it? Who is impacted?_\n\n* The ability to expose configuration set in the [Vela server](https://github.com/go-vela/server) via [pipeline template functionality](https://go-vela.github.io/docs/templates/overview/).\n* It impacts all users of Vela.\n\n\nSample of template exposing server configuration [using Sprig's `env` function](http://masterminds.github.io/sprig/os.html):\n\n```yaml\nmetadata:\n  template: true\n\nsteps:\n  - name: sample\n    image: alpine:latest\n    commands:\n      # OAuth client ID for Vela <-> GitHub communication\n      - echo {{ env \"VELA_SOURCE_CLIENT\" }}\n      # secret used for server <-> worker communication\n      - echo {{ env \"VELA_SECRET\" }}\n```\n\n### Patches\n_Has the problem been patched? What versions should users upgrade to?_\n\n* Upgrade to `0.6.1`\n\n#### Additional Recommended Action(s)\n\n* Rotate all secrets\n\n### Workarounds\n_Is there a way for users to fix or remediate the vulnerability without upgrading?_\n\n* No\n\n### For more information\n\nIf you have any questions or comments about this advisory:\n\n* Email us at [vela@target.com](mailto:vela@target.com)",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:N/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/go-vela/compiler"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.6.1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/go-vela/compiler/security/advisories/GHSA-gv2h-gf8m-r68j"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2020-26294"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/go-vela/compiler/commit/f1ace5f8a05c95c4d02264556e38a959ee2d9bda"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/helm/helm/blob/6297c021cbda1483d8c08a8ec6f4a99e38be7302/pkg/engine/funcs.go#L46-L47"
  }, {
    "type" : "WEB",
    "url" : "https://pkg.go.dev/github.com/go-vela/compiler/compiler"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-200", "CWE-78" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2021-05-21T17:58:10Z",
    "nvd_published_at" : null
  }
}