High, CVSS 7.5PyPIAmendedPublished
opentelemetry-instrumentation Denial of Service vulnerability due to unbound cardinality metrics
CVE-2023-43810 · GHSA-5rv5-6h4r-h22v
- Affected
- PyPI opentelemetry-instrumentation < 0.41b0
- Fixed in
- 0.41b0· Vendor fix available
- Issue
- 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…
Recommended action: Upgrade to 0.41b0 (pre-release) or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.