ID CVE-2022-21698
Summary client_golang is the instrumentation library for Go applications in Prometheus, and the promhttp package in client_golang provides tooling around HTTP servers and clients. In client_golang prior to version 1.11.1, HTTP server is susceptible to a Denial of Service through unbounded cardinality, and potential memory exhaustion, when handling requests with non-standard HTTP methods. In order to be affected, an instrumented software must use any of `promhttp.InstrumentHandler*` middleware except `RequestsInFlight`; not filter any specific methods (e.g GET) before middleware; pass metric with `method` label name to our middleware; and not have any firewall/LB/proxy that filters away requests with unknown `method`. client_golang version 1.11.1 contains a patch for this issue. Several workarounds are available, including removing the `method` label name from counter/gauge used in the InstrumentHandler; turning off affected promhttp handlers; adding custom middleware before promhttp handler that will sanitize the request method given by Go http.Request; and using a reverse proxy or web application firewall, configured to only allow a limited set of methods.
References
Vulnerable Configurations
  • cpe:2.3:a:prometheus:client_golang:-:*:*:*:*:go:*:*
    cpe:2.3:a:prometheus:client_golang:-:*:*:*:*:go:*:*
  • cpe:2.3:a:prometheus:client_golang:0.1.0:*:*:*:*:go:*:*
    cpe:2.3:a:prometheus:client_golang:0.1.0:*:*:*:*:go:*:*
  • cpe:2.3:a:prometheus:client_golang:0.2.0:*:*:*:*:go:*:*
    cpe:2.3:a:prometheus:client_golang:0.2.0:*:*:*:*:go:*:*
  • cpe:2.3:a:prometheus:client_golang:0.3.0:*:*:*:*:go:*:*
    cpe:2.3:a:prometheus:client_golang:0.3.0:*:*:*:*:go:*:*
  • cpe:2.3:a:prometheus:client_golang:0.3.1:*:*:*:*:go:*:*
    cpe:2.3:a:prometheus:client_golang:0.3.1:*:*:*:*:go:*:*
  • cpe:2.3:a:prometheus:client_golang:0.3.2:*:*:*:*:go:*:*
    cpe:2.3:a:prometheus:client_golang:0.3.2:*:*:*:*:go:*:*
  • cpe:2.3:a:prometheus:client_golang:0.4.0:*:*:*:*:go:*:*
    cpe:2.3:a:prometheus:client_golang:0.4.0:*:*:*:*:go:*:*
  • cpe:2.3:a:prometheus:client_golang:0.5.0:*:*:*:*:go:*:*
    cpe:2.3:a:prometheus:client_golang:0.5.0:*:*:*:*:go:*:*
  • cpe:2.3:a:prometheus:client_golang:0.6.0:*:*:*:*:go:*:*
    cpe:2.3:a:prometheus:client_golang:0.6.0:*:*:*:*:go:*:*
  • cpe:2.3:a:prometheus:client_golang:0.7.0:*:*:*:*:go:*:*
    cpe:2.3:a:prometheus:client_golang:0.7.0:*:*:*:*:go:*:*
  • cpe:2.3:a:prometheus:client_golang:0.8.0:*:*:*:*:go:*:*
    cpe:2.3:a:prometheus:client_golang:0.8.0:*:*:*:*:go:*:*
  • cpe:2.3:a:prometheus:client_golang:0.9.0:-:*:*:*:go:*:*
    cpe:2.3:a:prometheus:client_golang:0.9.0:-:*:*:*:go:*:*
  • cpe:2.3:a:prometheus:client_golang:0.9.0:pre1:*:*:*:go:*:*
    cpe:2.3:a:prometheus:client_golang:0.9.0:pre1:*:*:*:go:*:*
  • cpe:2.3:a:prometheus:client_golang:0.9.1:*:*:*:*:go:*:*
    cpe:2.3:a:prometheus:client_golang:0.9.1:*:*:*:*:go:*:*
  • cpe:2.3:a:prometheus:client_golang:0.9.2:*:*:*:*:go:*:*
    cpe:2.3:a:prometheus:client_golang:0.9.2:*:*:*:*:go:*:*
  • cpe:2.3:a:prometheus:client_golang:0.9.3:*:*:*:*:go:*:*
    cpe:2.3:a:prometheus:client_golang:0.9.3:*:*:*:*:go:*:*
  • cpe:2.3:a:prometheus:client_golang:0.9.4:*:*:*:*:go:*:*
    cpe:2.3:a:prometheus:client_golang:0.9.4:*:*:*:*:go:*:*
  • cpe:2.3:a:prometheus:client_golang:1.0.0:*:*:*:*:go:*:*
    cpe:2.3:a:prometheus:client_golang:1.0.0:*:*:*:*:go:*:*
  • cpe:2.3:a:prometheus:client_golang:1.1.0:*:*:*:*:go:*:*
    cpe:2.3:a:prometheus:client_golang:1.1.0:*:*:*:*:go:*:*
  • cpe:2.3:a:prometheus:client_golang:1.2.0:*:*:*:*:go:*:*
    cpe:2.3:a:prometheus:client_golang:1.2.0:*:*:*:*:go:*:*
  • cpe:2.3:a:prometheus:client_golang:1.2.1:*:*:*:*:go:*:*
    cpe:2.3:a:prometheus:client_golang:1.2.1:*:*:*:*:go:*:*
  • cpe:2.3:a:prometheus:client_golang:1.3.0:*:*:*:*:go:*:*
    cpe:2.3:a:prometheus:client_golang:1.3.0:*:*:*:*:go:*:*
  • cpe:2.3:a:prometheus:client_golang:1.4.0:*:*:*:*:go:*:*
    cpe:2.3:a:prometheus:client_golang:1.4.0:*:*:*:*:go:*:*
  • cpe:2.3:a:prometheus:client_golang:1.4.1:*:*:*:*:go:*:*
    cpe:2.3:a:prometheus:client_golang:1.4.1:*:*:*:*:go:*:*
  • cpe:2.3:a:prometheus:client_golang:1.5.0:*:*:*:*:go:*:*
    cpe:2.3:a:prometheus:client_golang:1.5.0:*:*:*:*:go:*:*
  • cpe:2.3:a:prometheus:client_golang:1.5.1:*:*:*:*:go:*:*
    cpe:2.3:a:prometheus:client_golang:1.5.1:*:*:*:*:go:*:*
  • cpe:2.3:a:prometheus:client_golang:1.6.0:*:*:*:*:go:*:*
    cpe:2.3:a:prometheus:client_golang:1.6.0:*:*:*:*:go:*:*
  • cpe:2.3:a:prometheus:client_golang:1.7.0:*:*:*:*:go:*:*
    cpe:2.3:a:prometheus:client_golang:1.7.0:*:*:*:*:go:*:*
  • cpe:2.3:a:prometheus:client_golang:1.7.1:*:*:*:*:go:*:*
    cpe:2.3:a:prometheus:client_golang:1.7.1:*:*:*:*:go:*:*
  • cpe:2.3:a:prometheus:client_golang:1.8.0:*:*:*:*:go:*:*
    cpe:2.3:a:prometheus:client_golang:1.8.0:*:*:*:*:go:*:*
  • cpe:2.3:a:prometheus:client_golang:1.9.0:*:*:*:*:go:*:*
    cpe:2.3:a:prometheus:client_golang:1.9.0:*:*:*:*:go:*:*
  • cpe:2.3:a:prometheus:client_golang:1.10.0:*:*:*:*:go:*:*
    cpe:2.3:a:prometheus:client_golang:1.10.0:*:*:*:*:go:*:*
  • cpe:2.3:a:prometheus:client_golang:1.11.0:*:*:*:*:go:*:*
    cpe:2.3:a:prometheus:client_golang:1.11.0:*:*:*:*:go:*:*
CVSS
Base: 5.0 (as of 14-05-2022 - 03:15)
Impact:
Exploitability:
CWE CWE-400
CAPEC
  • XML Entity Expansion
    An attacker submits an XML document to a target application where the XML document uses nested entity expansion to produce an excessively large output XML. XML allows the definition of macro-like structures that can be used to simplify the creation of complex structures. However, this capability can be abused to create excessive demands on a processor's CPU and memory. A small number of nested expansions can result in an exponential growth in demands on memory.
  • Regular Expression Exponential Blowup
    An adversary may execute an attack on a program that uses a poor Regular Expression(Regex) implementation by choosing input that results in an extreme situation for the Regex. A typical extreme situation operates at exponential time compared to the input size. This is due to most implementations using a Nondeterministic Finite Automaton(NFA) state machine to be built by the Regex algorithm since NFA allows backtracking and thus more complex regular expressions. The algorithm builds a finite state machine and based on the input transitions through all the states until the end of the input is reached. NFA engines may evaluate each character in the input string multiple times during the backtracking. The algorithm tries each path through the NFA one by one until a match is found; the malicious input is crafted so every path is tried which results in a failure. Exploitation of the Regex results in programs hanging or taking a very long time to complete. These attacks may target various layers of the Internet due to regular expressions being used in validation.
  • XML Ping of the Death
    An attacker initiates a resource depletion attack where a large number of small XML messages are delivered at a sufficiently rapid rate to cause a denial of service or crash of the target. Transactions such as repetitive SOAP transactions can deplete resources faster than a simple flooding attack because of the additional resources used by the SOAP protocol and the resources necessary to process SOAP messages. The transactions used are immaterial as long as they cause resource utilization on the target. In other words, this is a normal flooding attack augmented by using messages that will require extra processing on the target.
Access
VectorComplexityAuthentication
NETWORK LOW NONE
Impact
ConfidentialityIntegrityAvailability
NONE NONE PARTIAL
cvss-vector via4 AV:N/AC:L/Au:N/C:N/I:N/A:P
Last major update 14-05-2022 - 03:15
Published 15-02-2022 - 16:15
Last modified 14-05-2022 - 03:15
Back to Top