CVE-2023-43810High· 7.5▾ Twilightopentelemetry-instrumentation Denial of Service vulnerability due to unbound cardinality metrics
▾ Twilight zone — High severity, or a signal on a lesser flaw
impact 41.3 · likelihood 0.1 · exploitation 0
Need a working PoC? Pro members can cast a request and our team develops one — it lands right here.
Exploit-prediction probability, daily snapshots since Jul 8.
Disclosure to exploitation, from the record and what we observed since indexing it.
Disclosed via OSV
0.7%
Last analysed / modified upstream
Autoinstrumentation out of the box adds the label http_method 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.
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.
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.
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 OTEL_INSTRUMENTATION_HTTP_CAPTURE_ALL_METHODS that will allow enabling current behavior when someone really wants it.
opentelemetry-instrumentation < 0.41b0Upgrade to a patched release:
opentelemetry-instrumentation 0.41b0