CVE-2023-43810: opentelemetry-instrumentation Denial of Service vulnerability due to unbound cardinality metrics
Summary Autoinstrumentation out of the box adds the label httpmethod that has unbound cardinality. It leads to the server's potential memory exhaustion when many malicious requests are sent.
Details HTTP method for requests can be easily set by an attacker to be random and long.
PoC Send many requests with long randomly generated HTTP methods and observe how memory consumption increases during it. The app can be like this example from the official docs.
Impact In order to be affected program has to be instrumented for HTTP handlers and does not filter any unknown HTTP methods on the level of CDN, LB, previous middleware, etc.
Proposed solution For convenience and safe usage of this library, it should by default mark with the label UNKNOWN non-standard HTTP methods to show that such requests were made (and this way does not increase cardinality). In case someone wants to stay with the current behavior, library API should allow it. The mechanism with environment variables can be reused - introduce the variable OTELINSTRUMENTATIONHTTPCAPTUREALLMETHODS that will allow enabling current behavior when someone really wants it.
Other sources
OpenTelemetry, also known as OTel for short, is a vendor-neutral open-source Observability framework for instrumenting, generating, collecting, and exporting telemetry data such as traces, metrics, logs. Autoinstrumentation out of the box adds the label httpmethod that has unbound cardinality. It leads to the server's potential memory exhaustion when many malicious requests are sent. HTTP method for requests can be easily set by an attacker to be random and long. In order to be affected program has to be instrumented for HTTP handlers and does not filter any unknown HTTP methods on the level of CDN, LB, previous middleware, etc. This issue has been patched in version 0.41b0.
— MITRE
Affected Software
Remediation
Event History
Frequently Asked Questions
What is the severity of CVE-2023-43810?
The severity of CVE-2023-43810 is high with a severity value of 7.5.
How does CVE-2023-43810 affect OpenTelemetry?
CVE-2023-43810 affects OpenTelemetry when autoinstrumentation adds the label `http_method` with unbound cardinality, leading to potential memory exhaustion.
How can an attacker exploit CVE-2023-43810?
An attacker can exploit CVE-2023-43810 by setting the HTTP method for requests to random and long values.
What is the recommended version to remediate CVE-2023-43810?
To remediate CVE-2023-43810, the recommended version is 0.41b0 of `opentelemetry-instrumentation`.
Where can I find more information about CVE-2023-43810?
You can find more information about CVE-2023-43810 at the following references: [link1], [link2], [link3].