Improper Input Validation
Detailed paths
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)
Detailed paths
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:
use
promhttp.InstrumentHandler*middleware exceptRequestsInFlightnot filter any specific methods (e.g GET) before middleware
pass metric with
methodlabel name to the middlewarenot have any firewall/LB/proxy that filters away requests with unknown
method.
Workarounds:
removing the
methodlabel name fromcounter/gaugeused in theInstrumentHandlerturning off affected
promhttphandlersadding custom middleware before
promhttphandler that will sanitize the request method given by Gohttp.Requestusing 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
wspackage
Remediation
Upgrade github.com/prometheus/client_golang/prometheus/promhttp to version 1.11.1 or higher.
References
Insecure Randomness
Detailed paths
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.