Snyk - Open Source Security

Snyk test report

September 7th 2022, 7:35:40 pm

Scanned the following paths:
  • /private/argo-cd/argoproj/argo-cd/v2 (gomodules)
  • /private/argo-cd (yarn)
3 known vulnerabilities
8 vulnerable dependency paths
1648 dependencies

Improper Input Validation

medium severity

  • Package Manager: golang
  • Vulnerable module: go.mongodb.org/mongo-driver/bson/bsonrw
  • Introduced through: github.com/argoproj/argo-cd/v2@0.0.0, github.com/go-openapi/runtime/middleware@0.19.4 and others

Detailed paths

  • Introduced through: github.com/argoproj/argo-cd/v2@0.0.0 github.com/go-openapi/runtime/middleware@0.19.4 github.com/go-openapi/validate@0.19.5 github.com/go-openapi/strfmt@0.19.3 go.mongodb.org/mongo-driver/bson@1.1.2 go.mongodb.org/mongo-driver/bson/bsonrw@1.1.2
  • Introduced through: github.com/argoproj/argo-cd/v2@0.0.0 github.com/go-openapi/runtime/middleware@0.19.4 github.com/go-openapi/validate@0.19.5 github.com/go-openapi/strfmt@0.19.3 go.mongodb.org/mongo-driver/bson@1.1.2 go.mongodb.org/mongo-driver/bson/bsoncodec@1.1.2 go.mongodb.org/mongo-driver/bson/bsonrw@1.1.2

Overview

go.mongodb.org/mongo-driver/bson/bsonrw is a The MongoDB supported driver for Go.

Affected versions of this package are vulnerable to Improper Input Validation. Specific cstrings input may not be properly validated in the MongoDB Go Driver when marshalling Go objects into BSON. A malicious user could use a Go object with specific string to potentially inject additional fields into marshalled documents.

Remediation

Upgrade go.mongodb.org/mongo-driver/bson/bsonrw to version 1.5.1 or higher.

References


Denial of Service (DoS)

medium severity

  • Package Manager: golang
  • Vulnerable module: github.com/prometheus/client_golang/prometheus/promhttp
  • Introduced through: github.com/argoproj/argo-cd/v2@0.0.0 and github.com/prometheus/client_golang/prometheus/promhttp@1.11.0

Detailed paths

  • Introduced through: github.com/argoproj/argo-cd/v2@0.0.0 github.com/prometheus/client_golang/prometheus/promhttp@1.11.0
  • Introduced through: github.com/argoproj/argo-cd/v2@0.0.0 sigs.k8s.io/controller-runtime@0.11.0 sigs.k8s.io/controller-runtime/pkg/manager@0.11.0 github.com/prometheus/client_golang/prometheus/promhttp@1.11.0
  • Introduced through: github.com/argoproj/argo-cd/v2@0.0.0 sigs.k8s.io/controller-runtime@0.11.0 sigs.k8s.io/controller-runtime/pkg/manager@0.11.0 sigs.k8s.io/controller-runtime/pkg/webhook@0.11.0 sigs.k8s.io/controller-runtime/pkg/webhook/internal/metrics@0.11.0 github.com/prometheus/client_golang/prometheus/promhttp@1.11.0

Overview

Affected versions of this package are vulnerable to Denial of Service (DoS) when handling requests with non-standard HTTP methods.

Note: In order to be affected, an instrumented software must:

  1. use promhttp.InstrumentHandler* middleware except RequestsInFlight

  2. not filter any specific methods (e.g GET) before middleware

  3. pass metric with method label name to the middleware

  4. not have any firewall/LB/proxy that filters away requests with unknown method.

Workarounds:

  1. removing the method label name from counter/gauge used in the InstrumentHandler

  2. turning off affected promhttp handlers

  3. adding custom middleware before promhttp handler that will sanitize the request method given by Go http.Request

  4. using a reverse proxy or web application firewall, configured to only allow a limited set of methods.

Details

Denial of Service (DoS) describes a family of attacks, all aimed at making a system inaccessible to its intended and legitimate users.

Unlike other vulnerabilities, DoS attacks usually do not aim at breaching security. Rather, they are focused on making websites and services unavailable to genuine users resulting in downtime.

One popular Denial of Service vulnerability is DDoS (a Distributed Denial of Service), an attack that attempts to clog network pipes to the system by generating a large volume of traffic from many machines.

When it comes to open source libraries, DoS vulnerabilities allow attackers to trigger such a crash or crippling of the service by using a flaw either in the application code or from the use of open source libraries.

Two common types of DoS vulnerabilities:

  • High CPU/Memory Consumption- An attacker sending crafted requests that could cause the system to take a disproportionate amount of time to process. For example, commons-fileupload:commons-fileupload.

  • Crash - An attacker sending crafted requests that could cause the system to crash. For Example, npm ws package

Remediation

Upgrade github.com/prometheus/client_golang/prometheus/promhttp to version 1.11.1 or higher.

References


Insecure Randomness

medium severity

  • Package Manager: golang
  • Vulnerable module: github.com/Masterminds/goutils
  • Introduced through: github.com/argoproj/argo-cd/v2@0.0.0, github.com/argoproj/notifications-engine/pkg/api@#567361917320 and others

Detailed paths

  • Introduced through: github.com/argoproj/argo-cd/v2@0.0.0 github.com/argoproj/notifications-engine/pkg/api@#567361917320 github.com/argoproj/notifications-engine/pkg/templates@#567361917320 github.com/Masterminds/sprig@2.22.0 github.com/Masterminds/goutils@1.1.0
  • Introduced through: github.com/argoproj/argo-cd/v2@0.0.0 github.com/argoproj/notifications-engine/pkg/cmd@#567361917320 github.com/argoproj/notifications-engine/pkg/api@#567361917320 github.com/argoproj/notifications-engine/pkg/templates@#567361917320 github.com/Masterminds/sprig@2.22.0 github.com/Masterminds/goutils@1.1.0
  • Introduced through: github.com/argoproj/argo-cd/v2@0.0.0 github.com/argoproj/notifications-engine/pkg/controller@#567361917320 github.com/argoproj/notifications-engine/pkg/api@#567361917320 github.com/argoproj/notifications-engine/pkg/templates@#567361917320 github.com/Masterminds/sprig@2.22.0 github.com/Masterminds/goutils@1.1.0

Overview

github.com/masterminds/goutils is a provides users with utility functions to manipulate strings in various ways.

Affected versions of this package are vulnerable to Insecure Randomness via the RandomAlphaNumeric(int) and CryptoRandomAlphaNumeric(int) functions. Small values of int in the functions above will return a smaller subset of results than they should. For example, RandomAlphaNumeric(1) would always return a digit in the 0-9 range, while RandomAlphaNumeric(4) return around ~7 million of the ~13M possible permutations.

Remediation

Upgrade github.com/masterminds/goutils to version 1.1.1 or higher.

References